diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx index 8d2b90009353..da78dcd9053a 100644 --- a/include/svx/sdr/properties/defaultproperties.hxx +++ b/include/svx/sdr/properties/defaultproperties.hxx @@ -40,7 +40,7 @@ namespace sdr std::unique_ptr mpItemSet; // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // test changeability for a single item virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx index 3a49400f5d76..7755f4fbc3fb 100644 --- a/include/svx/sdr/properties/properties.hxx +++ b/include/svx/sdr/properties/properties.hxx @@ -20,6 +20,10 @@ #ifndef INCLUDED_SVX_SDR_PROPERTIES_PROPERTIES_HXX #define INCLUDED_SVX_SDR_PROPERTIES_PROPERTIES_HXX +#include + +#include + #include #include @@ -53,7 +57,7 @@ namespace sdr protected: // create a new object specific itemset with object specific ranges. - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& pPool) = 0; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& pPool) = 0; // internal access to SdrObject const SdrObject& GetSdrObject() const; diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx index b60794c05904..603442634df2 100644 --- a/svx/inc/sdr/properties/attributeproperties.hxx +++ b/svx/inc/sdr/properties/attributeproperties.hxx @@ -42,7 +42,7 @@ namespace sdr SfxStyleSheet* mpStyleSheet; // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& pPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& pPool) override; // Do the ItemChange, may do special handling virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; diff --git a/svx/inc/sdr/properties/captionproperties.hxx b/svx/inc/sdr/properties/captionproperties.hxx index 13bb57ff3d6a..2fb7b8d1e6c2 100644 --- a/svx/inc/sdr/properties/captionproperties.hxx +++ b/svx/inc/sdr/properties/captionproperties.hxx @@ -31,7 +31,7 @@ namespace sdr { protected: // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx index df8ae4c472dc..5de1ac6c6e9e 100644 --- a/svx/inc/sdr/properties/circleproperties.hxx +++ b/svx/inc/sdr/properties/circleproperties.hxx @@ -31,7 +31,7 @@ namespace sdr { protected: // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx index 95de994a0085..5ed60a3ad420 100644 --- a/svx/inc/sdr/properties/connectorproperties.hxx +++ b/svx/inc/sdr/properties/connectorproperties.hxx @@ -31,7 +31,7 @@ namespace sdr { protected: // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx index ba93dad7339a..e056f21a106f 100644 --- a/svx/inc/sdr/properties/customshapeproperties.hxx +++ b/svx/inc/sdr/properties/customshapeproperties.hxx @@ -34,7 +34,7 @@ namespace sdr protected: // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // test changeability for a single item virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; diff --git a/svx/inc/sdr/properties/e3dproperties.hxx b/svx/inc/sdr/properties/e3dproperties.hxx index 07006c0afda5..0e6352079756 100644 --- a/svx/inc/sdr/properties/e3dproperties.hxx +++ b/svx/inc/sdr/properties/e3dproperties.hxx @@ -31,7 +31,7 @@ namespace sdr { protected: // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx index 2b431ec7b576..4da4be720ef3 100644 --- a/svx/inc/sdr/properties/emptyproperties.hxx +++ b/svx/inc/sdr/properties/emptyproperties.hxx @@ -38,7 +38,7 @@ namespace sdr std::unique_ptr mpEmptyItemSet; // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // test changeability for a single item virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; diff --git a/svx/inc/sdr/properties/graphicproperties.hxx b/svx/inc/sdr/properties/graphicproperties.hxx index aeb8b6585a98..860bc264ee7f 100644 --- a/svx/inc/sdr/properties/graphicproperties.hxx +++ b/svx/inc/sdr/properties/graphicproperties.hxx @@ -31,7 +31,7 @@ namespace sdr { protected: // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx index 50d3fb16e652..7e2a71177841 100644 --- a/svx/inc/sdr/properties/groupproperties.hxx +++ b/svx/inc/sdr/properties/groupproperties.hxx @@ -31,7 +31,7 @@ namespace sdr { protected: // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // test changeability for a single item virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx index e7dae195176c..06cc0fd328f5 100644 --- a/svx/inc/sdr/properties/measureproperties.hxx +++ b/svx/inc/sdr/properties/measureproperties.hxx @@ -31,7 +31,7 @@ namespace sdr { protected: // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // react on ItemSet changes virtual void ItemSetChanged(const SfxItemSet& rSet) override; diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx index 1c4eee7c8cd4..febdae9a2194 100644 --- a/svx/inc/sdr/properties/pageproperties.hxx +++ b/svx/inc/sdr/properties/pageproperties.hxx @@ -31,7 +31,7 @@ namespace sdr { protected: // create a new object specific itemset with object specific ranges. - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& pPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& pPool) override; // Do the ItemChange, may do special handling virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; diff --git a/svx/inc/sdr/properties/textproperties.hxx b/svx/inc/sdr/properties/textproperties.hxx index b2c73f4d0a00..df6715cd51f0 100644 --- a/svx/inc/sdr/properties/textproperties.hxx +++ b/svx/inc/sdr/properties/textproperties.hxx @@ -36,7 +36,7 @@ namespace sdr protected: // create a new itemset - virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + virtual std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; // Do the ItemChange, may do special handling virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 369c6bd3cd77..137cc6bd93c0 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -21,6 +21,7 @@ #include +#include #include #include #include @@ -112,9 +113,9 @@ namespace sdr } // create a new itemset - SfxItemSet* AttributeProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr AttributeProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // ranges from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, @@ -419,7 +420,7 @@ namespace sdr pItemSet = pItemSet->GetParent(); } - SfxItemSet* pNewSet = CreateObjectSpecificItemSet(pNewModel->GetItemPool()); + auto pNewSet = CreateObjectSpecificItemSet(pNewModel->GetItemPool()); std::vector::reverse_iterator riter; for (riter = aSetList.rbegin(); riter != aSetList.rend(); ++riter) @@ -455,7 +456,7 @@ namespace sdr } } - mpItemSet.reset(pNewSet); + mpItemSet = std::move(pNewSet); } } } diff --git a/svx/source/sdr/properties/captionproperties.cxx b/svx/source/sdr/properties/captionproperties.cxx index 5a5e7a238b87..be25e2ed6e50 100644 --- a/svx/source/sdr/properties/captionproperties.cxx +++ b/svx/source/sdr/properties/captionproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -30,9 +33,9 @@ namespace sdr namespace properties { // create a new itemset - SfxItemSet* CaptionProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr CaptionProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // range from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, diff --git a/svx/source/sdr/properties/circleproperties.cxx b/svx/source/sdr/properties/circleproperties.cxx index 1da3816b498a..4168e28e29e7 100644 --- a/svx/source/sdr/properties/circleproperties.cxx +++ b/svx/source/sdr/properties/circleproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -32,9 +35,9 @@ namespace sdr namespace properties { // create a new itemset - SfxItemSet* CircleProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr CircleProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // range from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, diff --git a/svx/source/sdr/properties/connectorproperties.cxx b/svx/source/sdr/properties/connectorproperties.cxx index 7ab5fc431ebf..05501095a21c 100644 --- a/svx/source/sdr/properties/connectorproperties.cxx +++ b/svx/source/sdr/properties/connectorproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -30,9 +33,9 @@ namespace sdr namespace properties { // create a new itemset - SfxItemSet* ConnectorProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr ConnectorProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // range from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index 2f7c2fd0f5f2..f674ab5b51b0 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -59,9 +62,9 @@ namespace sdr } } - SfxItemSet* CustomShapeProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr CustomShapeProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // ranges from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index 3d53ddec61fe..ce5d927ba270 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -35,10 +38,10 @@ namespace sdr { namespace properties { - SfxItemSet* DefaultProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr DefaultProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { // Basic implementation; Basic object has NO attributes - return new SfxItemSet(rPool); + return o3tl::make_unique(rPool); } DefaultProperties::DefaultProperties(SdrObject& rObj) @@ -75,7 +78,7 @@ namespace sdr { if(!mpItemSet) { - const_cast(this)->mpItemSet.reset(const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool())); + const_cast(this)->mpItemSet = const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool()); const_cast(this)->ForceDefaultAttributes(); } diff --git a/svx/source/sdr/properties/e3dproperties.cxx b/svx/source/sdr/properties/e3dproperties.cxx index fd49afc1c13f..2a674886e570 100644 --- a/svx/source/sdr/properties/e3dproperties.cxx +++ b/svx/source/sdr/properties/e3dproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -28,9 +31,9 @@ namespace sdr namespace properties { // create a new itemset - SfxItemSet* E3dProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr E3dProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // ranges from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, diff --git a/svx/source/sdr/properties/emptyproperties.cxx b/svx/source/sdr/properties/emptyproperties.cxx index 25d7c04ee16b..458cf3b98f64 100644 --- a/svx/source/sdr/properties/emptyproperties.cxx +++ b/svx/source/sdr/properties/emptyproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -30,11 +33,11 @@ namespace sdr namespace properties { // create a new itemset - SfxItemSet* EmptyProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr EmptyProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { // Basic implementation; Basic object has NO attributes assert(!"EmptyProperties::CreateObjectSpecificItemSet() should never be called"); - return new SfxItemSet(rPool); + return o3tl::make_unique(rPool); } EmptyProperties::EmptyProperties(SdrObject& rObj) @@ -52,7 +55,7 @@ namespace sdr { if(!mpEmptyItemSet) { - const_cast(this)->mpEmptyItemSet.reset(const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool())); + const_cast(this)->mpEmptyItemSet = const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool()); } assert(mpEmptyItemSet); diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx index 9663199d766c..955384961f70 100644 --- a/svx/source/sdr/properties/graphicproperties.cxx +++ b/svx/source/sdr/properties/graphicproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -31,9 +34,9 @@ namespace sdr namespace properties { // create a new itemset - SfxItemSet* GraphicProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr GraphicProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // range from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx index 4dfc770e0888..7b46704e0923 100644 --- a/svx/source/sdr/properties/groupproperties.cxx +++ b/svx/source/sdr/properties/groupproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -32,12 +35,12 @@ namespace sdr namespace properties { // create a new itemset - SfxItemSet* GroupProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr GroupProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { // Groups have in principle no ItemSet. To support methods like // GetMergedItemSet() the local one is used. Thus, all items in the pool // may be used and a pool itemset is created. - return new SfxItemSet(rPool); + return o3tl::make_unique(rPool); } GroupProperties::GroupProperties(SdrObject& rObj) diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx index fe0b362e3f86..03f10aeda774 100644 --- a/svx/source/sdr/properties/measureproperties.cxx +++ b/svx/source/sdr/properties/measureproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -36,9 +39,9 @@ namespace sdr namespace properties { // create a new itemset - SfxItemSet* MeasureProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr MeasureProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // range from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, diff --git a/svx/source/sdr/properties/pageproperties.cxx b/svx/source/sdr/properties/pageproperties.cxx index a4d57fc80602..a3a567698cee 100644 --- a/svx/source/sdr/properties/pageproperties.cxx +++ b/svx/source/sdr/properties/pageproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -29,10 +32,10 @@ namespace sdr namespace properties { // create a new itemset - SfxItemSet* PageProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr PageProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { // override to legally return a valid ItemSet - return new SfxItemSet(rPool); + return o3tl::make_unique(rPool); } PageProperties::PageProperties(SdrObject& rObj) @@ -60,7 +63,7 @@ namespace sdr { if(!mpEmptyItemSet) { - const_cast(this)->mpEmptyItemSet.reset(const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool())); + const_cast(this)->mpEmptyItemSet = const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool()); } DBG_ASSERT(mpEmptyItemSet, "Could not create an SfxItemSet(!)"); diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index b2d840c763fe..4749a1c02506 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include @@ -42,9 +45,9 @@ namespace sdr { namespace properties { - SfxItemSet* TextProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr TextProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // range from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 5266e5e2165f..c1703c9cb88e 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -150,7 +151,7 @@ namespace sdr { protected: // create a new itemset - SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; const svx::ITextProvider& getTextProvider() const override; @@ -177,9 +178,9 @@ namespace sdr }; // create a new itemset - SfxItemSet* CellProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) + std::unique_ptr CellProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // range from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST, diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index ef58d32b4a5b..2e2d01887fa2 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -22,7 +22,7 @@ #include #include #include - +#include #include #include #include @@ -86,7 +86,7 @@ class TableProperties : public TextProperties { protected: // create a new itemset - SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + std::unique_ptr CreateObjectSpecificItemSet(SfxItemPool& rPool) override; public: // basic constructor @@ -125,9 +125,9 @@ void TableProperties::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNe } // create a new itemset -SfxItemSet* TableProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) +std::unique_ptr TableProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { - return new SfxItemSet(rPool, + return o3tl::make_unique(rPool, // range from SdrAttrObj SDRATTR_START, SDRATTR_SHADOW_LAST,