LibreOffice Module oox (master) 1
|
A base class with useful helper functions for something that is able to convert ActiveX and ComCtl form controls. More...
#include <axcontrol.hxx>
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 GraphicHelper & | mrGraphicHelper |
PropertySet | maAddressConverter |
PropertySet | maRangeConverter |
bool | mbDefaultColorBgr |
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.
|
explicit |
Definition at line 225 of file axcontrol.cxx.
References mxDocModel.
oox::ole::ControlConverter::~ControlConverter | ( | ) |
Definition at line 234 of file axcontrol.cxx.
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().
void oox::ole::ControlConverter::convertAxBackground | ( | PropertyMap & | rPropMap, |
sal_uInt32 | nBackColor, | ||
sal_uInt32 | nFlags, | ||
ApiTransparencyMode | eTranspMode | ||
) | const |
Converts the Forms 2.0 background formatting to UNO properties.
Definition at line 394 of file axcontrol.cxx.
References oox::ole::AX_FLAGS_OPAQUE, oox::ole::AX_SYSCOLOR_WINDOWBACK, convertColor(), oox::getFlag(), oox::ole::NotSupported, and oox::ole::Void.
Referenced by oox::ole::AxCommandButtonModel::convertProperties(), oox::ole::AxLabelModel::convertProperties(), oox::ole::AxImageModel::convertProperties(), oox::ole::AxToggleButtonModel::convertProperties(), oox::ole::AxCheckBoxModel::convertProperties(), oox::ole::AxOptionButtonModel::convertProperties(), oox::ole::AxTextBoxModel::convertProperties(), oox::ole::AxNumericFieldModel::convertProperties(), oox::ole::AxListBoxModel::convertProperties(), oox::ole::AxComboBoxModel::convertProperties(), oox::ole::AxSpinButtonModel::convertProperties(), and oox::ole::AxScrollBarModel::convertProperties().
void oox::ole::ControlConverter::convertAxBorder | ( | PropertyMap & | rPropMap, |
sal_uInt32 | nBorderColor, | ||
sal_Int32 | nBorderStyle, | ||
sal_Int32 | nSpecialEffect | ||
) | const |
Converts the Forms 2.0 border formatting to UNO properties.
Definition at line 412 of file axcontrol.cxx.
References oox::ole::AX_BORDERSTYLE_SINGLE, oox::ole::AX_SPECIALEFFECT_FLAT, convertColor(), nBorder, PROP_BorderColor, and oox::PropertyMap::setProperty().
Referenced by oox::ole::AxLabelModel::convertProperties(), oox::ole::AxImageModel::convertProperties(), oox::ole::AxTextBoxModel::convertProperties(), oox::ole::AxNumericFieldModel::convertProperties(), oox::ole::AxListBoxModel::convertProperties(), and oox::ole::AxComboBoxModel::convertProperties().
|
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().
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().
void oox::ole::ControlConverter::convertAxPicture | ( | PropertyMap & | rPropMap, |
const StreamDataSequence & | rPicData, | ||
sal_uInt32 | nPicPos | ||
) | const |
Converts the passed picture stream and Forms 2.0 position to UNO properties.
Definition at line 458 of file axcontrol.cxx.
References convertPicture(), and oox::PropertyMap::setProperty().
Referenced by oox::ole::AxCommandButtonModel::convertProperties(), oox::ole::AxImageModel::convertProperties(), oox::ole::AxToggleButtonModel::convertProperties(), oox::ole::AxCheckBoxModel::convertProperties(), oox::ole::AxOptionButtonModel::convertProperties(), and oox::ole::AxUserFormModel::convertProperties().
|
static |
Converts the Forms 2.0 value for checked/unchecked/dontknow to UNO properties.
Definition at line 503 of file axcontrol.cxx.
References oox::ole::API_DEFAULTSTATE_BOOLEAN, oox::ole::API_DEFAULTSTATE_TRISTATE, oox::ole::AX_SELECTION_MULTI, nState, and oox::PropertyMap::setProperty().
Referenced by oox::ole::AxToggleButtonModel::convertProperties(), oox::ole::AxCheckBoxModel::convertProperties(), and oox::ole::AxOptionButtonModel::convertProperties().
|
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().
void oox::ole::ControlConverter::convertColor | ( | PropertyMap & | rPropMap, |
sal_Int32 | nPropId, | ||
sal_uInt32 | nOleColor | ||
) | const |
Converts the passed encoded OLE color to UNO properties.
Definition at line 256 of file axcontrol.cxx.
References oox::ole::OleHelper::decodeOleColor(), mbDefaultColorBgr, mrGraphicHelper, and oox::PropertyMap::setProperty().
Referenced by convertAxBackground(), convertAxBorder(), oox::ole::AxCommandButtonModel::convertProperties(), oox::ole::AxLabelModel::convertProperties(), oox::ole::AxMorphDataModelBase::convertProperties(), oox::ole::AxSpinButtonModel::convertProperties(), oox::ole::AxScrollBarModel::convertProperties(), oox::ole::AxContainerModelBase::convertProperties(), oox::ole::AxPageModel::convertProperties(), oox::ole::AxMultiPageModel::convertProperties(), and oox::ole::AxUserFormModel::convertProperties().
|
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().
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().
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().
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().
|
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().
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().
|
static |
Definition at line 421 of file axcontrol.cxx.
References oox::ole::AX_BORDERSTYLE_NONE, oox::ole::AX_BORDERSTYLE_SINGLE, oox::ole::AX_SPECIALEFFECT_FLAT, oox::ole::AX_SPECIALEFFECT_SUNKEN, convertToMSColor(), oox::PropertySet::getProperty(), nBorder, and PROP_BorderColor.
Referenced by oox::ole::AxLabelModel::convertFromProperties(), oox::ole::AxTextBoxModel::convertFromProperties(), oox::ole::AxNumericFieldModel::convertFromProperties(), oox::ole::AxListBoxModel::convertFromProperties(), and oox::ole::AxComboBoxModel::convertFromProperties().
|
static |
Definition at line 569 of file axcontrol.cxx.
References convertToMSOrientation().
Referenced by oox::ole::AxSpinButtonModel::convertFromProperties(), and oox::ole::AxScrollBarModel::convertFromProperties().
|
static |
Definition at line 528 of file axcontrol.cxx.
References oox::ole::API_DEFAULTSTATE_TRISTATE, oox::ole::AX_SELECTION_MULTI, oox::PropertySet::getProperty(), and nState.
Referenced by oox::ole::AxToggleButtonModel::convertFromProperties(), oox::ole::AxCheckBoxModel::convertFromProperties(), and oox::ole::AxOptionButtonModel::convertFromProperties().
|
static |
Definition at line 449 of file axcontrol.cxx.
References oox::ole::AX_SPECIALEFFECT_FLAT, oox::ole::AX_SPECIALEFFECT_RAISED, and oox::PropertySet::getProperty().
Referenced by oox::ole::AxCheckBoxModel::convertFromProperties(), and oox::ole::AxOptionButtonModel::convertFromProperties().
|
static |
Definition at line 261 of file axcontrol.cxx.
References oox::ole::OleHelper::encodeOleColor(), and oox::PropertySet::getProperty().
Referenced by oox::ole::AxCommandButtonModel::convertFromProperties(), oox::ole::AxLabelModel::convertFromProperties(), oox::ole::AxToggleButtonModel::convertFromProperties(), oox::ole::AxCheckBoxModel::convertFromProperties(), oox::ole::AxOptionButtonModel::convertFromProperties(), oox::ole::AxTextBoxModel::convertFromProperties(), oox::ole::AxNumericFieldModel::convertFromProperties(), oox::ole::AxListBoxModel::convertFromProperties(), oox::ole::AxComboBoxModel::convertFromProperties(), oox::ole::AxSpinButtonModel::convertFromProperties(), oox::ole::AxScrollBarModel::convertFromProperties(), and convertToAxBorder().
|
static |
Definition at line 285 of file axcontrol.cxx.
References oox::PropertySet::getProperty().
Referenced by convertToAxOrientation().
|
static |
Converts the vertical alignment to UNO properties.
Definition at line 292 of file axcontrol.cxx.
References oox::PropertyMap::setProperty().
Referenced by oox::ole::AxCommandButtonModel::convertProperties(), oox::ole::AxLabelModel::convertProperties(), oox::ole::AxToggleButtonModel::convertProperties(), oox::ole::AxCheckBoxModel::convertProperties(), and oox::ole::AxOptionButtonModel::convertProperties().
|
mutableprivate |
Definition at line 339 of file axcontrol.hxx.
Referenced by bindToSources().
|
mutableprivate |
Definition at line 340 of file axcontrol.hxx.
Referenced by bindToSources().
|
private |
Definition at line 341 of file axcontrol.hxx.
Referenced by convertColor().
|
private |
Definition at line 338 of file axcontrol.hxx.
Referenced by convertColor(), convertPicture(), convertPosition(), convertScrollabilitySettings(), and convertSize().
|
private |
Definition at line 337 of file axcontrol.hxx.
Referenced by bindToSources(), and ControlConverter().