LibreOffice Module oox (master) 1
|
A helper that maps property identifiers to property values. More...
#include <propertymap.hxx>
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::XPropertySet > | makePropertySet () 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 sal_Int32 | getPropertyId (std::u16string_view sPropName) |
Returns the property identifier of the passed name. 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) |
Private Attributes | |
const std::vector< OUString > * | mpPropNames |
std::map< sal_Int32, css::uno::Any > | maProperties |
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.
oox::PropertyMap::PropertyMap | ( | ) |
Definition at line 179 of file propertymap.cxx.
void oox::PropertyMap::assignAll | ( | const PropertyMap & | rPropMap | ) |
Inserts all properties contained in the passed property map.
Definition at line 240 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 213 of file propertymap.cxx.
References maProperties.
Referenced by oox::drawingml::TextCharacterProperties::assignUsed(), and oox::drawingml::Shape::createAndInsert().
|
static |
Definition at line 457 of file propertymap.cxx.
References Exception, oox::lclDumpAnyValue(), name, OUStringToOString(), Property, properties::props, SAL_INFO, and USS.
Referenced by oox::PropertySet::dump().
|
static |
Definition at line 908 of file propertymap.cxx.
References Exception, oox::lclDumpAnyValueCode(), name, OUStringToOString(), oox::printLevel(), Property, properties::props, sType, u, and USS.
Referenced by oox::drawingml::CustomShapeProperties::pushToPropSet().
|
static |
Definition at line 937 of file propertymap.cxx.
References comphelper::anyToString(), aProperties, and Property.
Referenced by oox::drawingml::CustomShapeProperties::pushToPropSet().
bool oox::PropertyMap::empty | ( | ) | const |
Definition at line 208 of file propertymap.cxx.
References maProperties.
Referenced by oox::drawingml::TextRun::insertAt(), oox::drawingml::TextParagraphProperties::pushToPropSet(), and oox::PropertySet::setProperties().
void oox::PropertyMap::erase | ( | sal_Int32 | nPropId | ) |
Definition at line 203 of file propertymap.cxx.
References maProperties.
Referenced by oox::vml::ShapeBase::convertShapeProperties(), and oox::drawingml::Shape::createAndInsert().
void oox::PropertyMap::fillPropertyNameMap | ( | PropertyNameMap & | rMap | ) | const |
Definition at line 280 of file propertymap.cxx.
References maProperties, and mpPropNames.
Referenced by oox::drawingml::ShapePropertyMap::setAnyProperty().
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 261 of file propertymap.cxx.
References Any, maProperties, and pValues.
Referenced by oox::PropertySet::setProperties().
Any oox::PropertyMap::getProperty | ( | sal_Int32 | nPropId | ) |
Definition at line 198 of file propertymap.cxx.
References Any, and maProperties.
Referenced by oox::drawingml::Shape::addShape(), oox::ppt::PPTShape::addShape(), oox::vml::ShapeBase::convertShapeProperties(), oox::drawingml::chart::ObjectFormatter::convertTextWrap(), oox::drawingml::Shape::createAndInsert(), and oox::drawingml::GraphicProperties::pushToPropMap().
|
static |
Returns the property identifier of the passed name.
Definition at line 224 of file propertymap.cxx.
References a, and oox::GetPropertyNameVector().
Referenced by oox::drawingml::DiagramData::restoreDataFromModelToShapeAfterReCreation().
|
static |
Returns the name of the passed property identifier.
Definition at line 218 of file propertymap.cxx.
References oox::GetPropertyNameVector().
Referenced by oox::vml::ShapeBase::convertShapeProperties(), oox::drawingml::Shape::createAndInsert(), oox::PropertySet::getAnyProperty(), oox::PropertySet::hasProperty(), and oox::PropertySet::setAnyProperty().
bool oox::PropertyMap::hasProperty | ( | sal_Int32 | nPropId | ) | const |
Returns true, if the map contains a property with the passed identifier.
Definition at line 184 of file propertymap.cxx.
References maProperties.
Referenced by oox::vml::ShapeBase::convertShapeProperties(), oox::drawingml::chart::ObjectFormatter::convertTextWrap(), oox::drawingml::Shape::createAndInsert(), oox::drawingml::TextRun::insertAt(), oox::drawingml::TextParagraph::insertAt(), oox::drawingml::GraphicProperties::pushToPropMap(), and oox::drawingml::TextParagraphProperties::pushToPropSet().
Reference< XPropertySet > oox::PropertyMap::makePropertySet | ( | ) | const |
Creates a property set supporting the XPropertySet interface and inserts all properties.
Definition at line 288 of file propertymap.cxx.
Referenced by oox::ppt::SlidePersist::createBackground(), and oox::drawingml::CustomShapeProperties::pushToPropSet().
Sequence< PropertyValue > oox::PropertyMap::makePropertyValueSequence | ( | ) | const |
Returns a sequence of property values, filled with all contained properties.
Definition at line 246 of file propertymap.cxx.
References aSeq, maProperties, and pValues.
Referenced by oox::drawingml::lcl_copyCharPropsToShape(), 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 189 of file propertymap.cxx.
References maProperties.
Referenced by oox::drawingml::BulletList::pushToPropMap(), and oox::drawingml::DiagramData::restoreDataFromModelToShapeAfterReCreation().
|
inline |
Sets the specified property to the passed value.
Does nothing, if the identifier is invalid.
Definition at line 72 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::EmbeddedControl::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::VbaSiteModel::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::vml::ComplexShape::implConvertAndInsert(), oox::ole::OleObjectHelper::importOleObject(), oox::drawingml::CustomShapeProperties::initializePresetDataMap(), oox::drawingml::TextParagraph::insertAt(), oox::ppt::PPTShapePropertiesContext::onCreateContext(), oox::drawingml::HyperLinkContext::onCreateContext(), oox::ppt::SlideFragmentHandler::onCreateContext(), oox::ppt::SoundActionContext::onEndElement(), oox::drawingml::TextBodyProperties::pushTextDistances(), oox::drawingml::BulletList::pushToPropMap(), oox::drawingml::TextCharacterProperties::pushToPropMap(), oox::drawingml::EffectProperties::pushToPropMap(), oox::drawingml::GraphicProperties::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(), oox::drawingml::TextParagraphPropertiesContext::TextParagraphPropertiesContext(), and oox::drawingml::TextParagraphPropertiesContext::~TextParagraphPropertiesContext().
|
delete |
setAnyProperty should be used
References dump(), and getProperty().
|
private |
Definition at line 120 of file propertymap.hxx.
Referenced by assignAll(), assignUsed(), empty(), erase(), fillPropertyNameMap(), fillSequences(), getProperty(), hasProperty(), makePropertyValueSequence(), and setAnyProperty().
|
private |
Definition at line 119 of file propertymap.hxx.
Referenced by fillPropertyNameMap().