summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-20 20:29:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-09-26 09:54:18 +0200
commita37e559ed123789f6bc8f7972242d6461ce692ab (patch)
tree7c6304b4541335b2bb706efda58b882132fe3819 /sc
parentb3f249c1351642be6f2774230ff80a6d20bd1401 (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')
-rw-r--r--sc/inc/scmod.hxx2
-rw-r--r--sc/source/ui/app/scmod.cxx28
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx5
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx14
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx18
-rw-r--r--sc/source/ui/dbgui/validate.cxx20
-rw-r--r--sc/source/ui/docshell/tpstat.cxx4
-rw-r--r--sc/source/ui/inc/opredlin.hxx4
-rw-r--r--sc/source/ui/inc/prevwsh.hxx2
-rw-r--r--sc/source/ui/inc/scuitphfedit.hxx20
-rw-r--r--sc/source/ui/inc/tabpages.hxx13
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx2
-rw-r--r--sc/source/ui/inc/tpcalc.hxx11
-rw-r--r--sc/source/ui/inc/tpcompatibility.hxx10
-rw-r--r--sc/source/ui/inc/tpdefaults.hxx10
-rw-r--r--sc/source/ui/inc/tpformula.hxx9
-rw-r--r--sc/source/ui/inc/tphf.hxx17
-rw-r--r--sc/source/ui/inc/tpprint.hxx7
-rw-r--r--sc/source/ui/inc/tpsort.hxx11
-rw-r--r--sc/source/ui/inc/tpstat.hxx8
-rw-r--r--sc/source/ui/inc/tpsubt.hxx33
-rw-r--r--sc/source/ui/inc/tptable.hxx11
-rw-r--r--sc/source/ui/inc/tpusrlst.hxx12
-rw-r--r--sc/source/ui/inc/tpview.hxx19
-rw-r--r--sc/source/ui/inc/validate.hxx14
-rw-r--r--sc/source/ui/optdlg/opredlin.cxx10
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx4
-rw-r--r--sc/source/ui/optdlg/tpcompatibility.cxx4
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx4
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx4
-rw-r--r--sc/source/ui/optdlg/tpprint.cxx4
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx4
-rw-r--r--sc/source/ui/optdlg/tpview.cxx22
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx17
-rw-r--r--sc/source/ui/pagedlg/tphf.cxx22
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx12
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
38 files changed, 148 insertions, 271 deletions
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index ecc483583e5e..1f9067a58b5e 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -234,7 +234,7 @@ public:
// virtual methods for the options dialog
virtual std::unique_ptr<SfxItemSet> CreateItemSet( sal_uInt16 nId ) override;
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override;
- virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet ) override;
+ virtual std::unique_ptr<SfxTabPage> CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet ) override;
virtual std::unique_ptr<SfxStyleFamilies> CreateStyleFamilies() override;
void SetInSharedDocLoading( bool bNew ) { m_bIsInSharedDocLoading = bNew; }
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index e21a83310256..77ba4c0f4e97 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2025,9 +2025,9 @@ void ScModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
}
-VclPtr<SfxTabPage> ScModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet )
+std::unique_ptr<SfxTabPage> ScModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet )
{
- VclPtr<SfxTabPage> pRet;
+ std::unique_ptr<SfxTabPage> xRet;
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
switch(nId)
{
@@ -2035,73 +2035,73 @@ VclPtr<SfxTabPage> ScModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen
{
::CreateTabPage ScTpLayoutOptionsCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_LAYOUT);
if (ScTpLayoutOptionsCreate)
- pRet = (*ScTpLayoutOptionsCreate)(pParent, &rSet);
+ xRet = (*ScTpLayoutOptionsCreate)(pParent, &rSet);
break;
}
case SID_SC_TP_CONTENT:
{
::CreateTabPage ScTpContentOptionsCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_CONTENT);
if (ScTpContentOptionsCreate)
- pRet = (*ScTpContentOptionsCreate)(pParent, &rSet);
+ xRet = (*ScTpContentOptionsCreate)(pParent, &rSet);
break;
}
case SID_SC_TP_GRID:
- pRet = SvxGridTabPage::Create(pParent, rSet);
+ xRet = SvxGridTabPage::Create(pParent, rSet);
break;
case SID_SC_TP_USERLISTS:
{
::CreateTabPage ScTpUserListsCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_USERLISTS);
if (ScTpUserListsCreate)
- pRet = (*ScTpUserListsCreate)(pParent, &rSet);
+ xRet = (*ScTpUserListsCreate)(pParent, &rSet);
break;
}
case SID_SC_TP_CALC:
{
::CreateTabPage ScTpCalcOptionsCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_CALC);
if (ScTpCalcOptionsCreate)
- pRet = (*ScTpCalcOptionsCreate)(pParent, &rSet);
+ xRet = (*ScTpCalcOptionsCreate)(pParent, &rSet);
break;
}
case SID_SC_TP_FORMULA:
{
::CreateTabPage ScTpFormulaOptionsCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_FORMULA);
if (ScTpFormulaOptionsCreate)
- pRet = (*ScTpFormulaOptionsCreate)(pParent, &rSet);
+ xRet = (*ScTpFormulaOptionsCreate)(pParent, &rSet);
break;
}
case SID_SC_TP_COMPATIBILITY:
{
::CreateTabPage ScTpCompatOptionsCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_COMPATIBILITY);
if (ScTpCompatOptionsCreate)
- pRet = (*ScTpCompatOptionsCreate)(pParent, &rSet);
+ xRet = (*ScTpCompatOptionsCreate)(pParent, &rSet);
break;
}
case SID_SC_TP_CHANGES:
{
::CreateTabPage ScRedlineOptionsTabPageCreate = pFact->GetTabPageCreatorFunc(SID_SC_TP_CHANGES);
if (ScRedlineOptionsTabPageCreate)
- pRet =(*ScRedlineOptionsTabPageCreate)(pParent, &rSet);
+ xRet =(*ScRedlineOptionsTabPageCreate)(pParent, &rSet);
break;
}
case RID_SC_TP_PRINT:
{
::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc(RID_SC_TP_PRINT);
if (ScTpPrintOptionsCreate)
- pRet = (*ScTpPrintOptionsCreate)(pParent, &rSet);
+ xRet = (*ScTpPrintOptionsCreate)(pParent, &rSet);
break;
}
case RID_SC_TP_DEFAULTS:
{
::CreateTabPage ScTpDefaultsOptionsCreate = pFact->GetTabPageCreatorFunc(RID_SC_TP_DEFAULTS);
if (ScTpDefaultsOptionsCreate)
- pRet = (*ScTpDefaultsOptionsCreate)(pParent, &rSet);
+ xRet = (*ScTpDefaultsOptionsCreate)(pParent, &rSet);
break;
}
}
- OSL_ENSURE( pRet, "ScModule::CreateTabPage(): no valid ID for TabPage!" );
+ OSL_ENSURE( xRet, "ScModule::CreateTabPage(): no valid ID for TabPage!" );
- return pRet;
+ return xRet;
}
IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void )
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 6f6fb3928ed7..68f720b3f88d 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -55,12 +55,11 @@ ScTabPageProtection::ScTabPageProtection(TabPageParent pParent, const SfxItemSet
ScTabPageProtection::~ScTabPageProtection()
{
- disposeOnce();
}
-VclPtr<SfxTabPage> ScTabPageProtection::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
+std::unique_ptr<SfxTabPage> ScTabPageProtection::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{
- return VclPtr<ScTabPageProtection>::Create(pParent, *rAttrSet);
+ return std::make_unique<ScTabPageProtection>(pParent, *rAttrSet);
}
void ScTabPageProtection::Reset( const SfxItemSet* rCoreAttrs )
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 1df0446cf722..4af234bcfbc4 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -100,15 +100,9 @@ ScTabPageSortFields::ScTabPageSortFields(TabPageParent pParent, const SfxItemSet
ScTabPageSortFields::~ScTabPageSortFields()
{
- disposeOnce();
-}
-
-void ScTabPageSortFields::dispose()
-{
m_aSortWin.m_aSortKeyItems.clear();
m_xBox.reset();
m_xScrolledWindow.reset();
- SfxTabPage::dispose();
}
void ScTabPageSortFields::Init()
@@ -129,9 +123,9 @@ void ScTabPageSortFields::Init()
}
}
-VclPtr<SfxTabPage> ScTabPageSortFields::Create(TabPageParent pParent, const SfxItemSet* pArgSet)
+std::unique_ptr<SfxTabPage> ScTabPageSortFields::Create(TabPageParent pParent, const SfxItemSet* pArgSet)
{
- return VclPtr<ScTabPageSortFields>::Create(pParent, *pArgSet);
+ return std::make_unique<ScTabPageSortFields>(pParent, *pArgSet);
}
void ScTabPageSortFields::Reset( const SfxItemSet* /* rArgSet */ )
@@ -580,9 +574,9 @@ void ScTabPageSortOptions::Init()
m_xLbLanguage->InsertLanguage( LANGUAGE_SYSTEM );
}
-VclPtr<SfxTabPage> ScTabPageSortOptions::Create(TabPageParent pParent, const SfxItemSet* rArgSet)
+std::unique_ptr<SfxTabPage> ScTabPageSortOptions::Create(TabPageParent pParent, const SfxItemSet* rArgSet)
{
- return VclPtr<ScTabPageSortOptions>::Create(pParent, *rArgSet);
+ return std::make_unique<ScTabPageSortOptions>(pParent, *rArgSet);
}
void ScTabPageSortOptions::Reset( const SfxItemSet* /* rArgSet */ )
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 260efb9e8b90..7cf70ff0c3dc 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -66,7 +66,6 @@ ScTpSubTotalGroup::ScTpSubTotalGroup(TabPageParent pParent, const SfxItemSet& rA
ScTpSubTotalGroup::~ScTpSubTotalGroup()
{
- disposeOnce();
}
void ScTpSubTotalGroup::Init()
@@ -373,22 +372,22 @@ IMPL_LINK( ScTpSubTotalGroup, CheckHdl, const row_col&, rRowCol, void )
// Derived Group TabPages:
-VclPtr<SfxTabPage> ScTpSubTotalGroup1::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> ScTpSubTotalGroup1::Create( TabPageParent pParent,
const SfxItemSet* rArgSet )
{
- return VclPtr<ScTpSubTotalGroup1>::Create( pParent, *rArgSet );
+ return std::make_unique<ScTpSubTotalGroup1>( pParent, *rArgSet );
}
-VclPtr<SfxTabPage> ScTpSubTotalGroup2::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> ScTpSubTotalGroup2::Create( TabPageParent pParent,
const SfxItemSet* rArgSet )
{
- return VclPtr<ScTpSubTotalGroup2>::Create( pParent, *rArgSet );
+ return std::make_unique<ScTpSubTotalGroup2>( pParent, *rArgSet );
}
-VclPtr<SfxTabPage> ScTpSubTotalGroup3::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> ScTpSubTotalGroup3::Create( TabPageParent pParent,
const SfxItemSet* rArgSet )
{
- return VclPtr<ScTpSubTotalGroup3>::Create( pParent, *rArgSet );
+ return std::make_unique<ScTpSubTotalGroup3>( pParent, *rArgSet );
}
ScTpSubTotalGroup1::ScTpSubTotalGroup1( TabPageParent pParent, const SfxItemSet& rArgSet ) :
@@ -443,7 +442,6 @@ ScTpSubTotalOptions::ScTpSubTotalOptions(TabPageParent pParent, const SfxItemSet
ScTpSubTotalOptions::~ScTpSubTotalOptions()
{
- disposeOnce();
}
void ScTpSubTotalOptions::Init()
@@ -462,10 +460,10 @@ void ScTpSubTotalOptions::Init()
FillUserSortListBox();
}
-VclPtr<SfxTabPage> ScTpSubTotalOptions::Create(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> ScTpSubTotalOptions::Create(TabPageParent pParent,
const SfxItemSet* rArgSet)
{
- return VclPtr<ScTpSubTotalOptions>::Create(pParent, *rArgSet);
+ return std::make_unique<ScTpSubTotalOptions>(pParent, *rArgSet);
}
void ScTpSubTotalOptions::Reset( const SfxItemSet* /* rArgSet */ )
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index d9f1b00a4a48..de6504b55363 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -377,17 +377,11 @@ ScTPValidationValue::ScTPValidationValue(TabPageParent pParent, const SfxItemSet
ScTPValidationValue::~ScTPValidationValue()
{
- disposeOnce();
-}
-
-void ScTPValidationValue::dispose()
-{
m_xEdMin.reset();
m_xEdMin.reset();
m_xEdMax.reset();
m_xBtnRef.reset();
m_xEdMax.reset();
- SfxTabPage::dispose();
}
void ScTPValidationValue::Init()
@@ -410,9 +404,9 @@ void ScTPValidationValue::Init()
CheckHdl( *m_xCbShow );
}
-VclPtr<SfxTabPage> ScTPValidationValue::Create(TabPageParent pParent, const SfxItemSet* rArgSet)
+std::unique_ptr<SfxTabPage> ScTPValidationValue::Create(TabPageParent pParent, const SfxItemSet* rArgSet)
{
- return VclPtr<ScTPValidationValue>::Create(pParent, *rArgSet);
+ return std::make_unique<ScTPValidationValue>(pParent, *rArgSet);
}
void ScTPValidationValue::Reset( const SfxItemSet* rArgSet )
@@ -695,13 +689,12 @@ ScTPValidationHelp::ScTPValidationHelp(TabPageParent pParent, const SfxItemSet&
ScTPValidationHelp::~ScTPValidationHelp()
{
- disposeOnce();
}
-VclPtr<SfxTabPage> ScTPValidationHelp::Create(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> ScTPValidationHelp::Create(TabPageParent pParent,
const SfxItemSet* rArgSet)
{
- return VclPtr<ScTPValidationHelp>::Create(pParent, *rArgSet);
+ return std::make_unique<ScTPValidationHelp>(pParent, *rArgSet);
}
void ScTPValidationHelp::Reset( const SfxItemSet* rArgSet )
@@ -754,7 +747,6 @@ ScTPValidationError::ScTPValidationError(TabPageParent pParent,
ScTPValidationError::~ScTPValidationError()
{
- disposeOnce();
}
void ScTPValidationError::Init()
@@ -767,10 +759,10 @@ void ScTPValidationError::Init()
SelectActionHdl(*m_xLbAction);
}
-VclPtr<SfxTabPage> ScTPValidationError::Create(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> ScTPValidationError::Create(TabPageParent pParent,
const SfxItemSet* rArgSet)
{
- return VclPtr<ScTPValidationError>::Create(pParent, *rArgSet);
+ return std::make_unique<ScTPValidationError>(pParent, *rArgSet);
}
void ScTPValidationError::Reset( const SfxItemSet* rArgSet )
diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx
index 7e73874e83ed..615d7de0a13c 100644
--- a/sc/source/ui/docshell/tpstat.cxx
+++ b/sc/source/ui/docshell/tpstat.cxx
@@ -28,9 +28,9 @@
// Dokumentinfo-Tabpage:
-VclPtr<SfxTabPage> ScDocStatPage::Create( TabPageParent pParent, const SfxItemSet* rSet )
+std::unique_ptr<SfxTabPage> ScDocStatPage::Create( TabPageParent pParent, const SfxItemSet* rSet )
{
- return VclPtr<ScDocStatPage>::Create( pParent, *rSet );
+ return std::make_unique<ScDocStatPage>( pParent, *rSet );
}
ScDocStatPage::ScDocStatPage(TabPageParent pParent, const SfxItemSet& rSet)
diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx
index 37181873b4d6..dba8539c90d2 100644
--- a/sc/source/ui/inc/opredlin.hxx
+++ b/sc/source/ui/inc/opredlin.hxx
@@ -31,11 +31,9 @@ class ScRedlineOptionsTabPage : public SfxTabPage
std::unique_ptr<ColorListBox> m_xMoveColorLB;
public:
-
ScRedlineOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet );
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
virtual ~ScRedlineOptionsTabPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 5511d7c661da..8c2660ea5319 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -104,7 +104,7 @@ public:
virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
virtual bool HasPrintOptionsPage() const override;
- virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) override;
+ virtual std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) override;
void AddAccessibilityObject( SfxListener& rObject );
void RemoveAccessibilityObject( SfxListener& rObject );
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index d377a12d0cba..0f114fa13d9c 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -115,41 +115,29 @@ private:
class ScRightHeaderEditPage : public ScHFEditPage
{
- friend class VclPtr<ScRightHeaderEditPage>;
public:
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
-
-private:
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
ScRightHeaderEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
class ScLeftHeaderEditPage : public ScHFEditPage
{
- friend class VclPtr<ScLeftHeaderEditPage>;
public:
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
-
-private:
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
ScLeftHeaderEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
class ScRightFooterEditPage : public ScHFEditPage
{
- friend class VclPtr<ScRightFooterEditPage>;
public:
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
-
-private:
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
ScRightFooterEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
class ScLeftFooterEditPage : public ScHFEditPage
{
- friend class VclPtr<ScLeftFooterEditPage>;
public:
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
-
-private:
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
ScLeftFooterEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index 16046ab4f6bc..9cdffb2144d3 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -24,24 +24,21 @@
class ScTabPageProtection : public SfxTabPage
{
- friend class VclPtr<ScTabPageProtection>;
static const sal_uInt16 pProtectionRanges[];
public:
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rAttrSet );
+ ScTabPageProtection(TabPageParent pParent, const SfxItemSet& rCoreAttrs);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent,
+ const SfxItemSet* rAttrSet);
+ virtual ~ScTabPageProtection() override;
+
static const sal_uInt16* GetRanges () { return pProtectionRanges; }
virtual bool FillItemSet ( SfxItemSet* rCoreAttrs ) override;
virtual void Reset ( const SfxItemSet* ) override;
- virtual ~ScTabPageProtection() override;
-
protected:
- using SfxTabPage::DeactivatePage;
virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override;
private:
- ScTabPageProtection(TabPageParent pParent, const SfxItemSet& rCoreAttrs);
-private:
// current status:
bool bTriEnabled; // if before - DontCare
bool bDontCare; // all in TriState
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 50b9a0913c4b..3b6005afa36f 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -319,7 +319,7 @@ public:
SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
virtual bool HasPrintOptionsPage() const override;
- virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) override;
+ virtual std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) override;
void ConnectObject( const SdrOle2Obj* pObj );
void ActivateObject( SdrOle2Obj* pObj, long nVerb );
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
index 6c878380c7c8..d32704f496f4 100644
--- a/sc/source/ui/inc/tpcalc.hxx
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -27,20 +27,15 @@ class ScDocOptions;
class ScTpCalcOptions : public SfxTabPage
{
- friend class VclPtr<ScTpCalcOptions>;
public:
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rCoreSet );
+ ScTpCalcOptions(TabPageParent pParent, const SfxItemSet& rCoreSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rCoreSet);
+ virtual ~ScTpCalcOptions() override;
virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override;
virtual void Reset ( const SfxItemSet* rCoreSet ) override;
- using SfxTabPage::DeactivatePage;
virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override;
private:
- ScTpCalcOptions(TabPageParent pParent, const SfxItemSet& rCoreSet);
- virtual ~ScTpCalcOptions() override;
-
-private:
std::unique_ptr<ScDocOptions> pOldOptions;
std::unique_ptr<ScDocOptions> pLocalOptions;
sal_uInt16 const nWhichCalc;
diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx
index 7d895a644279..4bceec955a15 100644
--- a/sc/source/ui/inc/tpcompatibility.hxx
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -14,19 +14,15 @@
class ScTpCompatOptions : public SfxTabPage
{
- friend class VclPtr<ScTpCompatOptions>;
public:
- using SfxTabPage::DeactivatePage;
-
- static VclPtr<SfxTabPage> Create (TabPageParent pParent, const SfxItemSet* rCoreAttrs);
+ explicit ScTpCompatOptions(TabPageParent pParent, const SfxItemSet& rCoreAttrs);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rCoreAttrs);
+ virtual ~ScTpCompatOptions() override;
virtual bool FillItemSet(SfxItemSet* rCoreAttrs) override;
virtual void Reset(const SfxItemSet* rCoreAttrs) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet ) override;
- virtual ~ScTpCompatOptions() override;
-private:
- explicit ScTpCompatOptions(TabPageParent pParent, const SfxItemSet& rCoreAttrs);
private:
std::unique_ptr<weld::ComboBox> m_xLbKeyBindings;
};
diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx
index 59be1c7a73b0..a2a88e7e95f9 100644
--- a/sc/source/ui/inc/tpdefaults.hxx
+++ b/sc/source/ui/inc/tpdefaults.hxx
@@ -15,20 +15,16 @@
class ScTpDefaultsOptions : public SfxTabPage
{
- friend class VclPtr<ScTpDefaultsOptions>;
public:
- using SfxTabPage::DeactivatePage;
-
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rCoreSet);
+ explicit ScTpDefaultsOptions(TabPageParent pParent, const SfxItemSet& rCoreSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rCoreSet);
+ virtual ~ScTpDefaultsOptions() override;
virtual bool FillItemSet(SfxItemSet* rCoreSet) override;
virtual void Reset(const SfxItemSet* rCoreSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
private:
- explicit ScTpDefaultsOptions(TabPageParent pParent, const SfxItemSet& rCoreSet);
- virtual ~ScTpDefaultsOptions() override;
-
void CheckNumSheets();
void CheckPrefix();
void OnFocusPrefixInput();
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index dd7ec5ced453..2aee580c16a3 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -27,19 +27,16 @@
class ScTpFormulaOptions : public SfxTabPage
{
- friend class VclPtr<ScTpFormulaOptions>;
public:
- using SfxTabPage::DeactivatePage;
-
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rCoreSet);
+ explicit ScTpFormulaOptions(TabPageParent pParent, const SfxItemSet& rCoreSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rCoreSet);
+ virtual ~ScTpFormulaOptions() override;
virtual bool FillItemSet(SfxItemSet* rCoreSet) override;
virtual void Reset( const SfxItemSet* rCoreSet ) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet ) override;
private:
- explicit ScTpFormulaOptions(TabPageParent pParent, const SfxItemSet& rCoreSet);
- virtual ~ScTpFormulaOptions() override;
void ResetSeparators();
void OnFocusSeparatorInput(weld::Entry* pEdit);
void UpdateCustomCalcRadioButtons(bool bDefault);
diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx
index 94a8b28c1186..17d7c2a598aa 100644
--- a/sc/source/ui/inc/tphf.hxx
+++ b/sc/source/ui/inc/tphf.hxx
@@ -28,7 +28,6 @@ class ScHFPage : public SvxHFPage
{
public:
virtual ~ScHFPage() override;
- virtual void dispose() override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual bool FillItemSet( SfxItemSet* rOutSet ) override;
@@ -39,8 +38,6 @@ public:
protected:
ScHFPage(TabPageParent pParent, const SfxItemSet& rSet, sal_uInt16 nSetId);
- virtual void ActivatePage() override;
- virtual void DeactivatePage() override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
@@ -58,24 +55,18 @@ private:
class ScHeaderPage : public ScHFPage
{
- friend class VclPtr<ScHeaderPage>;
public:
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rSet );
- static const sal_uInt16* GetRanges();
-
-private:
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rSet );
ScHeaderPage(TabPageParent pParent, const SfxItemSet& rSet);
+ static const sal_uInt16* GetRanges();
};
class ScFooterPage : public ScHFPage
{
- friend class VclPtr<ScFooterPage>;
public:
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rSet );
- static const sal_uInt16* GetRanges();
-
-private:
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rSet );
ScFooterPage(TabPageParent pParent, const SfxItemSet& rSet);
+ static const sal_uInt16* GetRanges();
};
#endif // INCLUDED_SC_SOURCE_UI_INC_TPHF_HXX
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index 9ddae6ec4dae..ef15a39b7537 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -24,18 +24,17 @@
class ScTpPrintOptions : public SfxTabPage
{
- friend class VclPtr<ScTpPrintOptions>;
std::unique_ptr<weld::CheckButton> m_xSkipEmptyPagesCB;
std::unique_ptr<weld::CheckButton> m_xSelectedSheetsCB;
std::unique_ptr<weld::CheckButton> m_xForceBreaksCB;
- ScTpPrintOptions(TabPageParent pPage, const SfxItemSet& rCoreSet);
public:
+ ScTpPrintOptions(TabPageParent pPage, const SfxItemSet& rCoreSet);
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
virtual ~ScTpPrintOptions() override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
+
virtual bool FillItemSet( SfxItemSet* rCoreSet ) override;
virtual void Reset( const SfxItemSet* rCoreSet ) override;
- using SfxTabPage::DeactivatePage;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
};
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 755b9f8bb529..655ff11747aa 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -43,17 +43,14 @@ class ScTabPageSortFields : public SfxTabPage
{
public:
ScTabPageSortFields(TabPageParent pParent, const SfxItemSet& rArgSet);
- virtual void dispose() override;
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rArgSet);
virtual ~ScTabPageSortFields() override;
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rArgSet );
+
virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
virtual void Reset ( const SfxItemSet* rArgSet ) override;
protected:
virtual void ActivatePage ( const SfxItemSet& rSet ) override;
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override;
private:
@@ -98,15 +95,13 @@ class ScTabPageSortOptions : public SfxTabPage
{
public:
ScTabPageSortOptions(TabPageParent pParent, const SfxItemSet& rArgSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* pArgSet);
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* pArgSet);
virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
virtual void Reset ( const SfxItemSet* rArgSet ) override;
protected:
virtual void ActivatePage ( const SfxItemSet& rSet ) override;
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override;
private:
diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx
index a24bc18fa88b..a317345dcadd 100644
--- a/sc/source/ui/inc/tpstat.hxx
+++ b/sc/source/ui/inc/tpstat.hxx
@@ -24,13 +24,11 @@
class ScDocStatPage: public SfxTabPage
{
- friend class VclPtr<ScDocStatPage>;
public:
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rSet );
- virtual ~ScDocStatPage() override;
-
-private:
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
ScDocStatPage(TabPageParent pParent, const SfxItemSet& rSet);
+ virtual ~ScDocStatPage() override;
+
protected:
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset ( const SfxItemSet* rSet ) override;
diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx
index 8051074c93dd..4f3c48ee880e 100644
--- a/sc/source/ui/inc/tpsubt.hxx
+++ b/sc/source/ui/inc/tpsubt.hxx
@@ -75,45 +75,39 @@ private:
class ScTpSubTotalGroup1 final : public ScTpSubTotalGroup
{
- friend class VclPtr<ScTpSubTotalGroup1>;
+public:
ScTpSubTotalGroup1( TabPageParent pParent,
const SfxItemSet& rArgSet );
-
-public:
+ static std::unique_ptr<SfxTabPage> Create ( TabPageParent pParent,
+ const SfxItemSet* rArgSet );
virtual ~ScTpSubTotalGroup1() override;
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rArgSet );
virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
virtual void Reset ( const SfxItemSet* rArgSet ) override;
};
class ScTpSubTotalGroup2 final : public ScTpSubTotalGroup
{
- friend class VclPtr<ScTpSubTotalGroup2>;
+public:
ScTpSubTotalGroup2( TabPageParent pParent,
const SfxItemSet& rArgSet );
-
-public:
+ static std::unique_ptr<SfxTabPage> Create ( TabPageParent pParent,
+ const SfxItemSet* rArgSet );
virtual ~ScTpSubTotalGroup2() override;
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rArgSet );
virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
virtual void Reset ( const SfxItemSet* rArgSet ) override;
};
class ScTpSubTotalGroup3 final : public ScTpSubTotalGroup
{
- friend class VclPtr<ScTpSubTotalGroup3>;
+public:
ScTpSubTotalGroup3( TabPageParent pParent,
const SfxItemSet& rArgSet );
-
-public:
+ static std::unique_ptr<SfxTabPage> Create ( TabPageParent pParent,
+ const SfxItemSet* rArgSet );
virtual ~ScTpSubTotalGroup3() override;
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rArgSet );
virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
virtual void Reset ( const SfxItemSet* rArgSet ) override;
};
@@ -121,16 +115,15 @@ public:
class ScTpSubTotalOptions final : public SfxTabPage
{
public:
- virtual ~ScTpSubTotalOptions() override;
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
+ ScTpSubTotalOptions(TabPageParent pParent, const SfxItemSet& rArgSet);
+ static std::unique_ptr<SfxTabPage> Create ( TabPageParent pParent,
const SfxItemSet* rArgSet );
+ virtual ~ScTpSubTotalOptions() override;
+
virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
virtual void Reset ( const SfxItemSet* rArgSet ) override;
private:
- friend class VclPtr<ScTpSubTotalOptions>;
- ScTpSubTotalOptions(TabPageParent pParent, const SfxItemSet& rArgSet);
-
void Init ();
void FillUserSortListBox ();
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
index 52b2a36628a0..fe517c35a5a1 100644
--- a/sc/source/ui/inc/tptable.hxx
+++ b/sc/source/ui/inc/tptable.hxx
@@ -24,21 +24,18 @@
class ScTablePage : public SfxTabPage
{
- friend class VclPtr<ScTablePage>;
static const sal_uInt16 pPageTableRanges[];
public:
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rCoreSet );
+ ScTablePage(TabPageParent pParent, const SfxItemSet& rCoreSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rCoreSet);
+ virtual ~ScTablePage() override;
+
static const sal_uInt16* GetRanges () { return pPageTableRanges; }
virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override;
virtual void Reset ( const SfxItemSet* rCoreSet ) override;
- using SfxTabPage::DeactivatePage;
virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override;
- virtual void DataChanged ( const DataChangedEvent& rDCEvt ) override;
- virtual ~ScTablePage() override;
private:
- ScTablePage(TabPageParent pParent, const SfxItemSet& rCoreSet);
void ShowImage();
private:
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index 01af1e536767..438d897569a9 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -32,20 +32,16 @@ class ScRefAddress;
class ScTpUserLists : public SfxTabPage
{
- friend class VclPtr<ScTpUserLists>;
public:
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rAttrSet );
+ ScTpUserLists(TabPageParent pParent, const SfxItemSet& rArgSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent,
+ const SfxItemSet* rAttrSet);
+ virtual ~ScTpUserLists() override;
virtual bool FillItemSet ( SfxItemSet* rCoreAttrs ) override;
virtual void Reset ( const SfxItemSet* rCoreAttrs ) override;
- using SfxTabPage::DeactivatePage;
virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override;
private:
- ScTpUserLists(TabPageParent pParent, const SfxItemSet& rArgSet);
- virtual ~ScTpUserLists() override;
-
-private:
std::unique_ptr<weld::Label> mxFtLists;
std::unique_ptr<weld::TreeView> mxLbLists;
std::unique_ptr<weld::Label> mxFtEntries;
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index f9f992e8be4b..3e47c2d8ae03 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -27,7 +27,6 @@ class ScViewOptions;
class ScTpContentOptions : public SfxTabPage
{
- friend class VclPtr<ScTpContentOptions>;
std::unique_ptr<ScViewOptions> m_xLocalOptions;
std::unique_ptr<weld::ComboBox> m_xGridLB;
@@ -62,17 +61,12 @@ class ScTpContentOptions : public SfxTabPage
DECL_LINK( SelLbObjHdl, weld::ComboBox&, void );
DECL_LINK( CBHdl, weld::ToggleButton&, void );
+public:
ScTpContentOptions(TabPageParent pParent, const SfxItemSet& rArgSet);
- virtual void dispose() override;
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rCoreSet);
virtual ~ScTpContentOptions() override;
-
-public:
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rCoreSet );
virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override;
virtual void Reset ( const SfxItemSet* rCoreSet ) override;
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
virtual void ActivatePage( const SfxItemSet& ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
@@ -81,7 +75,6 @@ public:
class ScDocument;
class ScTpLayoutOptions : public SfxTabPage
{
- friend class VclPtrInstance<ScTpLayoutOptions>;
ScDocument *pDoc;
std::unique_ptr<weld::ComboBox> m_xUnitLB;
@@ -106,15 +99,13 @@ class ScTpLayoutOptions : public SfxTabPage
DECL_LINK( AlignHdl, weld::ToggleButton&, void );
- ScTpLayoutOptions(TabPageParent pParent, const SfxItemSet& rArgSet );
public:
+ ScTpLayoutOptions(TabPageParent pParent, const SfxItemSet& rArgSet );
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent,
+ const SfxItemSet* rCoreSet);
virtual ~ScTpLayoutOptions() override;
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent,
- const SfxItemSet* rCoreSet );
virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override;
virtual void Reset ( const SfxItemSet* rCoreSet ) override;
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
virtual void ActivatePage( const SfxItemSet& ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
};
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 33596c520f7f..d5f33838f818 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -25,12 +25,14 @@
#include "anyrefdg.hxx"
#include <sc.hrc>
-struct ScRefHandlerCaller : public virtual VclReferenceBase {
+struct ScRefHandlerCaller{
+ virtual ~ScRefHandlerCaller(){}
};
+
class ScRefHandlerHelper
{
protected:
- VclPtr<ScRefHandlerCaller> m_pHandler;
+ ScRefHandlerCaller* m_pHandler;
// workaround VS2013 issue with pointers to things that contain virtual base class
#ifdef _WIN32
#pragma pack(push, 16)
@@ -76,9 +78,9 @@ class ScTPValidationValue : public ScRefHandlerCaller, public SfxTabPage
static const sal_uInt16 pValueRanges[];
public:
explicit ScTPValidationValue(TabPageParent pParent, const SfxItemSet& rArgSet);
- virtual void dispose() override;
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rArgSet );
virtual ~ScTPValidationValue() override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rArgSet );
+
static const sal_uInt16* GetRanges() { return pValueRanges; }
virtual bool FillItemSet( SfxItemSet* rArgSet ) override;
@@ -236,9 +238,9 @@ private:
public:
ScTPValidationHelp(TabPageParent pParent, const SfxItemSet& rArgSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rArgSet);
virtual ~ScTPValidationHelp() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rArgSet);
virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
virtual void Reset ( const SfxItemSet* rArgSet ) override;
};
@@ -261,9 +263,9 @@ private:
public:
ScTPValidationError(TabPageParent pParent, const SfxItemSet& rArgSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rArgSet);
virtual ~ScTPValidationError() override;
- static VclPtr<SfxTabPage> Create ( TabPageParent pParent, const SfxItemSet* rArgSet );
virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
virtual void Reset ( const SfxItemSet* rArgSet ) override;
};
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 )
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 033faeb02452..4a1d5590e731 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -137,7 +137,6 @@ IMPL_LINK_NOARG( ScHFEditPage, ObjectSelectHdl, ScEditWindow&, void )
ScHFEditPage::~ScHFEditPage()
{
- disposeOnce();
}
void ScHFEditPage::SetNumType(SvxNumType eNumType)
@@ -789,9 +788,9 @@ ScRightHeaderEditPage::ScRightHeaderEditPage( TabPageParent pParent, const SfxIt
true )
{}
-VclPtr<SfxTabPage> ScRightHeaderEditPage::Create( TabPageParent pParent, const SfxItemSet* rCoreSet )
+std::unique_ptr<SfxTabPage> ScRightHeaderEditPage::Create( TabPageParent pParent, const SfxItemSet* rCoreSet )
{
- return VclPtr<ScRightHeaderEditPage>::Create( pParent, *rCoreSet );
+ return std::make_unique<ScRightHeaderEditPage>( pParent, *rCoreSet );
}
// class ScLeftHeaderEditPage
@@ -803,9 +802,9 @@ ScLeftHeaderEditPage::ScLeftHeaderEditPage( TabPageParent pParent, const SfxItem
true )
{}
-VclPtr<SfxTabPage> ScLeftHeaderEditPage::Create( TabPageParent pParent, const SfxItemSet* rCoreSet )
+std::unique_ptr<SfxTabPage> ScLeftHeaderEditPage::Create( TabPageParent pParent, const SfxItemSet* rCoreSet )
{
- return VclPtr<ScLeftHeaderEditPage>::Create( pParent, *rCoreSet );
+ return std::make_unique<ScLeftHeaderEditPage>( pParent, *rCoreSet );
}
// class ScRightFooterEditPage
@@ -817,9 +816,9 @@ ScRightFooterEditPage::ScRightFooterEditPage( TabPageParent pParent, const SfxIt
false )
{}
-VclPtr<SfxTabPage> ScRightFooterEditPage::Create( TabPageParent pParent, const SfxItemSet* rCoreSet )
+std::unique_ptr<SfxTabPage> ScRightFooterEditPage::Create( TabPageParent pParent, const SfxItemSet* rCoreSet )
{
- return VclPtr<ScRightFooterEditPage>::Create( pParent, *rCoreSet );
+ return std::make_unique<ScRightFooterEditPage>( pParent, *rCoreSet );
}
// class ScLeftFooterEditPage
@@ -831,9 +830,9 @@ ScLeftFooterEditPage::ScLeftFooterEditPage( TabPageParent pParent, const SfxItem
false )
{}
-VclPtr<SfxTabPage> ScLeftFooterEditPage::Create( TabPageParent pParent, const SfxItemSet* rCoreSet )
+std::unique_ptr<SfxTabPage> ScLeftFooterEditPage::Create( TabPageParent pParent, const SfxItemSet* rCoreSet )
{
- return VclPtr<ScLeftFooterEditPage>::Create( pParent, *rCoreSet );
+ return std::make_unique<ScLeftFooterEditPage>( pParent, *rCoreSet );
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx
index e1f8a0ea06ea..604c8520ccbf 100644
--- a/sc/source/ui/pagedlg/tphf.cxx
+++ b/sc/source/ui/pagedlg/tphf.cxx
@@ -76,13 +76,7 @@ ScHFPage::ScHFPage(TabPageParent pParent, const SfxItemSet& rSet, sal_uInt16 nSe
ScHFPage::~ScHFPage()
{
- disposeOnce();
-}
-
-void ScHFPage::dispose()
-{
pStyleDlg = nullptr;
- SvxHFPage::dispose();
}
void ScHFPage::Reset( const SfxItemSet* rSet )
@@ -134,14 +128,6 @@ DeactivateRC ScHFPage::DeactivatePage( SfxItemSet* pSetP )
return DeactivateRC::LeavePage;
}
-void ScHFPage::ActivatePage()
-{
-}
-
-void ScHFPage::DeactivatePage()
-{
-}
-
// Handler:
IMPL_LINK_NOARG(ScHFPage, TurnOnHdl, weld::ToggleButton&, void)
@@ -236,9 +222,9 @@ ScHeaderPage::ScHeaderPage(TabPageParent pParent, const SfxItemSet& rSet)
{
}
-VclPtr<SfxTabPage> ScHeaderPage::Create(TabPageParent pParent, const SfxItemSet* rCoreSet)
+std::unique_ptr<SfxTabPage> ScHeaderPage::Create(TabPageParent pParent, const SfxItemSet* rCoreSet)
{
- return VclPtr<ScHeaderPage>::Create(pParent, *rCoreSet);
+ return std::make_unique<ScHeaderPage>(pParent, *rCoreSet);
}
const sal_uInt16* ScHeaderPage::GetRanges()
@@ -253,9 +239,9 @@ ScFooterPage::ScFooterPage(TabPageParent pParent, const SfxItemSet& rSet)
{
}
-VclPtr<SfxTabPage> ScFooterPage::Create(TabPageParent pParent, const SfxItemSet* rCoreSet)
+std::unique_ptr<SfxTabPage> ScFooterPage::Create(TabPageParent pParent, const SfxItemSet* rCoreSet)
{
- return VclPtr<ScFooterPage>::Create(pParent, *rCoreSet);
+ return std::make_unique<ScFooterPage>(pParent, *rCoreSet);
}
const sal_uInt16* ScFooterPage::GetRanges()
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 5372fa9ca3bf..5656364d6c4c 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -140,12 +140,11 @@ void ScTablePage::ShowImage()
ScTablePage::~ScTablePage()
{
- disposeOnce();
}
-VclPtr<SfxTabPage> ScTablePage::Create(TabPageParent pParent, const SfxItemSet* rCoreSet)
+std::unique_ptr<SfxTabPage> ScTablePage::Create(TabPageParent pParent, const SfxItemSet* rCoreSet)
{
- return VclPtr<ScTablePage>::Create(pParent, *rCoreSet);
+ return std::make_unique<ScTablePage>(pParent, *rCoreSet);
}
void ScTablePage::Reset( const SfxItemSet* rCoreSet )
@@ -355,13 +354,6 @@ DeactivateRC ScTablePage::DeactivatePage( SfxItemSet* pSetP )
return DeactivateRC::LeavePage;
}
-void ScTablePage::DataChanged( const DataChangedEvent& rDCEvt )
-{
- if( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
- ShowImage();
- SfxTabPage::DataChanged( rDCEvt );
-}
-
// Handler:
IMPL_LINK_NOARG(ScTablePage, PageDirHdl, weld::ToggleButton&, void)
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 28f949cab5cf..8d72ef4c6185 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -524,13 +524,13 @@ bool ScPreviewShell::HasPrintOptionsPage() const
return true;
}
-VclPtr<SfxTabPage> ScPreviewShell::CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions)
+std::unique_ptr<SfxTabPage> ScPreviewShell::CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions)
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc(RID_SC_TP_PRINT);
if ( ScTpPrintOptionsCreate )
return ScTpPrintOptionsCreate(pParent, &rOptions);
- return VclPtr<SfxTabPage>();
+ return nullptr;
}
void ScPreviewShell::Activate(bool bMDI)
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index a99a0490f6bd..4c907049c2a0 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1035,13 +1035,13 @@ bool ScTabViewShell::HasPrintOptionsPage() const
return true;
}
-VclPtr<SfxTabPage> ScTabViewShell::CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions )
+std::unique_ptr<SfxTabPage> ScTabViewShell::CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc(RID_SC_TP_PRINT);
if ( ScTpPrintOptionsCreate )
return ScTpPrintOptionsCreate(pParent, &rOptions);
- return VclPtr<SfxTabPage>();
+ return nullptr;
}
void ScTabViewShell::StopEditShell()