include/sfx2/objsh.hxx | 2 +- sc/source/ui/docshell/docsh.cxx | 4 ++-- sc/source/ui/inc/docsh.hxx | 2 +- sd/source/ui/docshell/docshel4.cxx | 4 ++-- sd/source/ui/inc/DrawDocShell.hxx | 2 +- sfx2/source/doc/objcont.cxx | 4 ++-- sw/inc/docsh.hxx | 2 +- sw/source/uibase/app/docsh2.cxx | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-)
New commits: commit b613896e3bb256418b2e31665da5baa6a9cdab56 Author: Noel Grandin <[email protected]> AuthorDate: Mon Apr 20 18:14:20 2020 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Apr 21 07:50:54 2020 +0200 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 <[email protected]> diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 22f5995b0291..08f15270197f 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -362,7 +362,7 @@ public: void SignScriptingContent(weld::Window* pDialogParent); DECL_LINK(SignDocumentHandler, Button*, void); - virtual std::unique_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet& rItemSet); + virtual std::shared_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet& rItemSet); ErrCode CallBasic( const OUString& rMacro, const OUString& rBasicName, SbxArray* pArgs, SbxValue* pRet = nullptr ); 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 ); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 9e90dd020282..1aaa92150cc6 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -954,9 +954,9 @@ void DrawDocShell::OpenBookmark( const OUString& rBookmarkURL ) ( mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs ); } -std::unique_ptr<SfxDocumentInfoDialog> DrawDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) +std::shared_ptr<SfxDocumentInfoDialog> DrawDocShell::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); DrawDocShell* pDocSh = dynamic_cast<DrawDocShell*>(SfxObjectShell::Current()); if( pDocSh == this ) { diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index cb89e22bd446..a8d6dd3084b5 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -98,7 +98,7 @@ public: virtual SfxStyleSheetBasePool* GetStyleSheetPool() override; virtual void FillClass(SvGlobalName* pClassName, SotClipboardFormatId* pFormat, OUString* pFullTypeName, sal_Int32 nFileFormat, bool bTemplate = false ) const override; virtual void SetModified( bool = true ) override; - virtual std::unique_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, + virtual std::shared_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) override; using SfxObjectShell::GetVisArea; diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 8bdafbc3a5c8..5edc31456c61 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -261,10 +261,10 @@ void SfxObjectShell::UpdateTime_Impl( } } -std::unique_ptr<SfxDocumentInfoDialog> SfxObjectShell::CreateDocumentInfoDialog(weld::Window* pParent, +std::shared_ptr<SfxDocumentInfoDialog> SfxObjectShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet& rSet) { - return std::make_unique<SfxDocumentInfoDialog>(pParent, rSet); + return std::make_shared<SfxDocumentInfoDialog>(pParent, rSet); } std::set<Color> SfxObjectShell::GetDocColors() 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()); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
