LibreOffice Module oox (master) 1
|
A control that is embedded in a VBA user form or in another container control in a VBA user form. More...
#include <vbacontrol.hxx>
Public Member Functions | |
VbaFormControl () | |
virtual | ~VbaFormControl () |
void | importModelOrStorage (BinaryInputStream &rInStrm, StorageBase &rStrg, const AxClassTable &rClassTable) |
Imports the model from the passed stream or storage, depending on the control's type. More... | |
OUString | getControlName () const |
Returns the programmatical name of the control. More... | |
void | createAndConvert (sal_Int32 nCtrlIndex, const css::uno::Reference< css::container::XNameContainer > &rxParentNC, const ControlConverter &rConv) const |
Creates the UNO control model, inserts it into the passed container, and converts all control properties. More... | |
Protected Member Functions | |
void | importControlModel (BinaryInputStream &rInStrm, const AxClassTable &rClassTable) |
Creates and imports the control model containing properties of the control. More... | |
void | importStorage (StorageBase &rStrg, const AxClassTable &rClassTable) |
Creates and imports the control model, and imports all embedded controls from the passed substorage. More... | |
bool | convertProperties (const css::uno::Reference< css::awt::XControlModel > &rxCtrlModel, const ControlConverter &rConv, sal_Int32 nCtrlIndex) const |
Converts all control properties, and inserts and converts embedded controls. More... | |
Protected Attributes | |
VbaSiteModelRef | mxSiteModel |
Common control properties. More... | |
ControlModelRef | mxCtrlModel |
Specific control properties. More... | |
Private Types | |
typedef RefVector< VbaFormControl > | VbaFormControlVector |
typedef VbaFormControlVector::value_type | VbaFormControlRef |
Private Member Functions | |
void | createControlModel (const AxClassTable &rClassTable) |
Creates the control model according to the current site model. More... | |
bool | importSiteModel (BinaryInputStream &rInStrm) |
Imports the site model data containing common properties of the control. More... | |
void | importEmbeddedSiteModels (BinaryInputStream &rInStrm) |
Imports the site models of all embedded controls from the 'f' stream. More... | |
void | finalizeEmbeddedControls () |
void | moveRelative (const AxPairData &rDistance) |
Moves the control relative to its current position by the passed distance. More... | |
void | moveEmbeddedToAbsoluteParent () |
Moves all embedded controls from their relative position in this control to an absolute position in the parent of this control. More... | |
Static Private Member Functions | |
static bool | compareByTabIndex (const VbaFormControlRef &rxLeft, const VbaFormControlRef &rxRight) |
Functor for comparing controls by their tab index. More... | |
Private Attributes | |
VbaFormControlVector | maControls |
All embedded form controls. More... | |
AxClassTable | maClassTable |
Class identifiers for exotic embedded controls. More... | |
A control that is embedded in a VBA user form or in another container control in a VBA user form.
The control may be a 'simple' control with its data stored in the 'o' stream, or it may be a container control with its data stored in an own substorage.
Definition at line 117 of file vbacontrol.hxx.
Definition at line 155 of file vbacontrol.hxx.
|
private |
Definition at line 154 of file vbacontrol.hxx.
|
explicit |
Definition at line 317 of file vbacontrol.cxx.
|
virtual |
Definition at line 321 of file vbacontrol.cxx.
|
staticprivate |
Functor for comparing controls by their tab index.
Definition at line 721 of file vbacontrol.cxx.
References SAL_MAX_INT32.
Referenced by finalizeEmbeddedControls().
|
protected |
Converts all control properties, and inserts and converts embedded controls.
Definition at line 488 of file vbacontrol.cxx.
References oox::ole::ControlConverter::bindToSources(), createAndConvert(), Exception, oox::RefVector< ObjType >::forEachMemWithIndex(), maControls, mxCtrlModel, mxSiteModel, and oox::PropertySet::setProperties().
Referenced by createAndConvert(), and oox::ole::VbaUserForm::importForm().
void oox::ole::VbaFormControl::createAndConvert | ( | sal_Int32 | nCtrlIndex, |
const css::uno::Reference< css::container::XNameContainer > & | rxParentNC, | ||
const ControlConverter & | rConv | ||
) | const |
Creates the UNO control model, inserts it into the passed container, and converts all control properties.
Definition at line 350 of file vbacontrol.cxx.
References Any, convertProperties(), Exception, oox::ContainerHelper::insertByName(), mxCtrlModel, and mxSiteModel.
Referenced by convertProperties().
|
private |
Creates the control model according to the current site model.
Definition at line 528 of file vbacontrol.cxx.
References mxCtrlModel, and mxSiteModel.
Referenced by importControlModel(), and importStorage().
|
private |
Definition at line 588 of file vbacontrol.cxx.
References aName, oox::ole::API_CONTROL_GROUPBOX, compareByTabIndex(), oox::RefVector< ObjType >::forEach(), oox::RefVector< ObjType >::get(), oox::ole::ControlModelBase::getControlType(), and maControls.
Referenced by importStorage().
OUString oox::ole::VbaFormControl::getControlName | ( | ) | const |
Returns the programmatical name of the control.
Definition at line 345 of file vbacontrol.cxx.
References mxSiteModel.
|
protected |
Creates and imports the control model containing properties of the control.
Definition at line 379 of file vbacontrol.cxx.
References createControlModel(), and mxCtrlModel.
Referenced by importModelOrStorage().
|
private |
Imports the site models of all embedded controls from the 'f' stream.
Definition at line 541 of file vbacontrol.cxx.
References oox::BinaryStreamBase::alignToBlock(), oox::getFlag(), oox::BinaryStreamBase::isEof(), maControls, oox::BinaryInputStream::readuInt32(), oox::BinaryInputStream::readuInt8(), oox::BinaryStreamBase::seek(), oox::BinaryInputStream::skip(), and oox::BinaryStreamBase::tell().
Referenced by importStorage().
void oox::ole::VbaFormControl::importModelOrStorage | ( | BinaryInputStream & | rInStrm, |
StorageBase & | rStrg, | ||
const AxClassTable & | rClassTable | ||
) |
Imports the model from the passed stream or storage, depending on the control's type.
Imports all embedded controls, if this is a container.
Definition at line 325 of file vbacontrol.cxx.
References importControlModel(), importStorage(), oox::BinaryStreamBase::isEof(), mxSiteModel, oox::StorageBase::openSubStorage(), oox::BinaryStreamBase::seek(), and oox::BinaryStreamBase::tell().
Referenced by importStorage().
|
private |
Imports the site model data containing common properties of the control.
Definition at line 535 of file vbacontrol.cxx.
References mxSiteModel.
|
protected |
Creates and imports the control model, and imports all embedded controls from the passed substorage.
Definition at line 386 of file vbacontrol.cxx.
References oox::ole::API_CONTROL_MULTIPAGE, oox::ole::API_CONTROL_PAGE, oox::ole::API_CONTROL_TABSTRIP, createControlModel(), finalizeEmbeddedControls(), oox::RefVector< ObjType >::forEachMem(), oox::ole::ControlModelBase::getControlType(), oox::ole::AxContainerModelBase::importBinaryModel(), oox::ole::AxContainerModelBase::importClassTable(), importEmbeddedSiteModels(), importModelOrStorage(), oox::ole::AxMultiPageModel::importPageAndMultiPageProperties(), oox::ole::AxContainerModelBase::importProperty(), oox::BinaryStreamBase::isEof(), maClassTable, maControls, oox::ole::AxTabStripModel::maItems, oox::ole::AxMultiPageModel::mnActiveTab, oox::ole::AxMultiPageModel::mnIDs, oox::ole::AxTabStripModel::mnListIndex, oox::ole::AxTabStripModel::mnTabStyle, oox::ole::AxMultiPageModel::mnTabStyle, mxCtrlModel, oox::StorageBase::openInputStream(), and SAL_WARN.
Referenced by oox::ole::VbaUserForm::importForm(), and importModelOrStorage().
|
private |
Moves all embedded controls from their relative position in this control to an absolute position in the parent of this control.
Definition at line 700 of file vbacontrol.cxx.
References aDistance, oox::ole::API_CONTROL_GROUPBOX, convertPointToMm100(), oox::RefVector< ObjType >::forEachMem(), oox::ole::ControlModelBase::getControlType(), oox::ole::AxFontDataModel::getFontHeight(), maControls, moveRelative(), mxCtrlModel, and mxSiteModel.
|
private |
Moves the control relative to its current position by the passed distance.
Definition at line 694 of file vbacontrol.cxx.
References mxSiteModel.
Referenced by moveEmbeddedToAbsoluteParent().
|
private |
Class identifiers for exotic embedded controls.
Definition at line 182 of file vbacontrol.hxx.
Referenced by importStorage().
|
private |
All embedded form controls.
Definition at line 181 of file vbacontrol.hxx.
Referenced by convertProperties(), finalizeEmbeddedControls(), importEmbeddedSiteModels(), importStorage(), and moveEmbeddedToAbsoluteParent().
|
protected |
Specific control properties.
Definition at line 178 of file vbacontrol.hxx.
Referenced by convertProperties(), createAndConvert(), createControlModel(), importControlModel(), oox::ole::VbaUserForm::importForm(), importStorage(), and moveEmbeddedToAbsoluteParent().
|
protected |
Common control properties.
Definition at line 177 of file vbacontrol.hxx.
Referenced by convertProperties(), createAndConvert(), createControlModel(), getControlName(), oox::ole::VbaUserForm::importForm(), importModelOrStorage(), importSiteModel(), moveEmbeddedToAbsoluteParent(), and moveRelative().