summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-20 18:14:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-21 07:50:54 +0200
commitb613896e3bb256418b2e31665da5baa6a9cdab56 (patch)
tree010388314d9823d39024422171d2e2c1b436b306 /sw
parentcb24c9279e85cc14a9ebbc7ee0e732289e34118e (diff)
CreateDocumentInfoDialog should return shared_ptr
which is what it's only call site wants Change-Id: I1c2c2ed3a91a3376af142ac9a5d6993a2186d660 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92590 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/docsh.hxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index db674673f126..5a393cc2fdee 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -117,7 +117,7 @@ class SW_DLLPUBLIC SwDocShell
override;
/// Make DocInfo known to the Doc.
- SAL_DLLPRIVATE virtual std::unique_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent,
+ SAL_DLLPRIVATE virtual std::shared_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent,
const SfxItemSet &rSet) override;
/// OLE-stuff
SAL_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, sal_uInt16 nAspect) override;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 95f13f4cfd03..e70129d99c6e 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -126,9 +126,9 @@ using namespace ::com::sun::star;
using namespace ::sfx2;
// create DocInfo (virtual)
-std::unique_ptr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet)
+std::shared_ptr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet)
{
- std::unique_ptr<SfxDocumentInfoDialog> xDlg = std::make_unique<SfxDocumentInfoDialog>(pParent, rSet);
+ std::shared_ptr<SfxDocumentInfoDialog> xDlg = std::make_shared<SfxDocumentInfoDialog>(pParent, rSet);
//only with statistics, when this document is being shown, not
//from within the Doc-Manager
SwDocShell* pDocSh = static_cast<SwDocShell*>( SfxObjectShell::Current());