diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-01 11:01:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-02 15:34:38 +0200 |
commit | 2024780f9e169a6c1d167e494d37f46f7640dc97 (patch) | |
tree | 2488052807d613f63f6afe9a624d8f8fddda674b /sd/source/ui/view/drviews2.cxx | |
parent | d656191ec308d4280b93c7169372e543a255d108 (diff) |
can allocate these SfxItemSet on the stack
Change-Id: I85a749429a3a14aca5c6eaeaa5da37b25eb9f730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118283
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view/drviews2.cxx')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index dae22d8dfde8..36ff551eb7c3 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1238,11 +1238,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_SET_DEFAULT: { - std::unique_ptr<SfxItemSet> pSet; + std::optional<SfxItemSet> pSet; if (mpDrawView->IsTextEdit()) { - pSet.reset(new SfxItemSet( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} )); + pSet.emplace( GetPool(), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{} ); mpDrawView->SetAttributes( *pSet, true ); } else @@ -1269,7 +1269,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } } - pSet.reset(new SfxItemSet( GetPool() )); + pSet.emplace( GetPool() ); mpDrawView->SetAttributes( *pSet, true ); sal_uLong j = 0; |