From a37e559ed123789f6bc8f7972242d6461ce692ab Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 20 Sep 2019 20:29:36 +0100 Subject: disinherit OWizardPage and SfxTabPage from vcl TabPage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Caolán McNamara --- sw/source/ui/misc/docfnote.cxx | 9 ++++----- sw/source/ui/misc/impfnote.hxx | 8 +++----- sw/source/ui/misc/num.cxx | 10 ++-------- sw/source/ui/misc/outline.cxx | 4 ++-- sw/source/ui/misc/pgfnote.cxx | 10 ++-------- sw/source/ui/misc/pggrid.cxx | 10 ++-------- 6 files changed, 15 insertions(+), 36 deletions(-) (limited to 'sw/source/ui/misc') diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index c8512fac27f2..081ad7fb7f03 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -105,7 +105,6 @@ SwEndNoteOptionPage::SwEndNoteOptionPage(TabPageParent pParent, bool bEN, SwEndNoteOptionPage::~SwEndNoteOptionPage() { - disposeOnce(); } void SwEndNoteOptionPage::Reset( const SfxItemSet* ) @@ -210,9 +209,9 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet* ) m_xPageTemplBox->set_active_text(pInf->GetPageDesc(*pSh->GetDoc())->GetName()); } -VclPtr SwEndNoteOptionPage::Create( TabPageParent pParent, const SfxItemSet *rSet ) +std::unique_ptr SwEndNoteOptionPage::Create( TabPageParent pParent, const SfxItemSet *rSet ) { - return VclPtr::Create(pParent, true, *rSet); + return std::make_unique(pParent, true, *rSet); } // Different kinds of numbering; because the Listbox has varying numbers of @@ -379,9 +378,9 @@ SwFootNoteOptionPage::~SwFootNoteOptionPage() { } -VclPtr SwFootNoteOptionPage::Create(TabPageParent pParent, const SfxItemSet *rSet ) +std::unique_ptr SwFootNoteOptionPage::Create(TabPageParent pParent, const SfxItemSet *rSet ) { - return VclPtr::Create(pParent, *rSet); + return std::make_unique(pParent, *rSet); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx index fba53a2e0c5c..fb02e5732773 100644 --- a/sw/source/ui/misc/impfnote.hxx +++ b/sw/source/ui/misc/impfnote.hxx @@ -64,7 +64,7 @@ public: SwEndNoteOptionPage(TabPageParent pParent, bool bEndNote, const SfxItemSet &rSet); virtual ~SwEndNoteOptionPage() override; - static VclPtr Create(TabPageParent pParent, const SfxItemSet *rSet); + static std::unique_ptr Create(TabPageParent pParent, const SfxItemSet *rSet); virtual bool FillItemSet(SfxItemSet *rSet) override; virtual void Reset( const SfxItemSet* ) override; @@ -73,12 +73,10 @@ public: class SwFootNoteOptionPage : public SwEndNoteOptionPage { - friend class VclPtr; +public: SwFootNoteOptionPage(TabPageParent pParent, const SfxItemSet &rSet ); + static std::unique_ptr Create(TabPageParent pParent, const SfxItemSet *rSet); virtual ~SwFootNoteOptionPage() override; - -public: - static VclPtr Create(TabPageParent pParent, const SfxItemSet *rSet); }; #endif diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 20c74684f54b..a11e639f3797 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -135,15 +135,9 @@ SwNumPositionTabPage::SwNumPositionTabPage(TabPageParent pParent, const SfxItemS } SwNumPositionTabPage::~SwNumPositionTabPage() -{ - disposeOnce(); -} - -void SwNumPositionTabPage::dispose() { pActNum.reset(); pOutlineDlg = nullptr; - SfxTabPage::dispose(); } void SwNumPositionTabPage::InitControls() @@ -497,10 +491,10 @@ void SwNumPositionTabPage::ShowControlsDependingOnPosAndSpaceMode() m_xIndentAtMF->set_visible( bLabelAlignmentPosAndSpaceModeActive ); } -VclPtr SwNumPositionTabPage::Create( TabPageParent pParent, +std::unique_ptr SwNumPositionTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet) { - return VclPtr::Create(pParent, *rAttrSet); + return std::make_unique(pParent, *rAttrSet); } void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh) diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index b7b760a8222e..88353b9025a3 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -801,10 +801,10 @@ void SwOutlineSettingsTabPage::Reset( const SfxItemSet* rSet ) ActivatePage(*rSet); } -VclPtr SwOutlineSettingsTabPage::Create(TabPageParent pParent, +std::unique_ptr SwOutlineSettingsTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet) { - return VclPtr::Create(pParent, *rAttrSet); + return std::make_unique(pParent, *rAttrSet); } void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType) diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 0a93846d03d3..e4004b3c3ae4 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -130,20 +130,14 @@ SwFootNotePage::SwFootNotePage(TabPageParent pParent, const SfxItemSet &rSet) } SwFootNotePage::~SwFootNotePage() -{ - disposeOnce(); -} - -void SwFootNotePage::dispose() { m_xLineColorBox.reset(); m_xLineTypeBox.reset(); - SfxTabPage::dispose(); } -VclPtr SwFootNotePage::Create(TabPageParent pParent, const SfxItemSet *rSet) +std::unique_ptr SwFootNotePage::Create(TabPageParent pParent, const SfxItemSet *rSet) { - return VclPtr::Create(pParent, *rSet); + return std::make_unique(pParent, *rSet); } void SwFootNotePage::Reset(const SfxItemSet *rSet) diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 860f913985cd..334550268531 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -125,19 +125,13 @@ SwTextGridPage::SwTextGridPage(TabPageParent pParent, const SfxItemSet &rSet) } SwTextGridPage::~SwTextGridPage() -{ - disposeOnce(); -} - -void SwTextGridPage::dispose() { m_xColorLB.reset(); - SfxTabPage::dispose(); } -VclPtr SwTextGridPage::Create(TabPageParent pParent, const SfxItemSet *rSet) +std::unique_ptr SwTextGridPage::Create(TabPageParent pParent, const SfxItemSet *rSet) { - return VclPtr::Create(pParent, *rSet); + return std::make_unique(pParent, *rSet); } bool SwTextGridPage::FillItemSet(SfxItemSet *rSet) -- cgit