LibreOffice Module oox (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
oox::ole::VbaFormControl Class Reference

A control that is embedded in a VBA user form or in another container control in a VBA user form. More...

#include <vbacontrol.hxx>

Inheritance diagram for oox::ole::VbaFormControl:
[legend]
Collaboration diagram for oox::ole::VbaFormControl:
[legend]

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< VbaFormControlVbaFormControlVector
 
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...
 

Detailed Description

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.

Member Typedef Documentation

◆ VbaFormControlRef

Definition at line 155 of file vbacontrol.hxx.

◆ VbaFormControlVector

Definition at line 154 of file vbacontrol.hxx.

Constructor & Destructor Documentation

◆ VbaFormControl()

oox::ole::VbaFormControl::VbaFormControl ( )
explicit

Definition at line 317 of file vbacontrol.cxx.

◆ ~VbaFormControl()

oox::ole::VbaFormControl::~VbaFormControl ( )
virtual

Definition at line 321 of file vbacontrol.cxx.

Member Function Documentation

◆ compareByTabIndex()

bool oox::ole::VbaFormControl::compareByTabIndex ( const VbaFormControlRef rxLeft,
const VbaFormControlRef rxRight 
)
staticprivate

Functor for comparing controls by their tab index.

Definition at line 721 of file vbacontrol.cxx.

References SAL_MAX_INT32.

Referenced by finalizeEmbeddedControls().

◆ convertProperties()

bool oox::ole::VbaFormControl::convertProperties ( const css::uno::Reference< css::awt::XControlModel > &  rxCtrlModel,
const ControlConverter rConv,
sal_Int32  nCtrlIndex 
) const
protected

◆ createAndConvert()

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().

◆ createControlModel()

void oox::ole::VbaFormControl::createControlModel ( const AxClassTable rClassTable)
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().

◆ finalizeEmbeddedControls()

void oox::ole::VbaFormControl::finalizeEmbeddedControls ( )
private

◆ getControlName()

OUString oox::ole::VbaFormControl::getControlName ( ) const

Returns the programmatical name of the control.

Definition at line 345 of file vbacontrol.cxx.

References mxSiteModel.

◆ importControlModel()

void oox::ole::VbaFormControl::importControlModel ( BinaryInputStream rInStrm,
const AxClassTable rClassTable 
)
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().

◆ importEmbeddedSiteModels()

void oox::ole::VbaFormControl::importEmbeddedSiteModels ( BinaryInputStream rInStrm)
private

◆ importModelOrStorage()

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().

◆ importSiteModel()

bool oox::ole::VbaFormControl::importSiteModel ( BinaryInputStream rInStrm)
private

Imports the site model data containing common properties of the control.

Definition at line 535 of file vbacontrol.cxx.

References mxSiteModel.

◆ importStorage()

void oox::ole::VbaFormControl::importStorage ( StorageBase rStrg,
const AxClassTable rClassTable 
)
protected

◆ moveEmbeddedToAbsoluteParent()

void oox::ole::VbaFormControl::moveEmbeddedToAbsoluteParent ( )
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.

◆ moveRelative()

void oox::ole::VbaFormControl::moveRelative ( const AxPairData rDistance)
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().

Member Data Documentation

◆ maClassTable

AxClassTable oox::ole::VbaFormControl::maClassTable
private

Class identifiers for exotic embedded controls.

Definition at line 182 of file vbacontrol.hxx.

Referenced by importStorage().

◆ maControls

VbaFormControlVector oox::ole::VbaFormControl::maControls
private

◆ mxCtrlModel

ControlModelRef oox::ole::VbaFormControl::mxCtrlModel
protected

◆ mxSiteModel

VbaSiteModelRef oox::ole::VbaFormControl::mxSiteModel
protected

The documentation for this class was generated from the following files: