diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-04-12 09:21:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-15 15:53:25 +0200 |
commit | 6c934d0feb6a391fda0939e8db5d12aafeb93cc6 (patch) | |
tree | 6d256b92dc7913cfd195b199440e90226c772413 /svx | |
parent | 6c9a86a6392662f1115d3fe6b793a451101429b7 (diff) |
store ptr to the original entries in SfxItemPropertyMap
instead of copying them to a new data structure that
is practically identical.
Helps startup time since we build a ton of these when
loading documents.
And use o3tl::sorted_vector as a dense map data
structure to reduce allocations and improve cache
friendliness, since this is a build-once thing.
Change-Id: I950be03b1a21c0c81c40f2677d4215f5e8e256cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114015
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/inc/cell.hxx | 2 | ||||
-rw-r--r-- | svx/source/table/cell.cxx | 12 | ||||
-rw-r--r-- | svx/source/unodraw/shapeimpl.hxx | 16 | ||||
-rw-r--r-- | svx/source/unodraw/tableshape.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 10 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap3.cxx | 24 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap4.cxx | 20 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 48 |
8 files changed, 68 insertions, 68 deletions
diff --git a/svx/source/inc/cell.hxx b/svx/source/inc/cell.hxx index 688eebf94cca..94d0cf4a98cb 100644 --- a/svx/source/inc/cell.hxx +++ b/svx/source/inc/cell.hxx @@ -185,7 +185,7 @@ protected: SVX_DLLPRIVATE virtual const SfxItemSet& GetObjectItemSet() override; SVX_DLLPRIVATE void SetObjectItem(const SfxPoolItem& rItem); - SVX_DLLPRIVATE static css::uno::Any GetAnyForItem( SfxItemSet const & aSet, const SfxItemPropertySimpleEntry* pMap ); + SVX_DLLPRIVATE static css::uno::Any GetAnyForItem( SfxItemSet const & aSet, const SfxItemPropertyMapEntry* pMap ); private: /// @throws css::uno::RuntimeException diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 06c9fda21a39..c42db7cfd7d8 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -995,7 +995,7 @@ sal_Int32 SAL_CALL Cell::getError( ) // XPropertySet -Any Cell::GetAnyForItem( SfxItemSet const & aSet, const SfxItemPropertySimpleEntry* pMap ) +Any Cell::GetAnyForItem( SfxItemSet const & aSet, const SfxItemPropertyMapEntry* pMap ) { Any aAny( SvxItemPropertySet_getPropertyValue( pMap, aSet ) ); @@ -1030,7 +1030,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any& if(mpProperties == nullptr) throw DisposedException(); - const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName); + const SfxItemPropertyMapEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName); if( pMap ) { if( (pMap->nFlags & PropertyAttribute::READONLY ) != 0 ) @@ -1183,7 +1183,7 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName ) if(mpProperties == nullptr) throw DisposedException(); - const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); + const SfxItemPropertyMapEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); if( pMap ) { switch( pMap->nWID ) @@ -1374,7 +1374,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) if(mpProperties == nullptr) throw DisposedException(); - const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); + const SfxItemPropertyMapEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); if( pMap ) { @@ -1503,7 +1503,7 @@ void SAL_CALL Cell::setPropertyToDefault( const OUString& PropertyName ) if(mpProperties == nullptr) throw DisposedException(); - const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); + const SfxItemPropertyMapEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); if( pMap ) { switch( pMap->nWID ) @@ -1544,7 +1544,7 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName ) if(mpProperties == nullptr) throw DisposedException(); - const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName); + const SfxItemPropertyMapEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName); if( pMap ) { switch( pMap->nWID ) diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx index a1a4e6963020..b2abe9f074aa 100644 --- a/svx/source/unodraw/shapeimpl.hxx +++ b/svx/source/unodraw/shapeimpl.hxx @@ -32,8 +32,8 @@ class SvxPluginShape : public SvxOle2Shape { protected: // override these for special property handling in subcasses. Return true if property is handled - virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) override; - virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) override; + virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override; + virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override; public: explicit SvxPluginShape(SdrObject* pObj); @@ -50,8 +50,8 @@ class SvxAppletShape : public SvxOle2Shape { protected: // override these for special property handling in subcasses. Return true if property is handled - virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) override; - virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) override; + virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override; + virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override; public: explicit SvxAppletShape(SdrObject* pObj); @@ -68,8 +68,8 @@ class SvxFrameShape : public SvxOle2Shape { protected: // override these for special property handling in subcasses. Return true if property is handled - virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) override; - virtual bool getPropertyValueImpl(const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, + virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override; + virtual bool getPropertyValueImpl(const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue) override; public: @@ -89,8 +89,8 @@ class SvxTableShape : public SvxShape { protected: // override these for special property handling in subcasses. Return true if property is handled - virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) override; - virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) override; + virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) override; + virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) override; virtual void lock() override; virtual void unlock() override; diff --git a/svx/source/unodraw/tableshape.cxx b/svx/source/unodraw/tableshape.cxx index 8a2fc64aac4e..31bf7d756b45 100644 --- a/svx/source/unodraw/tableshape.cxx +++ b/svx/source/unodraw/tableshape.cxx @@ -47,7 +47,7 @@ SvxTableShape::~SvxTableShape() throw() bool SvxTableShape::setPropertyValueImpl( const OUString& rName, - const SfxItemPropertySimpleEntry* pProperty, + const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { switch( pProperty->nWID ) @@ -99,7 +99,7 @@ bool SvxTableShape::setPropertyValueImpl( bool SvxTableShape::getPropertyValueImpl( const OUString& rName, - const SfxItemPropertySimpleEntry* pProperty, + const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 56d1c1569479..bf339a0930d1 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -897,7 +897,7 @@ SvxShapePolyPolygon::~SvxShapePolyPolygon() throw() { } -bool SvxShapePolyPolygon::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool SvxShapePolyPolygon::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -1009,7 +1009,7 @@ bool SvxShapePolyPolygon::setPropertyValueImpl( const OUString& rName, const Sfx throw lang::IllegalArgumentException(); } -bool SvxShapePolyPolygon::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, +bool SvxShapePolyPolygon::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) @@ -1169,7 +1169,7 @@ SvxGraphicObject::~SvxGraphicObject() throw() { } -bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { bool bOk = false; switch( pProperty->nWID ) @@ -1403,7 +1403,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte return true; } -bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -1755,7 +1755,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c } } -bool SvxCustomShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool SvxCustomShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) { diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index f2f29c21fc36..10a9c398f02c 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -241,7 +241,7 @@ struct ImpRememberTransAndRect } -bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -351,7 +351,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const OUString& rName, const SfxIte } -bool Svx3DSceneObject::getPropertyValueImpl(const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, +bool Svx3DSceneObject::getPropertyValueImpl(const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue) { switch( pProperty->nWID ) @@ -412,7 +412,7 @@ Svx3DCubeObject::~Svx3DCubeObject() throw() { } -bool Svx3DCubeObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool Svx3DCubeObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { SolarMutexGuard aGuard; @@ -467,7 +467,7 @@ bool Svx3DCubeObject::setPropertyValueImpl( const OUString& rName, const SfxItem throw IllegalArgumentException(); } -bool Svx3DCubeObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool Svx3DCubeObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -533,7 +533,7 @@ Svx3DSphereObject::~Svx3DSphereObject() throw() { } -bool Svx3DSphereObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool Svx3DSphereObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -577,7 +577,7 @@ bool Svx3DSphereObject::setPropertyValueImpl( const OUString& rName, const SfxIt throw IllegalArgumentException(); } -bool Svx3DSphereObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool Svx3DSphereObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -726,7 +726,7 @@ static void B3dPolyPolygon_to_PolyPolygonShape3D( const basegfx::B3DPolyPolygon& rValue <<= aRetval; } -bool Svx3DLatheObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool Svx3DLatheObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -772,7 +772,7 @@ bool Svx3DLatheObject::setPropertyValueImpl( const OUString& rName, const SfxIte throw IllegalArgumentException(); } -bool Svx3DLatheObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool Svx3DLatheObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -818,7 +818,7 @@ Svx3DExtrudeObject::~Svx3DExtrudeObject() throw() { } -bool Svx3DExtrudeObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool Svx3DExtrudeObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -853,7 +853,7 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const OUString& rName, const SfxI throw IllegalArgumentException(); } -bool Svx3DExtrudeObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool Svx3DExtrudeObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -901,7 +901,7 @@ Svx3DPolygonObject::~Svx3DPolygonObject() throw() { } -bool Svx3DPolygonObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool Svx3DPolygonObject::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -974,7 +974,7 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const OUString& rName, const SfxI throw IllegalArgumentException(); } -bool Svx3DPolygonObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool Svx3DPolygonObject::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) { diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 17daf3f5a1ed..f1099f2c150f 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -78,7 +78,7 @@ SvxOle2Shape::~SvxOle2Shape() throw() } //XPropertySet -bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -196,7 +196,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPro throw IllegalArgumentException(); } -bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -578,7 +578,7 @@ void SAL_CALL SvxAppletShape::setPropertyValues( const css::uno::Sequence< OUStr resetModifiedState(); } -bool SvxAppletShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool SvxAppletShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) ) { @@ -599,7 +599,7 @@ bool SvxAppletShape::setPropertyValueImpl( const OUString& rName, const SfxItemP } } -bool SvxAppletShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool SvxAppletShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) ) { @@ -649,7 +649,7 @@ void SAL_CALL SvxPluginShape::setPropertyValues( const css::uno::Sequence< OUStr resetModifiedState(); } -bool SvxPluginShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool SvxPluginShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) ) { @@ -670,7 +670,7 @@ bool SvxPluginShape::setPropertyValueImpl( const OUString& rName, const SfxItemP } } -bool SvxPluginShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool SvxPluginShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) ) { @@ -721,7 +721,7 @@ void SAL_CALL SvxFrameShape::setPropertyValues( const css::uno::Sequence< OUStri resetModifiedState(); } -bool SvxFrameShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool SvxFrameShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) ) { @@ -742,7 +742,7 @@ bool SvxFrameShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr } } -bool SvxFrameShape::getPropertyValueImpl(const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, +bool SvxFrameShape::getPropertyValueImpl(const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue) { if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) ) @@ -775,7 +775,7 @@ SvxMediaShape::~SvxMediaShape() throw() } -bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { if( ((pProperty->nWID >= OWN_ATTR_MEDIA_URL) && (pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM)) || (pProperty->nWID == OWN_ATTR_MEDIA_STREAM) @@ -931,7 +931,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr } -bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { if ( ((pProperty->nWID >= OWN_ATTR_MEDIA_URL) && (pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM)) diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index e645738d7a3b..a111ea46be04 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -592,24 +592,24 @@ static void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemProper const SfxItemPropertyMap& rSrc = rPropSet.getPropertyMap(); - for(const auto& rSrcProp : rSrc.getPropertyEntries()) + for(const SfxItemPropertyMapEntry* pSrcProp : rSrc.getPropertyEntries()) { - const sal_uInt16 nWID = rSrcProp.second.nWID; + const sal_uInt16 nWID = pSrcProp->nWID; if(SfxItemPool::IsWhich(nWID) && (nWID < OWN_ATTR_VALUE_START || nWID > OWN_ATTR_VALUE_END) - && rPropSet.GetUsrAnyForID(rSrcProp.second)) + && rPropSet.GetUsrAnyForID(*pSrcProp)) rSet.Put(rSet.GetPool()->GetDefaultItem(nWID)); } - for(const auto& rSrcProp : rSrc.getPropertyEntries()) + for(const SfxItemPropertyMapEntry* pSrcProp : rSrc.getPropertyEntries()) { - if(rSrcProp.second.nWID) + if(pSrcProp->nWID) { - uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(rSrcProp.second); + uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(*pSrcProp); if(pUsrAny) { // search for equivalent entry in pDst - const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( rSrcProp.first ); + const SfxItemPropertyMapEntry* pEntry = pMap->getByName( pSrcProp->aName ); if(pEntry) { // entry found @@ -617,7 +617,7 @@ static void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemProper { // special ID in PropertySet, can only be set // directly at the object - xSet->setPropertyValue( OUString(rSrcProp.first), *pUsrAny); + xSet->setPropertyValue( pSrcProp->aName, *pUsrAny); } else { @@ -1588,7 +1588,7 @@ void SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any& { ::SolarMutexGuard aGuard; - const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName); + const SfxItemPropertyMapEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName); if (!HasSdrObject()) { @@ -1731,7 +1731,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) { ::SolarMutexGuard aGuard; - const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); + const SfxItemPropertyMapEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); uno::Any aAny; if(HasSdrObject()) @@ -1896,7 +1896,7 @@ void SAL_CALL SvxShape::firePropertiesChangeEvent( const css::uno::Sequence< OUS } -uno::Any SvxShape::GetAnyForItem( SfxItemSet const & aSet, const SfxItemPropertySimpleEntry* pMap ) const +uno::Any SvxShape::GetAnyForItem( SfxItemSet const & aSet, const SfxItemPropertyMapEntry* pMap ) const { DBG_TESTSOLARMUTEX(); uno::Any aAny; @@ -1995,7 +1995,7 @@ beans::PropertyState SvxShape::_getPropertyState( const OUString& PropertyName ) { ::SolarMutexGuard aGuard; - const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); + const SfxItemPropertyMapEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); if( !HasSdrObject() || pMap == nullptr ) throw beans::UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(this)); @@ -2058,7 +2058,7 @@ beans::PropertyState SvxShape::_getPropertyState( const OUString& PropertyName ) return eState; } -bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -2524,7 +2524,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl } -bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { switch( pProperty->nWID ) { @@ -2921,7 +2921,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl } -bool SvxShape::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, css::beans::PropertyState& rState ) +bool SvxShape::getPropertyStateImpl( const SfxItemPropertyMapEntry* pProperty, css::beans::PropertyState& rState ) { if( pProperty->nWID == OWN_ATTR_FILLBMP_MODE ) { @@ -2951,7 +2951,7 @@ bool SvxShape::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty } -bool SvxShape::setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) +bool SvxShape::setPropertyToDefaultImpl( const SfxItemPropertyMapEntry* pProperty ) { if( pProperty->nWID == OWN_ATTR_FILLBMP_MODE ) { @@ -2999,7 +2999,7 @@ void SvxShape::_setPropertyToDefault( const OUString& PropertyName ) { ::SolarMutexGuard aGuard; - const SfxItemPropertySimpleEntry* pProperty = mpPropSet->getPropertyMapEntry(PropertyName); + const SfxItemPropertyMapEntry* pProperty = mpPropSet->getPropertyMapEntry(PropertyName); if( !HasSdrObject() || pProperty == nullptr ) throw beans::UnknownPropertyException( PropertyName, static_cast<cppu::OWeakObject*>(this)); @@ -3029,7 +3029,7 @@ uno::Any SvxShape::_getPropertyDefault( const OUString& aPropertyName ) { ::SolarMutexGuard aGuard; - const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName); + const SfxItemPropertyMapEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName); if( !HasSdrObject() || pMap == nullptr ) throw beans::UnknownPropertyException( aPropertyName, static_cast<cppu::OWeakObject*>(this)); @@ -3884,7 +3884,7 @@ void SAL_CALL SvxShapeText::setString( const OUString& aString ) } // override these for special property handling in subcasses. Return true if property is handled -bool SvxShapeText::setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) +bool SvxShapeText::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue ) { // HACK-fix #99090# // since SdrTextObj::SetVerticalWriting exchanges @@ -3907,7 +3907,7 @@ bool SvxShapeText::setPropertyValueImpl( const OUString& rName, const SfxItemPro return SvxShape::setPropertyValueImpl( rName, pProperty, rValue ); } -bool SvxShapeText::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) +bool SvxShapeText::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue ) { if( pProperty->nWID == SDRATTR_TEXTDIRECTION ) { @@ -3922,12 +3922,12 @@ bool SvxShapeText::getPropertyValueImpl( const OUString& rName, const SfxItemPro return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } -bool SvxShapeText::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, css::beans::PropertyState& rState ) +bool SvxShapeText::getPropertyStateImpl( const SfxItemPropertyMapEntry* pProperty, css::beans::PropertyState& rState ) { return SvxShape::getPropertyStateImpl( pProperty, rState ); } -bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) +bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertyMapEntry* pProperty ) { return SvxShape::setPropertyToDefaultImpl( pProperty ); } @@ -3979,7 +3979,7 @@ SdrObject* SdrObject::getSdrObjectFromXShape( const css::uno::Reference< css::un return pSvxShape ? pSvxShape->GetSdrObject() : nullptr; } -uno::Any SvxItemPropertySet_getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ) +uno::Any SvxItemPropertySet_getPropertyValue( const SfxItemPropertyMapEntry* pMap, const SfxItemSet& rSet ) { if(!pMap || !pMap->nWID) return uno::Any(); @@ -3989,7 +3989,7 @@ uno::Any SvxItemPropertySet_getPropertyValue( const SfxItemPropertySimpleEntry* return SvxItemPropertySet::getPropertyValue( pMap, rSet, (pMap->nWID != SDRATTR_XMLATTRIBUTES), bDontConvertNegativeValues ); } -void SvxItemPropertySet_setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet ) +void SvxItemPropertySet_setPropertyValue( const SfxItemPropertyMapEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet ) { if(!pMap || !pMap->nWID) return; |