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

Definition at line 155 of file vbacontrol.hxx.

Definition at line 154 of file vbacontrol.hxx.

Constructor & Destructor Documentation

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

Definition at line 318 of file vbacontrol.cxx.

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

Definition at line 322 of file vbacontrol.cxx.

Member Function Documentation

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

Functor for comparing controls by their tab index.

Definition at line 718 of file vbacontrol.cxx.

References SAL_MAX_INT32.

Referenced by finalizeEmbeddedControls().

bool oox::ole::VbaFormControl::convertProperties ( const css::uno::Reference< css::awt::XControlModel > &  rxCtrlModel,
const ControlConverter rConv,
sal_Int32  nCtrlIndex 
) const
protected
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 351 of file vbacontrol.cxx.

References Any, convertProperties(), Exception, oox::ContainerHelper::insertByName(), mxCtrlModel, and mxSiteModel.

Referenced by convertProperties().

void oox::ole::VbaFormControl::createControlModel ( const AxClassTable rClassTable)
private

Creates the control model according to the current site model.

Definition at line 525 of file vbacontrol.cxx.

References mxCtrlModel, and mxSiteModel.

Referenced by importControlModel(), and importStorage().

void oox::ole::VbaFormControl::finalizeEmbeddedControls ( )
private
OUString oox::ole::VbaFormControl::getControlName ( ) const

Returns the programmatical name of the control.

Definition at line 346 of file vbacontrol.cxx.

References mxSiteModel.

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 380 of file vbacontrol.cxx.

References createControlModel(), and mxCtrlModel.

Referenced by importModelOrStorage().

void oox::ole::VbaFormControl::importEmbeddedSiteModels ( BinaryInputStream rInStrm)
private
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 326 of file vbacontrol.cxx.

References importControlModel(), importStorage(), oox::BinaryStreamBase::isEof(), mxSiteModel, oox::StorageBase::openSubStorage(), oox::BinaryStreamBase::seek(), and oox::BinaryStreamBase::tell().

Referenced by importStorage().

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

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

Definition at line 532 of file vbacontrol.cxx.

References mxSiteModel.

void oox::ole::VbaFormControl::importStorage ( StorageBase rStrg,
const AxClassTable rClassTable 
)
protected
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 697 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.

void oox::ole::VbaFormControl::moveRelative ( const AxPairData rDistance)
private

Moves the control relative to its current position by the passed distance.

Definition at line 691 of file vbacontrol.cxx.

References mxSiteModel.

Referenced by moveEmbeddedToAbsoluteParent().

Member Data Documentation

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

Class identifiers for exotic embedded controls.

Definition at line 182 of file vbacontrol.hxx.

Referenced by importStorage().

VbaFormControlVector oox::ole::VbaFormControl::maControls
private
ControlModelRef oox::ole::VbaFormControl::mxCtrlModel
protected
VbaSiteModelRef oox::ole::VbaFormControl::mxSiteModel
protected

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