diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-21 12:34:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-25 10:00:23 +0200 |
commit | 0351bec874f7e83c437e485e8d61a41f32718e25 (patch) | |
tree | 463fa37a7d8a9c990edb80e8f9cf726002c8aa4d /include/svx | |
parent | 9700c1b2170ad04453a361ed5647937833ac3c18 (diff) |
use more o3tl::span
which means we can reserve precisely the right number of entries when
building maps
Change-Id: I580414699289369de4730caae09829bbd8759e82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/unoprov.hxx | 4 | ||||
-rw-r--r-- | include/svx/unoshape.hxx | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/svx/unoprov.hxx b/include/svx/unoprov.hxx index f7ee83979f0d..204b737edd97 100644 --- a/include/svx/unoprov.hxx +++ b/include/svx/unoprov.hxx @@ -82,12 +82,12 @@ public: class SVXCORE_DLLPUBLIC SvxUnoPropertyMapProvider { - SfxItemPropertyMapEntry const * aMapArr[SVXMAP_END]; + o3tl::span<SfxItemPropertyMapEntry const> aMapArr[SVXMAP_END]; std::unique_ptr<SvxItemPropertySet> aSetArr[SVXMAP_END]; public: SvxUnoPropertyMapProvider(); ~SvxUnoPropertyMapProvider(); - const SfxItemPropertyMapEntry* GetMap(sal_uInt16 nPropertyId); + o3tl::span<const SfxItemPropertyMapEntry> GetMap(sal_uInt16 nPropertyId); const SvxItemPropertySet* GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool); }; diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index 5b2b0940ad8f..923636d3b9c7 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -121,7 +121,7 @@ protected: const SvxItemPropertySet* mpPropSet; SvxItemPropertySetUsrAnys maUrsAnys; - const SfxItemPropertyMapEntry* maPropMapEntries; + o3tl::span<const SfxItemPropertyMapEntry> maPropMapEntries; private: ::tools::WeakReference< SdrObject > mpSdrObjectWeakReference; @@ -156,7 +156,7 @@ protected: /** used from the XActionLockable interface */ sal_uInt16 mnLockCount; - const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; } + o3tl::span<const SfxItemPropertyMapEntry> getPropertyMapEntries() const { return maPropMapEntries; } void updateShapeKind(); void endSetPropertyValues(); @@ -183,7 +183,7 @@ public: /// @throws css::uno::RuntimeException SvxShape( SdrObject* pObj ); /// @throws css::uno::RuntimeException - SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ); + SvxShape( SdrObject* pObject, o3tl::span<const SfxItemPropertyMapEntry> pEntries, const SvxItemPropertySet* pPropertySet ); virtual ~SvxShape() noexcept override; // Internals @@ -362,7 +362,7 @@ protected: public: SvxShapeText(SdrObject* pObj); - SvxShapeText(SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet); + SvxShapeText(SdrObject* pObject, o3tl::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet); virtual ~SvxShapeText() noexcept override; virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override; @@ -417,7 +417,7 @@ class SVXCORE_DLLPUBLIC SvxShapeGroupAnyD : public SvxShape, public css::drawing::XShapes { public: - SvxShapeGroupAnyD( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ); + SvxShapeGroupAnyD( SdrObject* pObject, o3tl::span<const SfxItemPropertyMapEntry> pEntries, const SvxItemPropertySet* pPropertySet ); virtual ~SvxShapeGroupAnyD() noexcept override; virtual void SAL_CALL acquire() noexcept override @@ -613,7 +613,7 @@ protected: SvGlobalName GetClassName_Impl(OUString& rHexCLSID); public: SvxOle2Shape(SdrObject* pObj); - SvxOle2Shape(SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet); + SvxOle2Shape(SdrObject* pObject, o3tl::span<const SfxItemPropertyMapEntry> pPropertyMap, const SvxItemPropertySet* pPropertySet); virtual ~SvxOle2Shape() noexcept override; bool createObject( const SvGlobalName &aClassName ); |