diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-20 16:08:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-21 08:40:33 +0200 |
commit | 70b7bbc41299b65560f3339adc6a15fa9152f635 (patch) | |
tree | 054d20d5e902f78c7f936e2f52544ea4aeb0c6c3 /starmath | |
parent | 8286014d9d3b96cd69e462a19d666488f66a89c9 (diff) |
can pass SfxItemSet around by value in SfxShell
Change-Id: I80ee25c56da437d778e11f2dab3d07845ebd9597
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119274
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/smmod.hxx | 2 | ||||
-rw-r--r-- | starmath/source/smmod.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index b1eabcbc39fb..ca1fbb7c93e2 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -93,7 +93,7 @@ public: VirtualDevice & GetDefaultVirtualDev(); //virtual methods for options dialog - virtual std::unique_ptr<SfxItemSet> CreateItemSet( sal_uInt16 nId ) override; + virtual std::optional<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; }; diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index 10a1a3f2216b..776a25657088 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -201,12 +201,12 @@ void SmModule::GetState(SfxItemSet &rSet) } } -std::unique_ptr<SfxItemSet> SmModule::CreateItemSet( sal_uInt16 nId ) +std::optional<SfxItemSet> SmModule::CreateItemSet( sal_uInt16 nId ) { - std::unique_ptr<SfxItemSet> pRet; + std::optional<SfxItemSet> pRet; if(nId == SID_SM_EDITOPTIONS) { - pRet = std::make_unique<SfxItemSet>( + pRet.emplace( GetPool(), svl::Items< //TP_SMPRINT SID_PRINTTITLE, SID_PRINTZOOM, |