summaryrefslogtreecommitdiff
path: root/sw/source/ui/config
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 /sw/source/ui/config
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 'sw/source/ui/config')
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx12
-rw-r--r--sw/source/ui/config/optcomp.cxx4
-rw-r--r--sw/source/ui/config/optload.cxx14
-rw-r--r--sw/source/ui/config/optpage.cxx44
4 files changed, 25 insertions, 49 deletions
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index a4c8a1f3a7a8..eff36f3e1f54 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -47,7 +47,7 @@ class SwTestAccountSettingsDialog : public SfxDialogController
OUString m_sErrorServer;
bool m_bStop;
- VclPtr<SwMailConfigPage> m_pParent;
+ SwMailConfigPage* m_pParent;
std::unique_ptr<weld::Button> m_xStopPB;
std::unique_ptr<weld::TextView> m_xErrorsED;
@@ -125,18 +125,12 @@ SwMailConfigPage::SwMailConfigPage(TabPageParent pParent, const SfxItemSet& rSet
SwMailConfigPage::~SwMailConfigPage()
{
- disposeOnce();
-}
-
-void SwMailConfigPage::dispose()
-{
m_pConfigItem.reset();
- SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SwMailConfigPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
+std::unique_ptr<SfxTabPage> SwMailConfigPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{
- return VclPtr<SwMailConfigPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwMailConfigPage>(pParent, *rAttrSet);
}
bool SwMailConfigPage::FillItemSet( SfxItemSet* /*rSet*/ )
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 3eb50d8ed913..4dfac04edb27 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -340,9 +340,9 @@ void SwCompatibilityOptPage::WriteOptions()
m_aConfigItem.AppendItem(rItem);
}
-VclPtr<SfxTabPage> SwCompatibilityOptPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet )
+std::unique_ptr<SfxTabPage> SwCompatibilityOptPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{
- return VclPtr<SwCompatibilityOptPage>::Create( pParent, *rAttrSet );
+ return std::make_unique<SwCompatibilityOptPage>(pParent, *rAttrSet);
}
bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* )
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 0af4778387fe..59bcb5cff276 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -145,10 +145,10 @@ SwLoadOptPage::~SwLoadOptPage()
{
}
-VclPtr<SfxTabPage> SwLoadOptPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwLoadOptPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrSet )
{
- return VclPtr<SwLoadOptPage>::Create(pParent, *rAttrSet );
+ return std::make_unique<SwLoadOptPage>(pParent, *rAttrSet );
}
IMPL_LINK_NOARG(SwLoadOptPage, StandardizedPageCountCheckHdl, weld::Button&, void)
@@ -540,21 +540,15 @@ SwCaptionOptPage::SwCaptionOptPage(TabPageParent pParent, const SfxItemSet& rSet
SwCaptionOptPage::~SwCaptionOptPage()
{
- disposeOnce();
-}
-
-void SwCaptionOptPage::dispose()
-{
DelUserData();
pMgr.reset();
m_xPreview.reset();
- SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SwCaptionOptPage::Create(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwCaptionOptPage::Create(TabPageParent pParent,
const SfxItemSet* rAttrSet)
{
- return VclPtr<SwCaptionOptPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwCaptionOptPage>(pParent, *rAttrSet);
}
bool SwCaptionOptPage::FillItemSet( SfxItemSet* )
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 065af21e86c6..8f5a0ed6106c 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -170,10 +170,10 @@ SwContentOptPage::~SwContentOptPage()
{
}
-VclPtr<SfxTabPage> SwContentOptPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwContentOptPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrSet)
{
- return VclPtr<SwContentOptPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwContentOptPage>(pParent, *rAttrSet);
}
static void lcl_SelectMetricLB(weld::ComboBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet)
@@ -350,10 +350,10 @@ void SwAddPrinterTabPage::SetPreview(bool bPrev)
m_xPagesFrame->set_sensitive(!bPreview);
}
-VclPtr<SfxTabPage> SwAddPrinterTabPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwAddPrinterTabPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrSet )
{
- return VclPtr<SwAddPrinterTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwAddPrinterTabPage>(pParent, *rAttrSet);
}
bool SwAddPrinterTabPage::FillItemSet( SfxItemSet* rCoreSet )
@@ -544,11 +544,6 @@ SwStdFontTabPage::SwStdFontTabPage(TabPageParent pParent, const SfxItemSet& rSet
SwStdFontTabPage::~SwStdFontTabPage()
{
- disposeOnce();
-}
-
-void SwStdFontTabPage::dispose()
-{
m_xIndexHeightLB.reset();
m_xLabelHeightLB.reset();
m_xListHeightLB.reset();
@@ -559,13 +554,12 @@ void SwStdFontTabPage::dispose()
m_pPrt.disposeAndClear();
else
m_pPrt.clear();
- SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SwStdFontTabPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwStdFontTabPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrSet )
{
- return VclPtr<SwStdFontTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwStdFontTabPage>(pParent, *rAttrSet);
}
static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
@@ -1031,10 +1025,10 @@ SwTableOptionsTabPage::~SwTableOptionsTabPage()
{
}
-VclPtr<SfxTabPage> SwTableOptionsTabPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwTableOptionsTabPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrSet )
{
- return VclPtr<SwTableOptionsTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwTableOptionsTabPage>(pParent, *rAttrSet);
}
bool SwTableOptionsTabPage::FillItemSet( SfxItemSet* )
@@ -1264,9 +1258,9 @@ SwShdwCursorOptionsTabPage::~SwShdwCursorOptionsTabPage()
{
}
-VclPtr<SfxTabPage> SwShdwCursorOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rSet )
+std::unique_ptr<SfxTabPage> SwShdwCursorOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rSet )
{
- return VclPtr<SwShdwCursorOptionsTabPage>::Create( pParent, *rSet );
+ return std::make_unique<SwShdwCursorOptionsTabPage>(pParent, *rSet );
}
void SwShdwCursorOptionsTabPage::PageCreated( const SfxAllItemSet& aSet )
@@ -1630,11 +1624,6 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage(TabPageParent pParent,
SwRedlineOptionsTabPage::~SwRedlineOptionsTabPage()
{
- disposeOnce();
-}
-
-void SwRedlineOptionsTabPage::dispose()
-{
m_xInsertColorLB.reset();
m_xInsertedPreview.reset();
m_xInsertedPreviewWN.reset();
@@ -1647,12 +1636,11 @@ void SwRedlineOptionsTabPage::dispose()
m_xMarkColorLB.reset();
m_xMarkPreview.reset();
m_xMarkPreviewWN.reset();
- SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SwRedlineOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwRedlineOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwRedlineOptionsTabPage>::Create( pParent, *rSet );
+ return std::make_unique<SwRedlineOptionsTabPage>(pParent, *rSet );
}
bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet* )
@@ -2038,9 +2026,9 @@ SwCompareOptionsTabPage::~SwCompareOptionsTabPage()
{
}
-VclPtr<SfxTabPage> SwCompareOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet )
+std::unique_ptr<SfxTabPage> SwCompareOptionsTabPage::Create( TabPageParent pParent, const SfxItemSet* rAttrSet )
{
- return VclPtr<SwCompareOptionsTabPage>::Create( pParent, *rAttrSet );
+ return std::make_unique<SwCompareOptionsTabPage>(pParent, *rAttrSet );
}
bool SwCompareOptionsTabPage::FillItemSet( SfxItemSet* )
@@ -2170,10 +2158,10 @@ SwTestTabPage::~SwTestTabPage()
{
}
-VclPtr<SfxTabPage> SwTestTabPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwTestTabPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrSet )
{
- return VclPtr<SwTestTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwTestTabPage>(pParent, *rAttrSet);
}
bool SwTestTabPage::FillItemSet( SfxItemSet* rCoreSet )