LibreOffice Module oox (master)  1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
oox::ole::ControlConverter Class Referencefinal

A base class with useful helper functions for something that is able to convert ActiveX and ComCtl form controls. More...

#include <axcontrol.hxx>

Collaboration diagram for oox::ole::ControlConverter:
[legend]

Public Member Functions

 ControlConverter (const css::uno::Reference< css::frame::XModel > &rxDocModel, const GraphicHelper &rGraphicHelper, bool bDefaultColorBgr=true)
 
 ~ControlConverter ()
 
void convertPosition (PropertyMap &rPropMap, const AxPairData &rPos) const
 Converts the passed position in 1/100 mm to UNO properties. More...
 
void convertSize (PropertyMap &rPropMap, const AxPairData &rSize) const
 Converts the passed size in 1/100 mm to UNO properties. More...
 
void convertColor (PropertyMap &rPropMap, sal_Int32 nPropId, sal_uInt32 nOleColor) const
 Converts the passed encoded OLE color to UNO properties. More...
 
void convertPicture (PropertyMap &rPropMap, const StreamDataSequence &rPicData) const
 Converts the passed StdPic picture stream to UNO properties. More...
 
void convertScrollabilitySettings (PropertyMap &rPropMap, const AxPairData &rScrollPos, const AxPairData &rScrollArea, sal_Int32 nScrollBars) const
 Converts scrollability settings to UNO properties. More...
 
void bindToSources (const css::uno::Reference< css::awt::XControlModel > &rxCtrlModel, const OUString &rCtrlSource, const OUString &rRowSource, sal_Int32 nRefSheet=0) const
 Binds the passed control model to the passed data sources. More...
 
void convertAxBackground (PropertyMap &rPropMap, sal_uInt32 nBackColor, sal_uInt32 nFlags, ApiTransparencyMode eTranspMode) const
 Converts the Forms 2.0 background formatting to UNO properties. More...
 
void convertAxBorder (PropertyMap &rPropMap, sal_uInt32 nBorderColor, sal_Int32 nBorderStyle, sal_Int32 nSpecialEffect) const
 Converts the Forms 2.0 border formatting to UNO properties. More...
 
void convertAxPicture (PropertyMap &rPropMap, const StreamDataSequence &rPicData, sal_uInt32 nPicPos) const
 Converts the passed picture stream and Forms 2.0 position to UNO properties. More...
 
void convertAxPicture (PropertyMap &rPropMap, const StreamDataSequence &rPicData, sal_Int32 nPicSizeMode) const
 Converts the passed picture stream and Forms 2.0 position to UNO properties. More...
 

Static Public Member Functions

static void convertToMSColor (PropertySet const &rPropSet, sal_Int32 nPropId, sal_uInt32 &nOleColor, sal_uInt32 nDefault=0)
 
static void convertOrientation (PropertyMap &rPropMap, bool bHorizontal)
 Converts the control orientation to UNO properties. More...
 
static void convertToMSOrientation (PropertySet const &rPropMap, bool &bHorizontal)
 
static void convertVerticalAlign (PropertyMap &rPropMap, sal_Int32 nVerticalAlign)
 Converts the vertical alignment to UNO properties. More...
 
static void convertScrollBar (PropertyMap &rPropMap, sal_Int32 nMin, sal_Int32 nMax, sal_Int32 nPosition, sal_Int32 nSmallChange, sal_Int32 nLargeChange, bool bAwtModel)
 Converts common scrollbar settings to UNO properties. More...
 
static void convertToAxBorder (PropertySet const &rPropSet, sal_uInt32 &nBorderColor, sal_Int32 &nBorderStyle, sal_Int32 &nSpecialEffect)
 
static void convertAxVisualEffect (PropertyMap &rPropMap, sal_Int32 nSpecialEffect)
 Converts the Forms 2.0 special effect to UNO properties. More...
 
static void convertToAxVisualEffect (PropertySet const &rPropSet, sal_Int32 &nSpecialEffect)
 
static void convertAxState (PropertyMap &rPropMap, const OUString &rValue, sal_Int32 nMultiSelect, ApiDefaultStateMode eDefStateMode, bool bAwtModel)
 Converts the Forms 2.0 value for checked/unchecked/dontknow to UNO properties. More...
 
static void convertToAxState (PropertySet const &rPropSet, OUString &rValue, sal_Int32 &nMultiSelect, ApiDefaultStateMode eDefStateMode)
 
static void convertAxOrientation (PropertyMap &rPropMap, const AxPairData &rSize, sal_Int32 nOrientation)
 Converts the Forms 2.0 control orientation to UNO properties. More...
 
