summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 09:53:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 13:19:18 +0200
commit6eb3d37fdc75537aa94144eef97493ec6192792f (patch)
tree4f65352402590eee8dd6164644ee2140ad0e79da /sd
parenta4b66458a7b8da2f5580014813e5dabe3fa670b6 (diff)
no need to allocate SfxStyleFamilies on the heap
Change-Id: Ibedb36dec14c61927ef594ddf47fda94728530a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116319 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/sdmod.hxx2
-rw-r--r--sd/source/ui/app/sdmod2.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 218913a1b69a..5e21a32ca07a 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -114,7 +114,7 @@ public:
virtual std::unique_ptr<SfxItemSet> CreateItemSet( sal_uInt16 nId ) override;
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override;
virtual std::unique_ptr<SfxTabPage> CreateTabPage( sal_uInt16 nId, weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet ) override;
- virtual std::unique_ptr<SfxStyleFamilies> CreateStyleFamilies() override;
+ virtual std::optional<SfxStyleFamilies> CreateStyleFamilies() override;
SdExtPropertySetInfoCache gImplImpressPropertySetInfoCache;
SdExtPropertySetInfoCache gImplDrawPropertySetInfoCache;
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 20ff418808df..0080a0db1c50 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -797,21 +797,21 @@ std::unique_ptr<SfxTabPage> SdModule::CreateTabPage( sal_uInt16 nId, weld::Conta
return xRet;
}
-std::unique_ptr<SfxStyleFamilies> SdModule::CreateStyleFamilies()
+std::optional<SfxStyleFamilies> SdModule::CreateStyleFamilies()
{
- std::unique_ptr<SfxStyleFamilies> pStyleFamilies(new SfxStyleFamilies);
+ SfxStyleFamilies aStyleFamilies;
- pStyleFamilies->emplace_back(SfxStyleFamily::Para,
+ aStyleFamilies.emplace_back(SfxStyleFamily::Para,
SdResId(STR_GRAPHICS_STYLE_FAMILY),
BMP_STYLES_FAMILY_GRAPHICS,
RID_GRAPHICSTYLEFAMILY, SD_MOD()->GetResLocale());
- pStyleFamilies->emplace_back(SfxStyleFamily::Pseudo,
+ aStyleFamilies.emplace_back(SfxStyleFamily::Pseudo,
SdResId(STR_PRESENTATIONS_STYLE_FAMILY),
BMP_STYLES_FAMILY_PRESENTATIONS,
RID_PRESENTATIONSTYLEFAMILY, SD_MOD()->GetResLocale());
- return pStyleFamilies;
+ return aStyleFamilies;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */