summaryrefslogtreecommitdiff
path: root/svx/source/table
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-04-19 17:07:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-19 21:48:06 +0200
commitcd073a4a945a527cec3080523a0d7ec42bc49b26 (patch)
tree982b997ddc759a5c062ea5d87ed20cc17b1b09c6 /svx/source/table
parent35dac3d5d51cf58c3f49e039b8a67b129055f267 (diff)
svx properties: pass SfxItemSet around by value
so we avoid heap allocation costs when loading lots of shapes Change-Id: I0de5819acc7f845973a284e68ab709989f27d402 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114297 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/table')
-rw-r--r--svx/source/table/cell.cxx8
-rw-r--r--svx/source/table/svdotable.cxx6
2 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index c42db7cfd7d8..a4bc4a86ffec 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -150,7 +150,7 @@ namespace sdr::properties
{
protected:
// create a new itemset
- std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
+ SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
const svx::ITextProvider& getTextProvider() const override;
@@ -177,9 +177,9 @@ namespace sdr::properties
};
// create a new itemset
- std::unique_ptr<SfxItemSet> CellProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
+ SfxItemSet CellProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
{
- return std::make_unique<SfxItemSet>(rPool,
+ return SfxItemSet(rPool,
// range from SdrAttrObj
svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
@@ -278,7 +278,7 @@ namespace sdr::properties
GetObjectItemSet();
SfxItemSet aNewSet(pOutliner->GetParaAttribs(0));
- mpItemSet->Put(aNewSet);
+ mxItemSet->Put(aNewSet);
}
std::unique_ptr<OutlinerParaObject> pTemp = pOutliner->CreateParaObject(0, nParaCount);
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 33b134dbe2c2..5731c12acdd9 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -85,7 +85,7 @@ class TableProperties : public TextProperties
{
protected:
// create a new itemset
- std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
+ SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
public:
// basic constructor
@@ -126,9 +126,9 @@ void TableProperties::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNe
}
// create a new itemset
-std::unique_ptr<SfxItemSet> TableProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
+SfxItemSet TableProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
{
- return std::make_unique<SfxItemSet>(rPool,
+ return SfxItemSet(rPool,
// range from SdrAttrObj
svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,