diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-20 18:14:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-21 07:50:54 +0200 |
commit | b613896e3bb256418b2e31665da5baa6a9cdab56 (patch) | |
tree | 010388314d9823d39024422171d2e2c1b436b306 /sc/source | |
parent | cb24c9279e85cc14a9ebbc7ee0e732289e34118e (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 'sc/source')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index fe810fd164c4..b2f7aba2e6b2 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2929,9 +2929,9 @@ void ScDocShell::GetDocStat( ScDocStat& rDocStat ) static_cast<sal_uInt16>(ScPrintFunc( this, pPrinter, i ).GetTotalPages()) ); } -std::unique_ptr<SfxDocumentInfoDialog> ScDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) +std::shared_ptr<SfxDocumentInfoDialog> ScDocShell::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); ScDocShell* pDocSh = dynamic_cast< ScDocShell *>( SfxObjectShell::Current() ); // Only for statistics, if this Doc is shown; not from the Doc Manager diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index b06c121e25e5..26d5d8a0eaf4 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -215,7 +215,7 @@ public: void SetVisAreaOrSize( const tools::Rectangle& rVisArea ); - virtual std::unique_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) override; + virtual std::shared_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) override; void GetDocStat( ScDocStat& rDocStat ); |