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, std::u16string_view 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

◆ ControlConverter()

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

Definition at line 225 of file axcontrol.cxx.

References mxDocModel.

◆ ~ControlConverter()

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

Definition at line 234 of file axcontrol.cxx.

Member Function Documentation

◆ bindToSources()

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 329 of file axcontrol.cxx.

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

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

◆ convertAxBackground()

void oox::ole::ControlConverter::convertAxBackground ( PropertyMap rPropMap,
sal_uInt32  nBackColor,
sal_uInt32  nFlags,
ApiTransparencyMode  eTranspMode 
) const

◆ convertAxBorder()

void oox::ole::ControlConverter::convertAxBorder ( PropertyMap rPropMap,
sal_uInt32  nBorderColor,
sal_Int32  nBorderStyle,
sal_Int32  nSpecialEffect 
) const

◆ convertAxOrientation()

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 555 of file axcontrol.cxx.

References convertOrientation().

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

◆ convertAxPicture() [1/2]

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

◆ convertAxPicture() [2/2]

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

◆ convertAxState()

void oox::ole::ControlConverter::convertAxState ( PropertyMap rPropMap,
std::u16string_view  rValue,
sal_Int32  nMultiSelect,
ApiDefaultStateMode  eDefStateMode,
bool  bAwtModel 
)
static

◆ convertAxVisualEffect()

void oox::ole::ControlConverter::convertAxVisualEffect ( PropertyMap rPropMap,
sal_Int32  nSpecialEffect 
)
static

Converts the Forms 2.0 special effect to UNO properties.

Definition at line 443 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().

◆ convertColor()

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

◆ convertOrientation()

void oox::ole::ControlConverter::convertOrientation ( PropertyMap rPropMap,
bool  bHorizontal 
)
static

Converts the control orientation to UNO properties.

Definition at line 279 of file axcontrol.cxx.

References oox::PropertyMap::setProperty().

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

◆ convertPicture()

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

Converts the passed StdPic picture stream to UNO properties.

Definition at line 269 of file axcontrol.cxx.

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

Referenced by convertAxPicture().

◆ convertPosition()

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 240 of file axcontrol.cxx.

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

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

◆ convertScrollabilitySettings()

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 304 of file axcontrol.cxx.

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

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

◆ convertScrollBar()

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 318 of file axcontrol.cxx.

References oox::PropertyMap::setProperty().

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

◆ convertSize()

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 248 of file axcontrol.cxx.

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

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

◆ convertToAxBorder()

void oox::ole::ControlConverter::convertToAxBorder ( PropertySet const &  rPropSet,
sal_uInt32 &  nBorderColor,
sal_Int32 &  nBorderStyle,
sal_Int32 &  nSpecialEffect 
)
static

◆ convertToAxOrientation()

void oox::ole::ControlConverter::convertToAxOrientation ( PropertySet const &  rPropSet,
sal_Int32 &  nOrientation 
)
static

◆ convertToAxState()

void oox::ole::ControlConverter::convertToAxState ( PropertySet const &  rPropSet,
OUString &  rValue,
sal_Int32 &  nMultiSelect,
ApiDefaultStateMode  eDefStateMode 
)
static

◆ convertToAxVisualEffect()

void oox::ole::ControlConverter::convertToAxVisualEffect ( PropertySet const &  rPropSet,
sal_Int32 &  nSpecialEffect 
)
static

◆ convertToMSColor()

void oox::ole::ControlConverter::convertToMSColor ( PropertySet const &  rPropSet,
sal_Int32  nPropId,
sal_uInt32 &  nOleColor,
sal_uInt32  nDefault = 0 
)
static

◆ convertToMSOrientation()

void oox::ole::ControlConverter::convertToMSOrientation ( PropertySet const &  rPropMap,
bool &  bHorizontal 
)
static

Definition at line 285 of file axcontrol.cxx.

References oox::PropertySet::getProperty().

Referenced by convertToAxOrientation().

◆ convertVerticalAlign()

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

Member Data Documentation

◆ maAddressConverter

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

Definition at line 339 of file axcontrol.hxx.

Referenced by bindToSources().

◆ maRangeConverter

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

Definition at line 340 of file axcontrol.hxx.

Referenced by bindToSources().

◆ mbDefaultColorBgr

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

Definition at line 341 of file axcontrol.hxx.

Referenced by convertColor().

◆ mrGraphicHelper

const GraphicHelper& oox::ole::ControlConverter::mrGraphicHelper
private

◆ mxDocModel

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: