diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-20 20:29:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-26 09:54:18 +0200 |
commit | a37e559ed123789f6bc8f7972242d6461ce692ab (patch) | |
tree | 7c6304b4541335b2bb706efda58b882132fe3819 /sfx2/source/view | |
parent | b3f249c1351642be6f2774230ff80a6d20bd1401 (diff) |
disinherit OWizardPage and SfxTabPage from vcl TabPage
Now that there's no need to support weld/unwelded mixes of
pages in dialog any more.
inherit from a BuilderPage which contains a Builder and
Toplevel container
BuilderPage Activate and Deactivate replace TabPage ActivatePage and
DeactivatePage, allowing disambiguation wrt SfxTabPage ActivatePage and
DeactivatePage.
Change-Id: I5706e50fd92f712a25328ee9791e054bb9ad9812
Reviewed-on: https://gerrit.libreoffice.org/79317
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/view')
-rw-r--r-- | sfx2/source/view/printer.cxx | 19 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 8 |
2 files changed, 10 insertions, 17 deletions
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index f7b23937ce27..802e6f07a799 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -171,34 +171,31 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog(weld::Window *pParent, , pOptions(pSet->Clone()) , m_xHelpBtn(m_xBuilder->weld_widget("help")) , m_xContainer(m_xDialog->weld_content_area()) + , m_xPage(pViewShell->CreatePrintOptionsPage(TabPageParent(m_xContainer.get(), this), *pOptions)) // Insert TabPage { - // Insert TabPage - pPage.reset(pViewShell->CreatePrintOptionsPage(TabPageParent(m_xContainer.get(), this), *pOptions)); - DBG_ASSERT( pPage, "CreatePrintOptions != SFX_VIEW_HAS_PRINTOPTIONS" ); - if( pPage ) + DBG_ASSERT( m_xPage, "CreatePrintOptions != SFX_VIEW_HAS_PRINTOPTIONS" ); + if (m_xPage) { - pPage->Reset( pOptions.get() ); - m_xDialog->set_help_id(pPage->GetHelpId()); + m_xPage->Reset( pOptions.get() ); + m_xDialog->set_help_id(m_xPage->GetHelpId()); } } - SfxPrintOptionsDialog::~SfxPrintOptionsDialog() { - pPage.disposeAndClear(); } short SfxPrintOptionsDialog::run() { - if (!pPage) + if (!m_xPage) return RET_CANCEL; short nRet = GenericDialogController::run(); if (nRet == RET_OK) - pPage->FillItemSet( pOptions.get() ); + m_xPage->FillItemSet( pOptions.get() ); else - pPage->Reset( pOptions.get() ); + m_xPage->Reset( pOptions.get() ); return nRet; } diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 9be92b23ba15..46a6842b466f 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -900,13 +900,9 @@ sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, SfxPrinterChan return 0; } -VclPtr<SfxTabPage> SfxViewShell::CreatePrintOptionsPage -( - TabPageParent /*pParent*/, - const SfxItemSet& /*rOptions*/ -) +std::unique_ptr<SfxTabPage> SfxViewShell::CreatePrintOptionsPage(TabPageParent /*pParent*/, const SfxItemSet& /*rOptions*/) { - return VclPtr<SfxTabPage>(); + return nullptr; } bool SfxViewShell::HasPrintOptionsPage() const |