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 /sw/source/ui/misc | |
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 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/docfnote.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/misc/impfnote.hxx | 8 | ||||
-rw-r--r-- | sw/source/ui/misc/num.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/pgfnote.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 10 |
6 files changed, 15 insertions, 36 deletions
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<SfxTabPage> SwEndNoteOptionPage::Create( TabPageParent pParent, const SfxItemSet *rSet ) +std::unique_ptr<SfxTabPage> SwEndNoteOptionPage::Create( TabPageParent pParent, const SfxItemSet *rSet ) { - return VclPtr<SwEndNoteOptionPage>::Create(pParent, true, *rSet); + return std::make_unique<SwEndNoteOptionPage>(pParent, true, *rSet); } // Different kinds of numbering; because the Listbox has varying numbers of @@ -379,9 +378,9 @@ SwFootNoteOptionPage::~SwFootNoteOptionPage() { } -VclPtr<SfxTabPage> SwFootNoteOptionPage::Create(TabPageParent pParent, const SfxItemSet *rSet ) +std::unique_ptr<SfxTabPage> SwFootNoteOptionPage::Create(TabPageParent pParent, const SfxItemSet *rSet ) { - return VclPtr<SwFootNoteOptionPage>::Create(pParent, *rSet); + return std::make_unique<SwFootNoteOptionPage>(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<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet); + static std::unique_ptr<SfxTabPage> 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<SwFootNoteOptionPage>; +public: SwFootNoteOptionPage(TabPageParent pParent, const SfxItemSet &rSet ); + static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet); virtual ~SwFootNoteOptionPage() override; - -public: - static VclPtr<SfxTabPage> 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 @@ -136,14 +136,8 @@ 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<SfxTabPage> SwNumPositionTabPage::Create( TabPageParent pParent, +std::unique_ptr<SfxTabPage> SwNumPositionTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet) { - return VclPtr<SwNumPositionTabPage>::Create(pParent, *rAttrSet); + return std::make_unique<SwNumPositionTabPage>(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<SfxTabPage> SwOutlineSettingsTabPage::Create(TabPageParent pParent, +std::unique_ptr<SfxTabPage> SwOutlineSettingsTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet) { - return VclPtr<SwOutlineSettingsTabPage>::Create(pParent, *rAttrSet); + return std::make_unique<SwOutlineSettingsTabPage>(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 @@ -131,19 +131,13 @@ SwFootNotePage::SwFootNotePage(TabPageParent pParent, const SfxItemSet &rSet) SwFootNotePage::~SwFootNotePage() { - disposeOnce(); -} - -void SwFootNotePage::dispose() -{ m_xLineColorBox.reset(); m_xLineTypeBox.reset(); - SfxTabPage::dispose(); } -VclPtr<SfxTabPage> SwFootNotePage::Create(TabPageParent pParent, const SfxItemSet *rSet) +std::unique_ptr<SfxTabPage> SwFootNotePage::Create(TabPageParent pParent, const SfxItemSet *rSet) { - return VclPtr<SwFootNotePage>::Create(pParent, *rSet); + return std::make_unique<SwFootNotePage>(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 @@ -126,18 +126,12 @@ SwTextGridPage::SwTextGridPage(TabPageParent pParent, const SfxItemSet &rSet) SwTextGridPage::~SwTextGridPage() { - disposeOnce(); -} - -void SwTextGridPage::dispose() -{ m_xColorLB.reset(); - SfxTabPage::dispose(); } -VclPtr<SfxTabPage> SwTextGridPage::Create(TabPageParent pParent, const SfxItemSet *rSet) +std::unique_ptr<SfxTabPage> SwTextGridPage::Create(TabPageParent pParent, const SfxItemSet *rSet) { - return VclPtr<SwTextGridPage>::Create(pParent, *rSet); + return std::make_unique<SwTextGridPage>(pParent, *rSet); } bool SwTextGridPage::FillItemSet(SfxItemSet *rSet) |