LibreOffice Module oox (master)  1
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | List of all members
oox::PropertyMap Class Reference

A helper that maps property identifiers to property values. More...

#include <propertymap.hxx>

Inheritance diagram for oox::PropertyMap:
[legend]

Public Member Functions

 PropertyMap ()
 
bool hasProperty (sal_Int32 nPropId) const
 Returns true, if the map contains a property with the passed identifier. More...
 
bool setAnyProperty (sal_Int32 nPropId, const css::uno::Any &rValue)
 Sets the specified property to the passed value. More...
 
template<typename Type >
bool setProperty (sal_Int32 nPropId, Type &&rValue)
 Sets the specified property to the passed value. More...
 
bool setProperty (sal_Int32, const css::uno::Any &)=delete
 setAnyProperty should be used More...
 
css::uno::Any getProperty (sal_Int32 nPropId)
 
void erase (sal_Int32 nPropId)
 
bool empty () const
 
void assignUsed (const PropertyMap &rPropMap)
 Inserts all properties contained in the passed property map. More...
 
void assignAll (const PropertyMap &rPropMap)
 Inserts all properties contained in the passed property map. More...
 
css::uno::Sequence< css::beans::PropertyValue > makePropertyValueSequence () const
 Returns a sequence of property values, filled with all contained properties. More...
 
void fillSequences (css::uno::Sequence< OUString > &rNames, css::uno::Sequence< css::uno::Any > &rValues) const
 Fills the passed sequences of names and anys with all contained properties. More...
 
void fillPropertyNameMap (PropertyNameMap &rMap) const
 
css::uno::Reference< css::beans::XPropertySetmakePropertySet () const
 Creates a property set supporting the XPropertySet interface and inserts all properties. More...
 

Static Public Member Functions

static const OUString & getPropertyName (sal_Int32 nPropId)
 Returns the name of the passed property identifier. More...
 
static void dump (const css::uno::Reference< css::beans::XPropertySet > &rXPropSet)
 
static void dumpCode (const css::uno::Reference< css::beans::XPropertySet > &rXPropSet)
 
static void dumpData (const css::uno::Reference< css::beans::XPropertySet > &rXPropSet)
 

Protected Attributes

std::map< sal_Int32, css::uno::Any > maProperties
 

Private Attributes

const std::vector< OUString > * mpPropNames
 

Detailed Description

A helper that maps property identifiers to property values.

The property identifiers are generated on compile time and refer to the property name strings that are held by a static vector. The identifier to name mapping is done internally while the properties are written to property sets.

Definition at line 51 of file propertymap.hxx.

Constructor & Destructor Documentation

oox::PropertyMap::PropertyMap ( )

Definition at line 182 of file propertymap.cxx.

Member Function Documentation

void oox::PropertyMap::assignAll ( const PropertyMap rPropMap)

Inserts all properties contained in the passed property map.

Definition at line 227 of file propertymap.cxx.

References maProperties.

Referenced by oox::drawingml::TextParagraphProperties::apply().

void oox::PropertyMap::assignUsed ( const PropertyMap rPropMap)

Inserts all properties contained in the passed property map.

Definition at line 216 of file propertymap.cxx.

References maProperties.

Referenced by oox::drawingml::TextCharacterProperties::assignUsed().

void oox::PropertyMap::dump ( const css::uno::Reference< css::beans::XPropertySet > &  rXPropSet)
static
void oox::PropertyMap::dumpCode ( const css::uno::Reference< css::beans::XPropertySet > &  rXPropSet)
static
void oox::PropertyMap::dumpData ( const css::uno::Reference< css::beans::XPropertySet > &  rXPropSet)
static
bool oox::PropertyMap::empty ( ) const
void oox::PropertyMap::erase ( sal_Int32  nPropId)

Definition at line 206 of file propertymap.cxx.

References maProperties.

void oox::PropertyMap::fillPropertyNameMap ( PropertyNameMap rMap) const

Definition at line 267 of file propertymap.cxx.

References maProperties, and mpPropNames.

void oox::PropertyMap::fillSequences ( css::uno::Sequence< OUString > &  rNames,
css::uno::Sequence< css::uno::Any > &  rValues 
) const

Fills the passed sequences of names and anys with all contained properties.

Definition at line 248 of file propertymap.cxx.

References Any, maProperties, and pValues.

Referenced by oox::PropertySet::setProperties().

Any oox::PropertyMap::getProperty ( sal_Int32  nPropId)
const OUString & oox::PropertyMap::getPropertyName ( sal_Int32  nPropId)
static
bool oox::PropertyMap::hasProperty ( sal_Int32  nPropId) const
Reference< XPropertySet > oox::PropertyMap::makePropertySet ( ) const

