summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 10:18:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 17:30:07 +0200
commit9b81036c87b52edc2ce44813b31be425bc12ee1d (patch)
tree28ed98a455fe5a0c47f5531f8d40a5c4c81413ef /sw/source/uibase
parentaf8d12bd3a73381dfdfad92b63306369a665a2d7 (diff)
no need to allocate these on the heap
Change-Id: I55ecf6b8d9df2078f9bc81f54dbabf425c300643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116320 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/applab.cxx3
-rw-r--r--sw/source/uibase/app/docsh2.cxx5
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 1cb48c0f1135..8c6a450737de 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -264,7 +264,8 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
pSh->ChgPageDesc( 0, aDesc );
// Insert frame
- std::unique_ptr<SwFieldMgr> pFieldMgr(new SwFieldMgr);
+ std::optional<SwFieldMgr> pFieldMgr;
+ pFieldMgr.emplace();
pFieldMgr->SetEvalExpFields(false);
// Prepare border template
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 54fa22ae795d..30b31f90cdc7 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1125,12 +1125,11 @@ void SwDocShell::Execute(SfxRequest& rReq)
//search for the view that created the call
if(pViewShell->GetObjectShell() == this && pViewShell->GetDispatcher())
{
- std::unique_ptr<SfxFrameItem> pFrameItem(new SfxFrameItem( SID_DOCFRAME,
- pViewShell->GetViewFrame() ));
+ SfxFrameItem aFrameItem( SID_DOCFRAME, pViewShell->GetViewFrame() );
SfxDispatcher* pDispatch = pViewShell->GetDispatcher();
pDispatch->ExecuteList(SID_OPENDOC,
SfxCallMode::ASYNCHRON,
- { &aName, &aReferer, pFrameItem.get() });
+ { &aName, &aReferer, &aFrameItem });
break;
}
pViewShell = SfxViewShell::GetNext(*pViewShell);