summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/docsh.hxx3
-rw-r--r--sw/source/uibase/app/docsh2.cxx12
2 files changed, 7 insertions, 8 deletions
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index ea856f80d9c4..291b20455c17 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -117,7 +117,8 @@ class SW_DLLPUBLIC SwDocShell
override;
/// Make DocInfo known to the Doc.
- SAL_DLLPRIVATE virtual VclPtr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(const SfxItemSet &) override;
+ SAL_DLLPRIVATE virtual std::unique_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 2139a02a5240..771972fb63d5 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -147,11 +147,9 @@ using namespace ::com::sun::star;
using namespace ::sfx2;
// create DocInfo (virtual)
-VclPtr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(const SfxItemSet &rSet)
+std::unique_ptr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet)
{
- SfxViewShell* pViewShell = GetView() ? GetView() : SfxViewShell::Current();
- vcl::Window* pWindow = pViewShell ? &pViewShell->GetViewFrame()->GetWindow() : nullptr;
- VclPtr<SfxDocumentInfoDialog> pDlg = VclPtr<SfxDocumentInfoDialog>::Create(pWindow, rSet);
+ std::unique_ptr<SfxDocumentInfoDialog> xDlg = std::make_unique<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());
@@ -162,11 +160,11 @@ VclPtr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(const SfxItem
if ( pVSh && dynamic_cast< const SwSrcView *>( pVSh ) == nullptr )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- pDlg->AddFontTabPage();
- pDlg->AddTabPage(RID_SW_TP_DOC_STAT, SwResId(STR_DOC_STAT), pFact->GetTabPageCreatorFunc(RID_SW_TP_DOC_STAT));
+ xDlg->AddFontTabPage();
+ xDlg->AddTabPage("writerstats", SwResId(STR_DOC_STAT), pFact->GetTabPageCreatorFunc(RID_SW_TP_DOC_STAT));
}
}
- return pDlg;
+ return xDlg;
}
void SwDocShell::ToggleLayoutMode(SwView* pView)