Creates a property set supporting the XPropertySet interface and inserts all properties.

Definition at line 275 of file propertymap.cxx.

Referenced by oox::drawingml::CustomShapeProperties::pushToPropSet().

Sequence< PropertyValue > oox::PropertyMap::makePropertyValueSequence ( ) const

Returns a sequence of property values, filled with all contained properties.

Definition at line 233 of file propertymap.cxx.

References aSeq, maProperties, and pValues.

Referenced by oox::drawingml::TextParagraphProperties::pushToPropSet(), and oox::drawingml::CustomShapeProperties::pushToPropSet().

bool oox::PropertyMap::setAnyProperty ( sal_Int32  nPropId,
const css::uno::Any &  rValue 
)

Sets the specified property to the passed value.

Does nothing, if the identifier is invalid.

Definition at line 192 of file propertymap.cxx.

References maProperties.

Referenced by oox::drawingml::BulletList::pushToPropMap().

template<typename Type >
bool oox::PropertyMap::setProperty ( sal_Int32  nPropId,
Type &&  rValue 
)
inline

Sets the specified property to the passed value.

Does nothing, if the identifier is invalid.

Definition at line 69 of file propertymap.hxx.

References maProperties.

Referenced by oox::drawingml::TextBody::ApplyStyleEmpty(), oox::ole::ControlConverter::convertAxBorder(), oox::ole::ControlConverter::convertAxPicture(), oox::ole::ControlConverter::convertAxState(), oox::ole::ControlConverter::convertAxVisualEffect(), oox::ole::ControlConverter::convertColor(), oox::ole::ControlConverter::convertOrientation(), oox::ole::ControlConverter::convertPicture(), oox::ole::ControlConverter::convertPosition(), oox::ole::VbaSiteModel::convertProperties(), oox::ole::ComCtlModelBase::convertProperties(), oox::ole::ComCtlScrollBarModel::convertProperties(), oox::ole::ComCtlProgressBarModel::convertProperties(), oox::ole::AxFontDataModel::convertProperties(), oox::ole::AxCommandButtonModel::convertProperties(), oox::ole::AxLabelModel::convertProperties(), oox::ole::AxImageModel::convertProperties(), oox::ole::AxMorphDataModelBase::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(), oox::ole::AxScrollBarModel::convertProperties(), oox::ole::AxFrameModel::convertProperties(), oox::ole::AxPageModel::convertProperties(), oox::ole::AxMultiPageModel::convertProperties(), oox::ole::AxUserFormModel::convertProperties(), oox::ole::HtmlSelectModel::convertProperties(), oox::ole::EmbeddedControl::convertProperties(), oox::ole::ControlConverter::convertScrollabilitySettings(), oox::ole::ControlConverter::convertScrollBar(), oox::ole::ControlConverter::convertSize(), oox::ole::ControlConverter::convertVerticalAlign(), oox::drawingml::Shape::createAndInsert(), oox::drawingml::Shape::finalizeServiceName(), oox::drawingml::HyperLinkContext::HyperLinkContext(), oox::ole::OleObjectHelper::importOleObject(), oox::drawingml::CustomShapeProperties::initializePresetDataMap(), oox::drawingml::TextParagraph::insertAt(), oox::drawingml::HyperLinkContext::onCreateContext(), oox::ppt::PPTShapePropertiesContext::onCreateContext(), oox::drawingml::TextBodyPropertiesContext::onCreateContext(), oox::ppt::SoundActionContext::onEndElement(), oox::drawingml::TextBodyProperties::pushRotationAdjustments(), oox::drawingml::BulletList::pushToPropMap(), oox::drawingml::GraphicProperties::pushToPropMap(), oox::drawingml::TextCharacterProperties::pushToPropMap(), oox::drawingml::EffectProperties::pushToPropMap(), oox::drawingml::TextParagraphProperties::pushToPropSet(), oox::drawingml::CustomShapeProperties::pushToPropSet(), oox::drawingml::TextBodyProperties::pushVertSimulation(), oox::ole::MSConvertOCXControls::ReadOCXStorage(), oox::drawingml::Shape::setDefaults(), oox::ppt::SlideTransition::setSlideProperties(), and oox::drawingml::TextParagraphPropertiesContext::~TextParagraphPropertiesContext().

bool oox::PropertyMap::setProperty ( sal_Int32  ,
const css::uno::Any &   
)
delete

setAnyProperty should be used

Member Data Documentation

std::map< sal_Int32, css::uno::Any > oox::PropertyMap::maProperties
protected
const std::vector<OUString>* oox::PropertyMap::mpPropNames
private

Definition at line 116 of file propertymap.hxx.

Referenced by fillPropertyNameMap().


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