static void convertToAxOrientation (PropertySet const &rPropSet, sal_Int32 &nOrientation)
 

Private Attributes

css::uno::Reference< css::frame::XModel > mxDocModel
 
const GraphicHelpermrGraphicHelper
 
PropertySet maAddressConverter
 
PropertySet maRangeConverter
 
bool mbDefaultColorBgr
 

Detailed Description

A base class with useful helper functions for something that is able to convert ActiveX and ComCtl form controls.

Definition at line 193 of file axcontrol.hxx.

Constructor & Destructor Documentation

oox::ole::ControlConverter::ControlConverter ( const css::uno::Reference< css::frame::XModel > &  rxDocModel,
const GraphicHelper rGraphicHelper,
bool  bDefaultColorBgr = true 
)
explicit

Definition at line 223 of file axcontrol.cxx.

References mxDocModel.

oox::ole::ControlConverter::~ControlConverter ( )

Definition at line 232 of file axcontrol.cxx.

Member Function Documentation

void oox::ole::ControlConverter::bindToSources ( const css::uno::Reference< css::awt::XControlModel > &  rxCtrlModel,
const OUString &  rCtrlSource,
const OUString &  rRowSource,
sal_Int32  nRefSheet = 0 
) const

Binds the passed control model to the passed data sources.

The implementation will check which source types are supported.

Definition at line 327 of file axcontrol.cxx.

References Any, Exception, oox::PropertySet::getProperty(), maAddressConverter, maRangeConverter, mxDocModel, and TOOLS_WARN_EXCEPTION.

Referenced by oox::ole::VbaFormControl::convertProperties().

void oox::ole::ControlConverter::convertAxBackground ( PropertyMap rPropMap,
sal_uInt32  nBackColor,
sal_uInt32  nFlags,
ApiTransparencyMode  eTranspMode 
) const
void oox::ole::ControlConverter::convertAxBorder ( PropertyMap rPropMap,
sal_uInt32  nBorderColor,
sal_Int32  nBorderStyle,
sal_Int32  nSpecialEffect 
) const
void oox::ole::ControlConverter::convertAxOrientation ( PropertyMap rPropMap,
const AxPairData rSize,
sal_Int32  nOrientation 
)
static

Converts the Forms 2.0 control orientation to UNO properties.

Definition at line 553 of file axcontrol.cxx.

References convertOrientation().

Referenced by oox::ole::AxSpinButtonModel::convertProperties(), and oox::ole::AxScrollBarModel::convertProperties().

void oox::ole::ControlConverter::convertAxPicture ( PropertyMap rPropMap,
const StreamDataSequence rPicData,
sal_uInt32  nPicPos 
) const
void oox::ole::ControlConverter::convertAxPicture ( PropertyMap rPropMap,
const StreamDataSequence rPicData,
sal_Int32  nPicSizeMode 
) const

Converts the passed picture stream and Forms 2.0 position to UNO properties.

Definition at line 483 of file axcontrol.cxx.

References oox::ole::AX_PICSIZE_CLIP, oox::ole::AX_PICSIZE_STRETCH, oox::ole::AX_PICSIZE_ZOOM, convertPicture(), and oox::PropertyMap::setProperty().

void oox::ole::ControlConverter::convertAxState ( PropertyMap rPropMap,
const OUString &  rValue,
sal_Int32  nMultiSelect,
ApiDefaultStateMode  eDefStateMode,
bool  bAwtModel 
)
static
void oox::ole::ControlConverter::convertAxVisualEffect ( PropertyMap rPropMap,
sal_Int32  nSpecialEffect 
)
static

Converts the Forms 2.0 special effect to UNO properties.

Definition at line 441 of file axcontrol.cxx.

References oox::ole::AX_SPECIALEFFECT_FLAT, and oox::PropertyMap::setProperty().

Referenced by oox::ole::AxCheckBoxModel::convertProperties(), and oox::ole::AxOptionButtonModel::convertProperties().

void oox::ole::ControlConverter::convertColor ( PropertyMap rPropMap,
sal_Int32  nPropId,
sal_uInt32  nOleColor 
) const
void oox::ole::ControlConverter::convertOrientation ( PropertyMap rPropMap,
bool  bHorizontal 
)
static

Converts the control orientation to UNO properties.

Definition at line 277 of file axcontrol.cxx.

References oox::PropertyMap::setProperty().

Referenced by convertAxOrientation(), and oox::ole::ComCtlScrollBarModel::convertProperties().

