diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-01 10:10:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-01 16:11:06 +0200 |
commit | 608f273e9da412e7a2d884f2603756cb4ff4c8af (patch) | |
tree | 11b279b98062d17ee69f722ccb1532107a615789 /sw/source/ui/misc/pgfnote.cxx | |
parent | cc948b84b8550ba728b3dfbc40a9785b928910e9 (diff) |
can allocate these SfxItemSet on the stack
Change-Id: Ib2b89613ad3e8f2bcdd51bee10bab3559a64fce4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118208
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/misc/pgfnote.cxx')
-rw-r--r-- | sw/source/ui/misc/pgfnote.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 608f54492b45..8292d1b35c7b 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -135,7 +135,7 @@ std::unique_ptr<SfxTabPage> SwFootNotePage::Create(weld::Container* pPage, weld: void SwFootNotePage::Reset(const SfxItemSet *rSet) { // if no example exists, otherwise Init here in Activate - std::unique_ptr<SwPageFootnoteInfo> pDefFootnoteInfo; + std::optional<SwPageFootnoteInfo> pDefFootnoteInfo; const SwPageFootnoteInfo* pFootnoteInfo; const SfxPoolItem* pItem = SfxTabPage::GetItem(*rSet, FN_PARAM_FTN_INFO); if( pItem ) @@ -146,8 +146,8 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) { // when "standard" is being activated the footnote item is deleted, // that's why a footnote structure has to be created here - pDefFootnoteInfo.reset(new SwPageFootnoteInfo()); - pFootnoteInfo = pDefFootnoteInfo.get(); + pDefFootnoteInfo.emplace(); + pFootnoteInfo = &*pDefFootnoteInfo; } // footnote area's height SwTwips lHeight = pFootnoteInfo->GetHeight(); |