|
LibreOffice Module xmloff (master) 1
|
some kind of opposite to the OAttributeMetaData class. More...
#include <formattributes.hxx>
Classes | |
| struct | AttributeAssignment |
Public Member Functions | |
| OAttribute2Property () | |
| ~OAttribute2Property () | |
| const AttributeAssignment * | getAttributeTranslation (sal_Int32 nAttributeToken) |
| return the AttributeAssignment which corresponds to the given attribute More... | |
| void | addStringProperty (sal_Int32 nAttributeToken, const OUString &_rPropertyName) |
| add an attribute assignment referring to a string property to the map More... | |
| void | addBooleanProperty (sal_Int32 nAttributeToken, const OUString &_rPropertyName, const bool _bAttributeDefault, const bool _bInverseSemantics=false) |
| add an attribute assignment referring to a boolean property to the map More... | |
| void | addInt16Property (sal_Int32 nAttributeToken, const OUString &_rPropertyName) |
| add an attribute assignment referring to an int16 property to the map More... | |
| void | addInt32Property (sal_Int32 nAttributeToken, const OUString &_rPropertyName) |
| add an attribute assignment referring to an int32 property to the map More... | |
| template<typename EnumT > | |
| void | addEnumProperty (sal_Int32 nAttributeToken, const OUString &_rPropertyName, const SvXMLEnumMapEntry< EnumT > *_pValueMap, const css::uno::Type *_pType=nullptr) |
| add an attribute assignment referring to an enum property to the map More... | |
Private Member Functions | |
| void | addEnumPropertyImpl (sal_Int32 nAttributeToken, const OUString &_rPropertyName, const SvXMLEnumMapEntry< sal_uInt16 > *_pValueMap, const css::uno::Type *_pType) |
| AttributeAssignment & | implAdd (sal_Int32 nAttributeToken, const OUString &_rPropertyName, const css::uno::Type &_rType) |
| some common code for the various add*Property methods More... | |
Private Attributes | |
| std::map< sal_Int32, AttributeAssignment > | m_aKnownProperties |
some kind of opposite to the OAttributeMetaData class.
Able to translate attributes into property names/types
The construction of this class is rather expensive (or at least it's initialization from outside), so it should be shared
Definition at line 303 of file formattributes.hxx.
| xmloff::OAttribute2Property::OAttribute2Property | ( | ) |
Definition at line 333 of file formattributes.cxx.
| xmloff::OAttribute2Property::~OAttribute2Property | ( | ) |
Definition at line 337 of file formattributes.cxx.
| void xmloff::OAttribute2Property::addBooleanProperty | ( | sal_Int32 | nAttributeToken, |
| const OUString & | _rPropertyName, | ||
| const bool | _bAttributeDefault, | ||
| const bool | _bInverseSemantics = false |
||
| ) |
add an attribute assignment referring to a boolean property to the map
| _pAttributeName | the name of the attribute |
| _rPropertyName | the name of the property assigned to the attribute |
| _bAttributeDefault | the default value for the attribute. |
| _bInverseSemantics | if <TRUE>, an attribute value of <TRUE> means a property value of <FALSE> and vice verse. if <FALSE>, the attribute value is used as property value directly |
Definition at line 356 of file formattributes.cxx.
References xmloff::OAttribute2Property::AttributeAssignment::bInverseSemantics, and implAdd().
Referenced by xmloff::OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl().
|
inline |
add an attribute assignment referring to an enum property to the map
| _pAttributeName | the name of the attribute |
| _rPropertyName | the name of the property assigned to the attribute |
| _pValueMap | the map to translate strings into enum values |
| _pType | the type of the property. May be NULL, in this case 32bit integer is assumed. |
Definition at line 393 of file formattributes.hxx.
References addEnumPropertyImpl().
Referenced by xmloff::OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl().
|
private |
Definition at line 376 of file formattributes.cxx.
References implAdd(), and xmloff::OAttribute2Property::AttributeAssignment::pEnumMap.
Referenced by addEnumProperty().
| void xmloff::OAttribute2Property::addInt16Property | ( | sal_Int32 | nAttributeToken, |
| const OUString & | _rPropertyName | ||
| ) |
add an attribute assignment referring to an int16 property to the map
| _pAttributeName | the name of the attribute |
| _rPropertyName | the name of the property assigned to the attribute |
Definition at line 364 of file formattributes.cxx.
References implAdd().
Referenced by xmloff::OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl().
| void xmloff::OAttribute2Property::addInt32Property | ( | sal_Int32 | nAttributeToken, |
| const OUString & | _rPropertyName | ||
| ) |
add an attribute assignment referring to an int32 property to the map
| _pAttributeName | the name of the attribute |
| _rPropertyName | the name of the property assigned to the attribute |
Definition at line 370 of file formattributes.cxx.
References implAdd().
Referenced by xmloff::OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl().
| void xmloff::OAttribute2Property::addStringProperty | ( | sal_Int32 | nAttributeToken, |
| const OUString & | _rPropertyName | ||
| ) |
add an attribute assignment referring to a string property to the map
| _pAttributeName | the name of the attribute |
| _rPropertyName | the name of the property assigned to the attribute |
Definition at line 350 of file formattributes.cxx.
References implAdd().
Referenced by xmloff::OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl().
| const OAttribute2Property::AttributeAssignment * xmloff::OAttribute2Property::getAttributeTranslation | ( | sal_Int32 | nAttributeToken | ) |
return the AttributeAssignment which corresponds to the given attribute
Definition at line 341 of file formattributes.cxx.
References m_aKnownProperties, and TOKEN_MASK.
Referenced by xmloff::OPropertyImport::handleAttribute(), and xmloff::ORadioImport::handleAttribute().
|
private |
some common code for the various add*Property methods
Definition at line 386 of file formattributes.cxx.
References xmloff::OAttribute2Property::AttributeAssignment::aPropertyType, m_aKnownProperties, xmloff::OAttribute2Property::AttributeAssignment::sPropertyName, and TOKEN_MASK.
Referenced by addBooleanProperty(), addEnumPropertyImpl(), addInt16Property(), addInt32Property(), and addStringProperty().
|
private |
Definition at line 322 of file formattributes.hxx.
Referenced by getAttributeTranslation(), and implAdd().