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 CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet& rItemSet); + virtual std::shared_ptr 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(ScPrintFunc( this, pPrinter, i ).GetTotalPages()) ); } -std::unique_ptr ScDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) +std::shared_ptr ScDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) { - std::unique_ptr xDlg = std::make_unique(pParent, rSet); + std::shared_ptr xDlg = std::make_shared(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 CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) override; + virtual std::shared_ptr 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 DrawDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) +std::shared_ptr DrawDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) { - std::unique_ptr xDlg = std::make_unique(pParent, rSet); + std::shared_ptr xDlg = std::make_shared(pParent, rSet); DrawDocShell* pDocSh = dynamic_cast(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 CreateDocumentInfoDialog(weld::Window* pParent, + virtual std::shared_ptr 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 SfxObjectShell::CreateDocumentInfoDialog(weld::Window* pParent, +std::shared_ptr SfxObjectShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet& rSet) { - return std::make_unique(pParent, rSet); + return std::make_shared(pParent, rSet); } std::set 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 CreateDocumentInfoDialog(weld::Window* pParent, + SAL_DLLPRIVATE virtual std::shared_ptr 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 SwDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) +std::shared_ptr SwDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) { - std::unique_ptr xDlg = std::make_unique(pParent, rSet); + std::shared_ptr xDlg = std::make_shared(pParent, rSet); //only with statistics, when this document is being shown, not //from within the Doc-Manager SwDocShell* pDocSh = static_cast( SfxObjectShell::Current());