summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docsh2.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-29 10:02:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-29 14:56:04 +0200
commitaa687b22991e6c674b1d8653d52fbe9a50080174 (patch)
tree9e048b07ba05362a99ea79cc79065afc4f45c734 /sw/source/uibase/app/docsh2.cxx
parentb7b78dfc0719c3aa0e250b2992d3b04e135a26be (diff)
weld SfxDocumentInfoDialog
Change-Id: I79d5d8973a19c0e639081ec61ac596620518d0b5 Reviewed-on: https://gerrit.libreoffice.org/73145 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/app/docsh2.cxx')
-rw-r--r--sw/source/uibase/app/docsh2.cxx12
1 files changed, 5 insertions, 7 deletions
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)