void oox::ole::ControlConverter::convertPicture ( PropertyMap rPropMap,
const StreamDataSequence rPicData 
) const

Converts the passed StdPic picture stream to UNO properties.

Definition at line 267 of file axcontrol.cxx.

References oox::GraphicHelper::importGraphic(), mrGraphicHelper, and oox::PropertyMap::setProperty().

Referenced by convertAxPicture().

void oox::ole::ControlConverter::convertPosition ( PropertyMap rPropMap,
const AxPairData rPos 
) const

Converts the passed position in 1/100 mm to UNO properties.

Definition at line 238 of file axcontrol.cxx.

References oox::GraphicHelper::convertHmmToAppFont(), mrGraphicHelper, and oox::PropertyMap::setProperty().

Referenced by oox::ole::VbaSiteModel::convertProperties().

void oox::ole::ControlConverter::convertScrollabilitySettings ( PropertyMap rPropMap,
const AxPairData rScrollPos,
const AxPairData rScrollArea,
sal_Int32  nScrollBars 
) const

Converts scrollability settings to UNO properties.

Definition at line 302 of file axcontrol.cxx.

References oox::GraphicHelper::convertHmmToAppFont(), mrGraphicHelper, and oox::PropertyMap::setProperty().

Referenced by oox::ole::AxUserFormModel::convertProperties().

void oox::ole::ControlConverter::convertScrollBar ( PropertyMap rPropMap,
sal_Int32  nMin,
sal_Int32  nMax,
sal_Int32  nPosition,
sal_Int32  nSmallChange,
sal_Int32  nLargeChange,
bool  bAwtModel 
)
static

Converts common scrollbar settings to UNO properties.

Definition at line 316 of file axcontrol.cxx.

References oox::PropertyMap::setProperty().

Referenced by oox::ole::ComCtlScrollBarModel::convertProperties(), and oox::ole::AxScrollBarModel::convertProperties().

void oox::ole::ControlConverter::convertSize ( PropertyMap rPropMap,
const AxPairData rSize 
) const

Converts the passed size in 1/100 mm to UNO properties.

Definition at line 246 of file axcontrol.cxx.

References oox::GraphicHelper::convertHmmToAppFont(), mrGraphicHelper, and oox::PropertyMap::setProperty().

Referenced by oox::ole::ControlModelBase::convertSize().

void oox::ole::ControlConverter::convertToAxBorder ( PropertySet const &  rPropSet,
sal_uInt32 &  nBorderColor,
sal_Int32 &  nBorderStyle,
sal_Int32 &  nSpecialEffect 
)
static
void oox::ole::ControlConverter::convertToAxOrientation ( PropertySet const &  rPropSet,
sal_Int32 &  nOrientation 
)
static
void oox::ole::ControlConverter::convertToAxState ( PropertySet const &  rPropSet,
OUString &  rValue,
sal_Int32 &  nMultiSelect,
ApiDefaultStateMode  eDefStateMode 
)
static
void oox::ole::ControlConverter::convertToAxVisualEffect ( PropertySet const &  rPropSet,
sal_Int32 &  nSpecialEffect 
)
static
void oox::ole::ControlConverter::convertToMSColor ( PropertySet const &  rPropSet,
sal_Int32  nPropId,
sal_uInt32 &  nOleColor,
sal_uInt32  nDefault = 0 
)
static
void oox::ole::ControlConverter::convertToMSOrientation ( PropertySet const &  rPropMap,
bool &  bHorizontal 
)
static

Definition at line 283 of file axcontrol.cxx.

References oox::PropertySet::getProperty().

Referenced by convertToAxOrientation().

void oox::ole::ControlConverter::convertVerticalAlign ( PropertyMap rPropMap,
sal_Int32  nVerticalAlign 
)
static

Member Data Documentation

PropertySet oox::ole::ControlConverter::maAddressConverter
mutableprivate

Definition at line 339 of file axcontrol.hxx.

Referenced by bindToSources().

PropertySet oox::ole::ControlConverter::maRangeConverter
mutableprivate

Definition at line 340 of file axcontrol.hxx.

Referenced by bindToSources().

bool oox::ole::ControlConverter::mbDefaultColorBgr
private

Definition at line 341 of file axcontrol.hxx.

Referenced by convertColor().

const GraphicHelper& oox::ole::ControlConverter::mrGraphicHelper
private
css::uno::Reference< css::frame::XModel > oox::ole::ControlConverter::mxDocModel
private

Definition at line 337 of file axcontrol.hxx.

Referenced by bindToSources(), and ControlConverter().


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