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 /sc/source/ui/optdlg | |
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 'sc/source/ui/optdlg')
-rw-r--r-- | sc/source/ui/optdlg/opredlin.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpcalc.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpcompatibility.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpdefaults.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpformula.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpprint.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpusrlst.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpview.cxx | 22 |
8 files changed, 22 insertions, 34 deletions
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx index b442462b0b10..c3a4d3f0f58a 100644 --- a/sc/source/ui/optdlg/opredlin.cxx +++ b/sc/source/ui/optdlg/opredlin.cxx @@ -43,21 +43,15 @@ ScRedlineOptionsTabPage::ScRedlineOptionsTabPage(TabPageParent pParent, const Sf ScRedlineOptionsTabPage::~ScRedlineOptionsTabPage() { - disposeOnce(); -} - -void ScRedlineOptionsTabPage::dispose() -{ m_xContentColorLB.reset(); m_xRemoveColorLB.reset(); m_xInsertColorLB.reset(); m_xMoveColorLB.reset(); - SfxTabPage::dispose(); } -VclPtr<SfxTabPage> ScRedlineOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rSet ) +std::unique_ptr<SfxTabPage> ScRedlineOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rSet ) { - return VclPtr<ScRedlineOptionsTabPage>::Create( pParent, *rSet ); + return std::make_unique<ScRedlineOptionsTabPage>( pParent, *rSet ); } bool ScRedlineOptionsTabPage::FillItemSet( SfxItemSet* /* rSet */ ) diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index 12833f3dd248..5ea4b4089d08 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -77,9 +77,9 @@ void ScTpCalcOptions::Init() m_xBtnThread->connect_toggled( LINK( this, ScTpCalcOptions, CheckClickHdl ) ); } -VclPtr<SfxTabPage> ScTpCalcOptions::Create( TabPageParent pParent, const SfxItemSet* rAttrSet ) +std::unique_ptr<SfxTabPage> ScTpCalcOptions::Create( TabPageParent pParent, const SfxItemSet* rAttrSet ) { - return VclPtr<ScTpCalcOptions>::Create( pParent, *rAttrSet ); + return std::make_unique<ScTpCalcOptions>( pParent, *rAttrSet ); } void ScTpCalcOptions::Reset( const SfxItemSet* /* rCoreAttrs */ ) diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx index a7b2dd16dd35..17493b6948c3 100644 --- a/sc/source/ui/optdlg/tpcompatibility.cxx +++ b/sc/source/ui/optdlg/tpcompatibility.cxx @@ -25,9 +25,9 @@ ScTpCompatOptions::~ScTpCompatOptions() { } -VclPtr<SfxTabPage> ScTpCompatOptions::Create(TabPageParent pParent, const SfxItemSet *rCoreAttrs) +std::unique_ptr<SfxTabPage> ScTpCompatOptions::Create(TabPageParent pParent, const SfxItemSet *rCoreAttrs) { - return VclPtr<ScTpCompatOptions>::Create(pParent, *rCoreAttrs); + return std::make_unique<ScTpCompatOptions>(pParent, *rCoreAttrs); } bool ScTpCompatOptions::FillItemSet(SfxItemSet *rCoreAttrs) diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx index 9fd4e9155721..456053258d48 100644 --- a/sc/source/ui/optdlg/tpdefaults.cxx +++ b/sc/source/ui/optdlg/tpdefaults.cxx @@ -28,9 +28,9 @@ ScTpDefaultsOptions::~ScTpDefaultsOptions() { } -VclPtr<SfxTabPage> ScTpDefaultsOptions::Create(TabPageParent pParent, const SfxItemSet *rCoreAttrs) +std::unique_ptr<SfxTabPage> ScTpDefaultsOptions::Create(TabPageParent pParent, const SfxItemSet *rCoreAttrs) { - return VclPtr<ScTpDefaultsOptions>::Create(pParent, *rCoreAttrs); + return std::make_unique<ScTpDefaultsOptions>(pParent, *rCoreAttrs); } bool ScTpDefaultsOptions::FillItemSet(SfxItemSet *rCoreSet) diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index 97ea25373814..2edc691e3541 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -203,9 +203,9 @@ IMPL_LINK( ScTpFormulaOptions, SepEditOnFocusHdl, weld::Widget&, rControl, void OnFocusSeparatorInput(dynamic_cast<weld::Entry*>(&rControl)); } -VclPtr<SfxTabPage> ScTpFormulaOptions::Create(TabPageParent pParent, const SfxItemSet* rCoreSet) +std::unique_ptr<SfxTabPage> ScTpFormulaOptions::Create(TabPageParent pParent, const SfxItemSet* rCoreSet) { - return VclPtr<ScTpFormulaOptions>::Create(pParent, *rCoreSet); + return std::make_unique<ScTpFormulaOptions>(pParent, *rCoreSet); } bool ScTpFormulaOptions::FillItemSet(SfxItemSet* rCoreSet) diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx index f38a2f5cc7b7..b3c5ee139f00 100644 --- a/sc/source/ui/optdlg/tpprint.cxx +++ b/sc/source/ui/optdlg/tpprint.cxx @@ -39,9 +39,9 @@ ScTpPrintOptions::~ScTpPrintOptions() { } -VclPtr<SfxTabPage> ScTpPrintOptions::Create(TabPageParent pParent, const SfxItemSet* rAttrSet) +std::unique_ptr<SfxTabPage> ScTpPrintOptions::Create(TabPageParent pParent, const SfxItemSet* rAttrSet) { - return VclPtr<ScTpPrintOptions>::Create(pParent, *rAttrSet); + return std::make_unique<ScTpPrintOptions>(pParent, *rAttrSet); } DeactivateRC ScTpPrintOptions::DeactivatePage( SfxItemSet* pSetP ) diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index 9d0f8f7f3437..3d7120935e9d 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -128,9 +128,9 @@ void ScTpUserLists::Init() } -VclPtr<SfxTabPage> ScTpUserLists::Create( TabPageParent pParent, const SfxItemSet* rAttrSet ) +std::unique_ptr<SfxTabPage> ScTpUserLists::Create( TabPageParent pParent, const SfxItemSet* rAttrSet ) { - return VclPtr<ScTpUserLists>::Create(pParent, *rAttrSet); + return std::make_unique<ScTpUserLists>(pParent, *rAttrSet); } void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs ) diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index c26ff3bacfe1..0fff707bac20 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -87,19 +87,13 @@ ScTpContentOptions::ScTpContentOptions(TabPageParent pParent, const SfxItemSet& ScTpContentOptions::~ScTpContentOptions() { - disposeOnce(); -} - -void ScTpContentOptions::dispose() -{ m_xColorLB.reset(); - SfxTabPage::dispose(); } -VclPtr<SfxTabPage> ScTpContentOptions::Create( TabPageParent pParent, +std::unique_ptr<SfxTabPage> ScTpContentOptions::Create( TabPageParent pParent, const SfxItemSet* rCoreSet ) { - return VclPtr<ScTpContentOptions>::Create(pParent, *rCoreSet); + return std::make_unique<ScTpContentOptions>(pParent, *rCoreSet); } bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet ) @@ -359,15 +353,15 @@ ScTpLayoutOptions::~ScTpLayoutOptions() { } -VclPtr<SfxTabPage> ScTpLayoutOptions::Create( TabPageParent pParent, +std::unique_ptr<SfxTabPage> ScTpLayoutOptions::Create( TabPageParent pParent, const SfxItemSet* rCoreSet ) { - VclPtrInstance<ScTpLayoutOptions> pNew( pParent, *rCoreSet ); - ScDocShell* pDocSh = dynamic_cast< ScDocShell *>( SfxObjectShell::Current() ); + auto xNew = std::make_unique<ScTpLayoutOptions>(pParent, *rCoreSet); - if(pDocSh!=nullptr) - pNew->pDoc = &pDocSh->GetDocument(); - return pNew; + ScDocShell* pDocSh = dynamic_cast< ScDocShell *>( SfxObjectShell::Current() ); + if (pDocSh!=nullptr) + xNew->pDoc = &pDocSh->GetDocument(); + return xNew; } bool ScTpLayoutOptions::FillItemSet( SfxItemSet* rCoreSet ) |