summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/source/ui/docshell/docsh.cxx12
-rw-r--r--sc/source/ui/inc/docsh.hxx2
2 files changed, 6 insertions, 8 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index ba0b52a120b7..06d96c331c30 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2912,9 +2912,9 @@ void ScDocShell::GetDocStat( ScDocStat& rDocStat )
static_cast<sal_uInt16>(ScPrintFunc( this, pPrinter, i ).GetTotalPages()) );
}
-VclPtr<SfxDocumentInfoDialog> ScDocShell::CreateDocumentInfoDialog( const SfxItemSet &rSet )
+std::unique_ptr<SfxDocumentInfoDialog> ScDocShell::CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet)
{
- VclPtr<SfxDocumentInfoDialog> pDlg = VclPtr<SfxDocumentInfoDialog>::Create( nullptr, rSet );
+ std::unique_ptr<SfxDocumentInfoDialog> xDlg = std::make_unique<SfxDocumentInfoDialog>(pParent, rSet);
ScDocShell* pDocSh = dynamic_cast< ScDocShell *>( SfxObjectShell::Current() );
// Only for statistics, if this Doc is shown; not from the Doc Manager
@@ -2923,12 +2923,10 @@ VclPtr<SfxDocumentInfoDialog> ScDocShell::CreateDocumentInfoDialog( const SfxIte
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
::CreateTabPage ScDocStatPageCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_STAT);
OSL_ENSURE(ScDocStatPageCreate, "Tabpage create fail!");
- pDlg->AddFontTabPage();
- pDlg->AddTabPage( 42,
- ScResId( STR_DOC_STAT ),
- ScDocStatPageCreate);
+ xDlg->AddFontTabPage();
+ xDlg->AddTabPage("calcstats", ScResId(STR_DOC_STAT), ScDocStatPageCreate);
}
- return pDlg;
+ return xDlg;
}
vcl::Window* ScDocShell::GetActiveDialogParent()
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 2d8525fd7e41..1a339d3d9552 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -213,7 +213,7 @@ public:
void SetVisAreaOrSize( const tools::Rectangle& rVisArea );
- virtual VclPtr<SfxDocumentInfoDialog> CreateDocumentInfoDialog( const SfxItemSet &rSet ) override;
+ virtual std::unique_ptr<SfxDocumentInfoDialog> CreateDocumentInfoDialog(weld::Window* pParent, const SfxItemSet &rSet) override;
void GetDocStat( ScDocStat& rDocStat );