summaryrefslogtreecommitdiff
path: root/sw/source
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
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')
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx12
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx11
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx4
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx5
-rw-r--r--sw/source/ui/chrdlg/tblnumfm.cxx4
-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
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx12
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hxx2
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx21
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx9
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx3
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx8
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx3
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx8
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx3
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx7
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx13
-rw-r--r--sw/source/ui/envelp/envfmt.cxx5
-rw-r--r--sw/source/ui/envelp/envfmt.hxx5
-rw-r--r--sw/source/ui/envelp/envlop1.cxx5
-rw-r--r--sw/source/ui/envelp/envprt.cxx6
-rw-r--r--sw/source/ui/envelp/envprt.hxx10
-rw-r--r--sw/source/ui/envelp/label1.cxx20
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/envelp/labfmt.hxx5
-rw-r--r--sw/source/ui/envelp/labprt.cxx12
-rw-r--r--sw/source/ui/envelp/labprt.hxx6
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx15
-rw-r--r--sw/source/ui/fldui/flddb.cxx11
-rw-r--r--sw/source/ui/fldui/flddb.hxx3
-rw-r--r--sw/source/ui/fldui/flddinf.cxx5
-rw-r--r--sw/source/ui/fldui/flddinf.hxx2
-rw-r--r--sw/source/ui/fldui/flddok.cxx5
-rw-r--r--sw/source/ui/fldui/flddok.hxx2
-rw-r--r--sw/source/ui/fldui/fldedt.cxx40
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx5
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx2
-rw-r--r--sw/source/ui/fldui/fldpage.cxx2
-rw-r--r--sw/source/ui/fldui/fldpage.hxx4
-rw-r--r--sw/source/ui/fldui/fldref.cxx5
-rw-r--r--sw/source/ui/fldui/fldref.hxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx5
-rw-r--r--sw/source/ui/fldui/fldvar.hxx4
-rw-r--r--sw/source/ui/frmdlg/column.cxx37
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx36
-rw-r--r--sw/source/ui/frmdlg/uiborder.cxx4
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx13
-rw-r--r--sw/source/ui/index/cnttab.cxx24
-rw-r--r--sw/source/ui/misc/docfnote.cxx9
-rw-r--r--sw/source/ui/misc/impfnote.hxx8
-rw-r--r--sw/source/ui/misc/num.cxx10
-rw-r--r--sw/source/ui/misc/outline.cxx4
-rw-r--r--sw/source/ui/misc/pgfnote.cxx10
-rw-r--r--sw/source/ui/misc/pggrid.cxx10
-rw-r--r--sw/source/ui/table/tabledlg.cxx20
-rw-r--r--sw/source/uibase/app/appopt.cxx34
-rw-r--r--sw/source/uibase/inc/chrdlg.hxx3
-rw-r--r--sw/source/uibase/inc/column.hxx8
-rw-r--r--sw/source/uibase/inc/docstdlg.hxx2
-rw-r--r--sw/source/uibase/inc/drpcps.hxx7
-rw-r--r--sw/source/uibase/inc/envlop.hxx5
-rw-r--r--sw/source/uibase/inc/fldedt.hxx2
-rw-r--r--sw/source/uibase/inc/frmpage.hxx22
-rw-r--r--sw/source/uibase/inc/label.hxx2
-rw-r--r--sw/source/uibase/inc/mailconfigpage.hxx3
-rw-r--r--sw/source/uibase/inc/mailmergewizard.hxx2
-rw-r--r--sw/source/uibase/inc/num.hxx6
-rw-r--r--sw/source/uibase/inc/numpara.hxx2
-rw-r--r--sw/source/uibase/inc/optcomp.hxx2
-rw-r--r--sw/source/uibase/inc/optload.hxx5
-rw-r--r--sw/source/uibase/inc/optpage.hxx22
-rw-r--r--sw/source/uibase/inc/outline.hxx7
-rw-r--r--sw/source/uibase/inc/pgfnote.hxx12
-rw-r--r--sw/source/uibase/inc/pggrid.hxx6
-rw-r--r--sw/source/uibase/inc/pview.hxx2
-rw-r--r--sw/source/uibase/inc/regionsw.hxx6
-rw-r--r--sw/source/uibase/inc/swuiccoll.hxx8
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx19
-rw-r--r--sw/source/uibase/inc/wrap.hxx9
-rw-r--r--sw/source/uibase/table/tablepg.hxx13
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx14
85 files changed, 279 insertions, 520 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 06b3cedd074b..68eba76bdb55 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -190,13 +190,7 @@ SwCharURLPage::SwCharURLPage(TabPageParent pParent, const SfxItemSet& rCoreSet)
SwCharURLPage::~SwCharURLPage()
{
- disposeOnce();
-}
-
-void SwCharURLPage::dispose()
-{
pINetItem.reset();
- SfxTabPage::dispose();
}
void SwCharURLPage::Reset(const SfxItemSet* rSet)
@@ -290,15 +284,15 @@ bool SwCharURLPage::FillItemSet(SfxItemSet* rSet)
return bModified;
}
-VclPtr<SfxTabPage> SwCharURLPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
+std::unique_ptr<SfxTabPage> SwCharURLPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{
- return VclPtr<SwCharURLPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwCharURLPage>(pParent, *rAttrSet);
}
IMPL_LINK_NOARG(SwCharURLPage, InsertFileHdl, weld::Button&, void)
{
FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, GetFrameWeld());
+ FileDialogFlags::NONE, GetDialogFrameWeld());
if( aDlgHelper.Execute() == ERRCODE_NONE )
{
const Reference<XFilePicker3>& xFP = aDlgHelper.GetFilePicker();
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 5cd01dd96867..82ab519c4b60 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -454,9 +454,9 @@ SwDropCapsDlg::SwDropCapsDlg(weld::Window *pParent, const SfxItemSet &rSet)
: SfxSingleTabDialogController(pParent, &rSet)
{
TabPageParent pPageParent(get_content_area(), this);
- VclPtr<SwDropCapsPage> xNewPage(static_cast<SwDropCapsPage*>(SwDropCapsPage::Create(pPageParent, &rSet).get()));
- xNewPage->SetFormat(false);
- SetTabPage(xNewPage);
+ auto xNewPage(SwDropCapsPage::Create(pPageParent, &rSet));
+ static_cast<SwDropCapsPage*>(xNewPage.get())->SetFormat(false);
+ SetTabPage(std::move(xNewPage));
}
SwDropCapsPage::SwDropCapsPage(TabPageParent pParent, const SfxItemSet &rSet)
@@ -520,10 +520,9 @@ DeactivateRC SwDropCapsPage::DeactivatePage(SfxItemSet * _pSet)
return DeactivateRC::LeavePage;
}
-VclPtr<SfxTabPage> SwDropCapsPage::Create(TabPageParent pParent,
- const SfxItemSet *rSet)
+std::unique_ptr<SfxTabPage> SwDropCapsPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
{
- return VclPtr<SwDropCapsPage>::Create(pParent, *rSet);
+ return std::make_unique<SwDropCapsPage>(pParent, *rSet);
}
bool SwDropCapsPage::FillItemSet(SfxItemSet *rSet)
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 09a5e3c3f5a9..83ed68c907ac 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -98,9 +98,9 @@ SwParagraphNumTabPage::~SwParagraphNumTabPage()
{
}
-VclPtr<SfxTabPage> SwParagraphNumTabPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwParagraphNumTabPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwParagraphNumTabPage>::Create(pParent, *rSet);
+ return std::make_unique<SwParagraphNumTabPage>(pParent, *rSet);
}
bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index e3cfd14e3e66..36bac20761bc 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -101,7 +101,6 @@ SwCondCollPage::SwCondCollPage(TabPageParent pParent, const SfxItemSet &rSet)
SwCondCollPage::~SwCondCollPage()
{
- disposeOnce();
}
DeactivateRC SwCondCollPage::DeactivatePage(SfxItemSet * _pSet)
@@ -112,9 +111,9 @@ DeactivateRC SwCondCollPage::DeactivatePage(SfxItemSet * _pSet)
return DeactivateRC::LeavePage;
}
-VclPtr<SfxTabPage> SwCondCollPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
+std::unique_ptr<SfxTabPage> SwCondCollPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
{
- return VclPtr<SwCondCollPage>::Create(pParent, *rSet);
+ return std::make_unique<SwCondCollPage>(pParent, *rSet);
}
bool SwCondCollPage::FillItemSet(SfxItemSet *rSet)
diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx
index e6722617176e..cb227959eefe 100644
--- a/sw/source/ui/chrdlg/tblnumfm.cxx
+++ b/sw/source/ui/chrdlg/tblnumfm.cxx
@@ -36,11 +36,11 @@ SwNumFormatDlg::SwNumFormatDlg(weld::Widget* pParent, const SfxItemSet& rSet)
if ( fnCreatePage )
{
TabPageParent pPageParent(get_content_area(), this);
- VclPtr<SfxTabPage> xNewPage = (*fnCreatePage)(pPageParent, &rSet);
+ std::unique_ptr<SfxTabPage> xNewPage = (*fnCreatePage)(pPageParent, &rSet);
SfxAllItemSet aSet(*(rSet.GetPool()));
aSet.Put(xNewPage->GetItemSet().Get( SID_ATTR_NUMBERFORMAT_INFO));
xNewPage->PageCreated(aSet);
- SetTabPage(xNewPage);
+ SetTabPage(std::move(xNewPage));
}
}
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 )
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 56b4801ddf55..e4d6792d6c7f 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -122,7 +122,7 @@ static OUString lcl_getFlatURL( uno::Reference<beans::XPropertySet> const & xSou
SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
: SfxDialogController(pParent->GetWizard()->getDialog(), "modules/swriter/ui/selectaddressdialog.ui", "SelectAddressDialog")
, m_bInSelectHdl(false)
- , m_xAddressPage(pParent)
+ , m_pAddressPage(pParent)
, m_xDescriptionFI(m_xBuilder->weld_label("desc"))
, m_xConnecting(m_xBuilder->weld_label("connecting"))
, m_xListLB(m_xBuilder->weld_tree_view("sources"))
@@ -161,7 +161,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
uno::Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
m_xDBContext = DatabaseContext::create(xContext);
- SwMailMergeConfigItem& rConfigItem = m_xAddressPage->GetWizard()->GetConfigItem();
+ SwMailMergeConfigItem& rConfigItem = m_pAddressPage->GetWizard()->GetConfigItem();
const SwDBData& rCurrentData = rConfigItem.GetCurrentDBData();
bool bEnableEdit = false;
@@ -276,7 +276,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl, weld::Button&, void)
IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl, weld::Button&, void)
{
- SwView* pView = m_xAddressPage->GetWizard()->GetSwView();
+ SwView* pView = m_pAddressPage->GetWizard()->GetSwView();
const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(m_xDialog.get(), pView ? pView->GetDocShell() : nullptr);
if(!sNewSource.isEmpty())
@@ -320,7 +320,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, RemoveHdl_Impl, weld::Button&, void)
IMPL_LINK_NOARG(SwAddressListDialog, CreateHdl_Impl, weld::Button&, void)
{
- SwCreateAddressListDialog aDlg(m_xDialog.get(), /*sInputURL*/OUString(), m_xAddressPage->GetWizard()->GetConfigItem());
+ SwCreateAddressListDialog aDlg(m_xDialog.get(), /*sInputURL*/OUString(), m_pAddressPage->GetWizard()->GetConfigItem());
if (RET_OK == aDlg.run())
{
//register the URL a new datasource
@@ -400,7 +400,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, EditHdl_Impl, weld::Button&, void)
{
if(pUserData->xResultSet.is())
{
- SwMailMergeConfigItem& rConfigItem = m_xAddressPage->GetWizard()->GetConfigItem();
+ SwMailMergeConfigItem& rConfigItem = m_pAddressPage->GetWizard()->GetConfigItem();
if(rConfigItem.GetResultSet() != pUserData->xResultSet)
::comphelper::disposeComponent( pUserData->xResultSet );
pUserData->xResultSet = nullptr;
@@ -412,7 +412,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, EditHdl_Impl, weld::Button&, void)
pUserData->xConnection.clear();
// will automatically close if it was the las reference
SwCreateAddressListDialog aDlg(m_xDialog.get(), pUserData->sURL,
- m_xAddressPage->GetWizard()->GetConfigItem());
+ m_pAddressPage->GetWizard()->GetConfigItem());
aDlg.run();
}
};
diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx
index 167cf6ad638a..bf2d04121941 100644
--- a/sw/source/ui/dbui/addresslistdialog.hxx
+++ b/sw/source/ui/dbui/addresslistdialog.hxx
@@ -47,7 +47,7 @@ class SwAddressListDialog : public SfxDialogController
bool m_bInSelectHdl;
- VclPtr<SwMailMergeAddressBlockPage> m_xAddressPage;
+ SwMailMergeAddressBlockPage* m_pAddressPage;
css::uno::Reference< css::sdb::XDatabaseContext> m_xDBContext;
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index f7b6362ddbf0..ceea20e79223 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -88,18 +88,18 @@ SwMailMergeWizard::~SwMailMergeWizard()
{
}
-VclPtr<TabPage> SwMailMergeWizard::createPage(WizardState _nState)
+std::unique_ptr<BuilderPage> SwMailMergeWizard::createPage(WizardState _nState)
{
OString sIdent(OString::number(_nState));
weld::Container* pPageContainer = m_xAssistant->append_page(sIdent);
// TODO eventually pass DialogController as distinct argument instead of bundling into TabPageParent
TabPageParent aParent(pPageContainer, this);
- VclPtr<vcl::OWizardPage> pRet;
+ std::unique_ptr<vcl::OWizardPage> xRet;
switch(_nState)
{
case MM_DOCUMENTSELECTPAGE :
- pRet = VclPtr<SwMailMergeDocSelectPage>::Create(this, aParent);
+ xRet = std::make_unique<SwMailMergeDocSelectPage>(this, aParent);
/* tdf#52986 Set help ID using SetRoadmapHelpId for all pages
so that when by default the focus is on the left side pane of
@@ -108,28 +108,27 @@ VclPtr<TabPage> SwMailMergeWizard::createPage(WizardState _nState)
SetRoadmapHelpId("modules/swriter/ui/mmselectpage/MMSelectPage");
break;
case MM_OUTPUTTYPETPAGE :
- pRet = VclPtr<SwMailMergeOutputTypePage>::Create(this, aParent);
+ xRet = std::make_unique<SwMailMergeOutputTypePage>(this, aParent);
SetRoadmapHelpId("modules/swriter/ui/mmoutputtypepage/MMOutputTypePage");
break;
case MM_ADDRESSBLOCKPAGE :
- pRet = VclPtr<SwMailMergeAddressBlockPage>::Create(this, aParent);
+ xRet = std::make_unique<SwMailMergeAddressBlockPage>(this, aParent);
SetRoadmapHelpId("modules/swriter/ui/mmaddressblockpage/MMAddressBlockPage");
break;
case MM_GREETINGSPAGE :
- pRet = VclPtr<SwMailMergeGreetingsPage>::Create(this, aParent);
+ xRet = std::make_unique<SwMailMergeGreetingsPage>(this, aParent);
SetRoadmapHelpId("modules/swriter/ui/mmsalutationpage/MMSalutationPage");
break;
case MM_LAYOUTPAGE :
- pRet = VclPtr<SwMailMergeLayoutPage>::Create(this, aParent);
+ xRet = std::make_unique<SwMailMergeLayoutPage>(this, aParent);
SetRoadmapHelpId("modules/swriter/ui/mmlayoutpage/MMLayoutPage");
break;
}
m_xAssistant->set_page_title(sIdent, getStateDisplayName(_nState));
-
- OSL_ENSURE(pRet, "no page created in ::createPage");
- return pRet;
+ OSL_ENSURE(xRet, "no page created in ::createPage");
+ return xRet;
}
void SwMailMergeWizard::enterState( WizardState _nState )
@@ -199,7 +198,7 @@ void SwMailMergeWizard::UpdateRoadmap()
// enableState( <page id>, false );
const sal_uInt16 nCurPage = m_xAssistant->get_current_page();
- TabPage* pCurPage = GetPage( nCurPage );
+ BuilderPage* pCurPage = GetPage( nCurPage );
if(!pCurPage)
return;
bool bAddressFieldsConfigured = !m_xConfigItem->IsOutputToLetter() ||
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index ad9772abd592..da1fef364351 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -109,17 +109,10 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage(SwMailMergeWizard* pWiz
SwMailMergeAddressBlockPage::~SwMailMergeAddressBlockPage()
{
- disposeOnce();
-}
-
-void SwMailMergeAddressBlockPage::dispose()
-{
m_xPreviewWIN.reset();
m_xSettingsWIN.reset();
m_xPreview.reset();
m_xSettings.reset();
-
- vcl::OWizardPage::dispose();
}
bool SwMailMergeAddressBlockPage::canAdvance() const
@@ -127,7 +120,7 @@ bool SwMailMergeAddressBlockPage::canAdvance() const
return m_pWizard->GetConfigItem().GetResultSet().is();
}
-void SwMailMergeAddressBlockPage::ActivatePage()
+void SwMailMergeAddressBlockPage::Activate()
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
bool bIsLetter = rConfigItem.IsOutputToLetter();
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 9b3111fd82c9..0e76558d1c90 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -77,14 +77,13 @@ class SwMailMergeAddressBlockPage : public vcl::OWizardPage
void EnableAddressBlock(bool bAll, bool bSelective);
- virtual void ActivatePage() override;
+ virtual void Activate() override;
virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) override;
virtual bool canAdvance() const override;
public:
SwMailMergeAddressBlockPage(SwMailMergeWizard* pWizard, TabPageParent pParent);
virtual ~SwMailMergeAddressBlockPage() override;
- virtual void dispose() override;
SwMailMergeWizard* GetWizard() { return m_pWizard; }
};
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 0aa4470ea078..83509f31d788 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -247,17 +247,11 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* pWizard, T
SwMailMergeGreetingsPage::~SwMailMergeGreetingsPage()
{
- disposeOnce();
-}
-
-void SwMailMergeGreetingsPage::dispose()
-{
m_xPreviewWIN.reset();
m_xPreview.reset();
- vcl::OWizardPage::dispose();
}
-void SwMailMergeGreetingsPage::ActivatePage()
+void SwMailMergeGreetingsPage::Activate()
{
//try to find the gender setting
m_xFemaleColumnLB->clear();
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index a50d52614d24..576fb98ea1bc 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -103,12 +103,11 @@ class SwMailMergeGreetingsPage : public vcl::OWizardPage
DECL_LINK(AssignHdl_Impl, weld::Button&, void);
virtual void UpdatePreview() override;
- virtual void ActivatePage() override;
+ virtual void Activate() override;
virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) override;
public:
SwMailMergeGreetingsPage(SwMailMergeWizard* pWizard, TabPageParent pParent);
virtual ~SwMailMergeGreetingsPage() override;
- virtual void dispose() override;
};
class SwMailBodyDialog : public SfxDialogController, public SwGreetingsHandler
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 2738f470821c..bcf40f8b8ea0 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -153,16 +153,10 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage(SwMailMergeWizard* pWizard, TabPage
SwMailMergeLayoutPage::~SwMailMergeLayoutPage()
{
- disposeOnce();
-}
-
-void SwMailMergeLayoutPage::dispose()
-{
File::remove( m_sExampleURL );
- vcl::OWizardPage::dispose();
}
-void SwMailMergeLayoutPage::ActivatePage()
+void SwMailMergeLayoutPage::Activate()
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
bool bGreetingLine = rConfigItem.IsGreetingLine(false) && !rConfigItem.IsGreetingInserted();
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index 6e63992f1b65..5ebff3e1db9a 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -70,12 +70,11 @@ class SwMailMergeLayoutPage : public vcl::OWizardPage
bool bExample);
static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem const & rConfigItem, bool bExample);
- virtual void ActivatePage() override;
+ virtual void Activate() override;
virtual bool commitPage(::vcl::WizardTypes::CommitPageReason _eReason) override;
public:
SwMailMergeLayoutPage(SwMailMergeWizard* pWizard, TabPageParent pParent);
virtual ~SwMailMergeLayoutPage() override;
- virtual void dispose() override;
static SwFrameFormat* InsertAddressAndGreeting(SwView const * pView,
SwMailMergeConfigItem& rConfigItem,
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 8208b875f13a..5aab6a714cc4 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -33,10 +33,11 @@
#include <unotools/localedatawrapper.hxx>
#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
-VclPtr<SfxTabPage> SwDocStatPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
+std::unique_ptr<SfxTabPage> SwDocStatPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
{
- return VclPtr<SwDocStatPage>::Create(pParent, *rSet);
+ return std::make_unique<SwDocStatPage>(pParent, *rSet);
}
SwDocStatPage::SwDocStatPage(TabPageParent pParent, const SfxItemSet &rSet)
@@ -83,7 +84,7 @@ void SwDocStatPage::Reset(const SfxItemSet *)
// Description: update / set data
void SwDocStatPage::SetData(const SwDocStat &rStat)
{
- const LocaleDataWrapper& rLocaleData = GetSettings().GetUILocaleDataWrapper();
+ const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper();
m_xTableNo->set_label(rLocaleData.getNum(rStat.nTable, 0));
m_xGrfNo->set_label(rLocaleData.getNum(rStat.nGrf, 0));
m_xOLENo->set_label(rLocaleData.getNum(rStat.nOLE, 0));
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index edcb298983db..1099f63c8ac9 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1513,7 +1513,6 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(TabPageParent pParent, const SfxI
SwInsertSectionTabPage::~SwInsertSectionTabPage()
{
- disposeOnce();
}
void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
@@ -1616,10 +1615,10 @@ void SwInsertSectionTabPage::Reset( const SfxItemSet* )
{
}
-VclPtr<SfxTabPage> SwInsertSectionTabPage::Create(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwInsertSectionTabPage::Create(TabPageParent pParent,
const SfxItemSet* rAttrSet)
{
- return VclPtr<SwInsertSectionTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwInsertSectionTabPage>(pParent, *rAttrSet);
}
IMPL_LINK(SwInsertSectionTabPage, ChangeHideHdl, weld::ToggleButton&, rBox, void)
@@ -1954,10 +1953,10 @@ void SwSectionFootnoteEndTabPage::Reset( const SfxItemSet* rSet )
ResetState( false, rSet->Get( RES_END_AT_TXTEND, false ));
}
-VclPtr<SfxTabPage> SwSectionFootnoteEndTabPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwSectionFootnoteEndTabPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrSet)
{
- return VclPtr<SwSectionFootnoteEndTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwSectionFootnoteEndTabPage>(pParent, *rAttrSet);
}
IMPL_LINK( SwSectionFootnoteEndTabPage, FootEndHdl, weld::ToggleButton&, rBox, void )
@@ -2112,9 +2111,9 @@ void SwSectionIndentTabPage::Reset( const SfxItemSet* rSet)
IndentModifyHdl(*m_xBeforeMF);
}
-VclPtr<SfxTabPage> SwSectionIndentTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
+std::unique_ptr<SfxTabPage> SwSectionIndentTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{
- return VclPtr<SwSectionIndentTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwSectionIndentTabPage>(pParent, *rAttrSet);
}
void SwSectionIndentTabPage::SetWrtShell(SwWrtShell const & rSh)
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 528d202cf477..12a3cd8a881e 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -187,7 +187,6 @@ void SwEnvFormatPage::Init(SwEnvDlg* pDialog)
SwEnvFormatPage::~SwEnvFormatPage()
{
- disposeOnce();
}
IMPL_LINK( SwEnvFormatPage, ModifyHdl, weld::MetricSpinButton&, rEdit, void )
@@ -413,9 +412,9 @@ void SwEnvFormatPage::SetMinMax()
100 * (getfieldval(*m_xAddrTopField ) - 2 * 566), FieldUnit::TWIP);
}
-VclPtr<SfxTabPage> SwEnvFormatPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwEnvFormatPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwEnvFormatPage>::Create(pParent, *rSet);
+ return std::make_unique<SwEnvFormatPage>(pParent, *rSet);
}
void SwEnvFormatPage::ActivatePage(const SfxItemSet& rSet)
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index 20f2bd3844b9..531e3401a8ea 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -54,15 +54,12 @@ class SwEnvFormatPage : public SfxTabPage
SwEnvDlg *GetParentSwEnvDlg() { return m_pDialog; }
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
public:
SwEnvFormatPage(TabPageParent pParent, const SfxItemSet& rSet);
void Init(SwEnvDlg* pDialog);
virtual ~SwEnvFormatPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index f890236195cd..bf1871882cbc 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -226,7 +226,6 @@ void SwEnvPage::Init(SwEnvDlg* pDialog)
SwEnvPage::~SwEnvPage()
{
- disposeOnce();
}
IMPL_LINK( SwEnvPage, DatabaseHdl, weld::ComboBox&, rListBox, void )
@@ -298,9 +297,9 @@ void SwEnvPage::InitDatabaseBox()
}
}
-VclPtr<SfxTabPage> SwEnvPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwEnvPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwEnvPage>::Create(pParent, *rSet);
+ return std::make_unique<SwEnvPage>(pParent, *rSet);
}
void SwEnvPage::ActivatePage(const SfxItemSet& rSet)
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index cc62d67becdc..fdfca438189e 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -76,7 +76,7 @@ SwEnvPrtPage::SwEnvPrtPage(TabPageParent pParent, const SfxItemSet& rSet)
SwEnvPrtPage::~SwEnvPrtPage()
{
- disposeOnce();
+ m_xPrt.clear();
}
IMPL_LINK_NOARG(SwEnvPrtPage, ClickHdl, weld::ToggleButton&, void)
@@ -127,9 +127,9 @@ IMPL_LINK(SwEnvPrtPage, ButtonHdl, weld::Button&, rBtn, void)
}
}
-VclPtr<SfxTabPage> SwEnvPrtPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwEnvPrtPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwEnvPrtPage>::Create(pParent, *rSet);
+ return std::make_unique<SwEnvPrtPage>(pParent, *rSet);
}
void SwEnvPrtPage::ActivatePage(const SfxItemSet&)
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index 6e5e7d9ea8c6..e86c0df1a582 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -53,19 +53,11 @@ class SwEnvPrtPage : public SfxTabPage
SwEnvDlg* GetParentSwEnvDlg() {return static_cast<SwEnvDlg*>(GetDialogController()); }
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
public:
SwEnvPrtPage(TabPageParent pParent, const SfxItemSet& rSet);
- virtual void dispose() override
- {
- m_xPrt.clear();
- SfxTabPage::dispose();
- }
virtual ~SwEnvPrtPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index e1e42ba1ef64..1a64abb75f99 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -90,14 +90,14 @@ void SwLabDlg::PageCreated(const OString &rId, SfxTabPage &rPage)
static_cast<SwLabPage*>(&rPage)->SetToBusinessCard();
}
else if (rId == "options")
- pPrtPage = static_cast<SwLabPrtPage*>(&rPage);
+ m_pPrtPage = static_cast<SwLabPrtPage*>(&rPage);
}
SwLabDlg::SwLabDlg(weld::Window* pParent, const SfxItemSet& rSet,
SwDBManager* pDBManager_, bool bLabel)
: SfxTabDialogController(pParent, "modules/swriter/ui/labeldialog.ui", "LabelDialog", &rSet)
, pDBManager(pDBManager_)
- , pPrtPage(nullptr)
+ , m_pPrtPage(nullptr)
, aTypeIds(50, 10)
, m_pRecs(new SwLabRecs)
, m_bLabel(bLabel)
@@ -214,8 +214,8 @@ SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, bool bCont)
Printer *SwLabDlg::GetPrt()
{
- if (pPrtPage)
- return pPrtPage->GetPrt();
+ if (m_pPrtPage)
+ return m_pPrtPage->GetPrt();
else
return nullptr;
}
@@ -446,9 +446,9 @@ void SwLabPage::InitDatabaseBox()
}
}
-VclPtr<SfxTabPage> SwLabPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwLabPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwLabPage>::Create(pParent, *rSet);
+ return std::make_unique<SwLabPage>(pParent, *rSet);
}
void SwLabPage::ActivatePage(const SfxItemSet& rSet)
@@ -574,9 +574,9 @@ SwPrivateDataPage::~SwPrivateDataPage()
{
}
-VclPtr<SfxTabPage> SwPrivateDataPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwPrivateDataPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwPrivateDataPage>::Create(pParent, *rSet);
+ return std::make_unique<SwPrivateDataPage>(pParent, *rSet);
}
void SwPrivateDataPage::ActivatePage(const SfxItemSet& rSet)
@@ -667,9 +667,9 @@ SwBusinessDataPage::~SwBusinessDataPage()
{
}
-VclPtr<SfxTabPage> SwBusinessDataPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwBusinessDataPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwBusinessDataPage>::Create(pParent, *rSet);
+ return std::make_unique<SwBusinessDataPage>(pParent, *rSet);
}
void SwBusinessDataPage::ActivatePage(const SfxItemSet& rSet)
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 7f2d9ece02ba..91442147431e 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -403,9 +403,9 @@ void SwLabFormatPage::ChangeMinMax()
m_xPHeightField->set_range(long(100) * lMinPHeight, long(100) * lMax, FieldUnit::TWIP);
}
-VclPtr<SfxTabPage> SwLabFormatPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwLabFormatPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwLabFormatPage>::Create(pParent, *rSet);
+ return std::make_unique<SwLabFormatPage>(pParent, *rSet);
}
void SwLabFormatPage::ActivatePage(const SfxItemSet& rSet)
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index 208b1bc1ac28..f4d55963cec1 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -95,14 +95,11 @@ class SwLabFormatPage : public SfxTabPage
void ChangeMinMax();
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
public:
SwLabFormatPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwLabFormatPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 337ae9614e8e..cefe4136f3c8 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -57,13 +57,7 @@ SwLabPrtPage::SwLabPrtPage(TabPageParent pParent, const SfxItemSet& rSet)
SwLabPrtPage::~SwLabPrtPage()
{
- disposeOnce();
-}
-
-void SwLabPrtPage::dispose()
-{
pPrinter.disposeAndClear();
- SfxTabPage::dispose();
}
IMPL_LINK( SwLabPrtPage, CountHdl, weld::Button&, rButton, void )
@@ -74,7 +68,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, weld::Button&, rButton, void )
if (!pPrinter)
pPrinter = VclPtr<Printer>::Create();
- PrinterSetupDialog aDlg(GetFrameWeld());
+ PrinterSetupDialog aDlg(GetDialogFrameWeld());
aDlg.SetPrinter(pPrinter);
aDlg.run();
rButton.grab_focus();
@@ -92,9 +86,9 @@ IMPL_LINK( SwLabPrtPage, CountHdl, weld::Button&, rButton, void )
}
}
-VclPtr<SfxTabPage> SwLabPrtPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
+std::unique_ptr<SfxTabPage> SwLabPrtPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
{
- return VclPtr<SwLabPrtPage>::Create(pParent, *rSet );
+ return std::make_unique<SwLabPrtPage>(pParent, *rSet );
}
void SwLabPrtPage::ActivatePage( const SfxItemSet& rSet )
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index f253653d3d1c..8c35033ded01 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -44,15 +44,11 @@ class SwLabPrtPage : public SfxTabPage
SwLabDlg* GetParentSwLabDlg() {return static_cast<SwLabDlg*>(GetDialogController());}
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
public:
SwLabPrtPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwLabPrtPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index f426694db434..ff81d3bfe17e 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -54,15 +54,12 @@ class SwLabPage : public SfxTabPage
void DisplayFormat ();
SwLabRec* GetSelectedEntryPos();
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
public:
SwLabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwLabPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
@@ -100,14 +97,11 @@ class SwPrivateDataPage : public SfxTabPage
std::unique_ptr<weld::Entry> m_xHomePageED;
std::unique_ptr<weld::Entry> m_xMailED;
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
public:
SwPrivateDataPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwPrivateDataPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
@@ -132,14 +126,11 @@ class SwBusinessDataPage : public SfxTabPage
std::unique_ptr<weld::Entry> m_xHomePageED;
std::unique_ptr<weld::Entry> m_xMailED;
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
public:
SwBusinessDataPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwBusinessDataPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 37fc878eddc8..e8b959ee3ed3 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -70,11 +70,6 @@ SwFieldDBPage::SwFieldDBPage(TabPageParent pParent, const SfxItemSet *const pCor
SwFieldDBPage::~SwFieldDBPage()
{
- disposeOnce();
-}
-
-void SwFieldDBPage::dispose()
-{
SwWrtShell* pSh = GetWrtShell();
if (!pSh)
pSh = ::GetActiveWrtShell();
@@ -82,8 +77,6 @@ void SwFieldDBPage::dispose()
SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
if (pDbManager)
pDbManager->RevokeLastRegistrations();
-
- SwFieldPage::dispose();
}
// initialise TabPage
@@ -262,10 +255,10 @@ bool SwFieldDBPage::FillItemSet(SfxItemSet* )
return false;
}
-VclPtr<SfxTabPage> SwFieldDBPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwFieldDBPage::Create( TabPageParent pParent,
const SfxItemSet *const pAttrSet )
{
- return VclPtr<SwFieldDBPage>::Create( pParent, pAttrSet );
+ return std::make_unique<SwFieldDBPage>( pParent, pAttrSet );
}
sal_uInt16 SwFieldDBPage::GetGroup()
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index e1a8207a7e3e..aac2b5fa31e8 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -64,9 +64,8 @@ public:
SwFieldDBPage(TabPageParent pParent, const SfxItemSet* rSet);
virtual ~SwFieldDBPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index bcdbbbfec664..e077868cb552 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -83,7 +83,6 @@ SwFieldDokInfPage::SwFieldDokInfPage(TabPageParent pParent, const SfxItemSet *co
SwFieldDokInfPage::~SwFieldDokInfPage()
{
- disposeOnce();
}
void SwFieldDokInfPage::Reset(const SfxItemSet* )
@@ -444,10 +443,10 @@ bool SwFieldDokInfPage::FillItemSet(SfxItemSet* )
return false;
}
-VclPtr<SfxTabPage> SwFieldDokInfPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwFieldDokInfPage::Create( TabPageParent pParent,
const SfxItemSet *const pAttrSet)
{
- return VclPtr<SwFieldDokInfPage>::Create(pParent, pAttrSet);
+ return std::make_unique<SwFieldDokInfPage>(pParent, pAttrSet);
}
sal_uInt16 SwFieldDokInfPage::GetGroup()
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index ed36cf581811..15c09d9084c5 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -55,7 +55,7 @@ public:
SwFieldDokInfPage(TabPageParent pWindow, const SfxItemSet* pSet);
virtual ~SwFieldDokInfPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 6d6b9ff7e98c..d1d04e96457b 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -74,7 +74,6 @@ SwFieldDokPage::SwFieldDokPage(TabPageParent pParent, const SfxItemSet *const pC
SwFieldDokPage::~SwFieldDokPage()
{
- disposeOnce();
}
void SwFieldDokPage::Reset(const SfxItemSet* )
@@ -609,10 +608,10 @@ bool SwFieldDokPage::FillItemSet(SfxItemSet* )
return false;
}
-VclPtr<SfxTabPage> SwFieldDokPage::Create(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwFieldDokPage::Create(TabPageParent pParent,
const SfxItemSet *const pAttrSet)
{
- return VclPtr<SwFieldDokPage>::Create(pParent, pAttrSet);
+ return std::make_unique<SwFieldDokPage>(pParent, pAttrSet);
}
sal_uInt16 SwFieldDokPage::GetGroup()
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index 4ed50de52a38..2fd437d7e4b9 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -59,7 +59,7 @@ public:
virtual ~SwFieldDokPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 84074dd4b45a..8cd8577920d9 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -135,9 +135,8 @@ SwFieldEditDlg::SwFieldEditDlg(SwView const & rVw)
// initialise controls
void SwFieldEditDlg::Init()
{
- VclPtr<SwFieldPage> pTabPage = static_cast<SwFieldPage*>(GetTabPage());
-
- if( pTabPage )
+ SwFieldPage* pTabPage = static_cast<SwFieldPage*>(GetTabPage());
+ if (pTabPage)
{
SwFieldMgr& rMgr = pTabPage->GetFieldMgr();
@@ -174,23 +173,23 @@ void SwFieldEditDlg::Init()
!pSh->HasReadonlySel());
}
-VclPtr<SfxTabPage> SwFieldEditDlg::CreatePage(sal_uInt16 nGroup)
+SfxTabPage* SwFieldEditDlg::CreatePage(sal_uInt16 nGroup)
{
TabPageParent pPageParent(get_content_area(), this);
// create TabPage
- VclPtr<SfxTabPage> pTabPage;
+ std::unique_ptr<SfxTabPage> xTabPage;
switch (nGroup)
{
case GRP_DOC:
- pTabPage = SwFieldDokPage::Create(pPageParent, nullptr);
+ xTabPage = SwFieldDokPage::Create(pPageParent, nullptr);
break;
case GRP_FKT:
- pTabPage = SwFieldFuncPage::Create(pPageParent, nullptr);
+ xTabPage = SwFieldFuncPage::Create(pPageParent, nullptr);
break;
case GRP_REF:
- pTabPage = SwFieldRefPage::Create(pPageParent, nullptr);
+ xTabPage = SwFieldRefPage::Create(pPageParent, nullptr);
break;
case GRP_REG:
{
@@ -205,30 +204,27 @@ VclPtr<SfxTabPage> SwFieldEditDlg::CreatePage(sal_uInt16 nGroup)
xDocProps->getUserDefinedProperties(),
uno::UNO_QUERY_THROW);
pSet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) );
- pTabPage = SwFieldDokInfPage::Create(pPageParent, pSet);
+ xTabPage = SwFieldDokInfPage::Create(pPageParent, pSet);
break;
}
#if HAVE_FEATURE_DBCONNECTIVITY
case GRP_DB:
- pTabPage = SwFieldDBPage::Create(pPageParent, nullptr);
- static_cast<SwFieldDBPage*>(pTabPage.get())->SetWrtShell(*pSh);
+ xTabPage = SwFieldDBPage::Create(pPageParent, nullptr);
+ static_cast<SwFieldDBPage*>(xTabPage.get())->SetWrtShell(*pSh);
break;
#endif
case GRP_VAR:
- pTabPage = SwFieldVarPage::Create(pPageParent, nullptr);
+ xTabPage = SwFieldVarPage::Create(pPageParent, nullptr);
break;
}
- assert(pTabPage);
+ assert(xTabPage);
- if (pTabPage)
- {
- static_cast<SwFieldPage*>(pTabPage.get())->SetWrtShell(pSh);
- SetTabPage(pTabPage);
- }
+ static_cast<SwFieldPage*>(xTabPage.get())->SetWrtShell(pSh);
+ SetTabPage(std::move(xTabPage));
- return pTabPage;
+ return GetTabPage();
}
SwFieldEditDlg::~SwFieldEditDlg()
@@ -254,7 +250,7 @@ IMPL_LINK_NOARG(SwFieldEditDlg, OKHdl, weld::Button&, void)
{
if (GetOKButton().get_sensitive())
{
- VclPtr<SfxTabPage> pTabPage = GetTabPage();
+ SfxTabPage* pTabPage = GetTabPage();
if (pTabPage)
pTabPage->FillItemSet(nullptr);
m_xDialog->response(RET_OK);
@@ -275,7 +271,7 @@ IMPL_LINK(SwFieldEditDlg, NextPrevHdl, weld::Button&, rButton, void)
pSh->EnterStdMode();
SwFieldType *pOldTyp = nullptr;
- VclPtr<SwFieldPage> pTabPage = static_cast<SwFieldPage*>(GetTabPage());
+ SwFieldPage* pTabPage = static_cast<SwFieldPage*>(GetTabPage());
//#112462# FillItemSet may delete the current field
//that's why it has to be called before accessing the current field
@@ -295,7 +291,7 @@ IMPL_LINK(SwFieldEditDlg, NextPrevHdl, weld::Button&, rButton, void)
sal_uInt16 nGroup = SwFieldMgr::GetGroup(pCurField->GetTypeId(), pCurField->GetSubType());
if (nGroup != pTabPage->GetGroup())
- pTabPage = static_cast<SwFieldPage*>(CreatePage(nGroup).get());
+ pTabPage = static_cast<SwFieldPage*>(CreatePage(nGroup));
pTabPage->EditNewField();
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 01612125b427..f140b30dd201 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -89,7 +89,6 @@ SwFieldFuncPage::SwFieldFuncPage(TabPageParent pParent, const SfxItemSet *const
SwFieldFuncPage::~SwFieldFuncPage()
{
- disposeOnce();
}
void SwFieldFuncPage::Reset(const SfxItemSet* )
@@ -576,10 +575,10 @@ bool SwFieldFuncPage::FillItemSet(SfxItemSet* )
return false;
}
-VclPtr<SfxTabPage> SwFieldFuncPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwFieldFuncPage::Create( TabPageParent pParent,
const SfxItemSet *const pAttrSet)
{
- return VclPtr<SwFieldFuncPage>::Create( pParent, pAttrSet );
+ return std::make_unique<SwFieldFuncPage>(pParent, pAttrSet);
}
sal_uInt16 SwFieldFuncPage::GetGroup()
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index 24a1264ef7b6..78588ad65cb4 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -82,7 +82,7 @@ public:
SwFieldFuncPage(TabPageParent pParent, const SfxItemSet* pSet);
virtual ~SwFieldFuncPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index b200528674a5..ba7673cf367d 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -97,7 +97,7 @@ void SwFieldPage::Init()
}
// newly initialise page
-void SwFieldPage::ActivatePage()
+void SwFieldPage::Activate()
{
EnableInsert(m_bInsert);
}
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 5fd94297244a..98cfd6760be9 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -70,15 +70,13 @@ protected:
sal_Unicode cDelim = ' ',
bool bIsAutomaticLanguage = true);
- using SfxTabPage::ActivatePage;
-
public:
SwFieldPage(TabPageParent pParent, const OUString& rUIXMLDescription,
const OString& rID, const SfxItemSet *pAttrSet);
virtual ~SwFieldPage() override;
- virtual void ActivatePage() override;
+ virtual void Activate() override;
SwFieldMgr& GetFieldMgr() { return m_aMgr; }
void SetWrtShell( SwWrtShell* m_pWrtShell );
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index dc5d36977044..e41c9d7c1599 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -110,7 +110,6 @@ SwFieldRefPage::SwFieldRefPage(TabPageParent pParent, const SfxItemSet *const pC
SwFieldRefPage::~SwFieldRefPage()
{
- disposeOnce();
}
IMPL_LINK_NOARG(SwFieldRefPage, ModifyHdl_Impl, weld::Entry&, void)
@@ -1085,10 +1084,10 @@ bool SwFieldRefPage::FillItemSet(SfxItemSet* )
return false;
}
-VclPtr<SfxTabPage> SwFieldRefPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwFieldRefPage::Create( TabPageParent pParent,
const SfxItemSet *const pAttrSet)
{
- return VclPtr<SwFieldRefPage>::Create( pParent, pAttrSet );
+ return std::make_unique<SwFieldRefPage>(pParent, pAttrSet);
}
sal_uInt16 SwFieldRefPage::GetGroup()
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index 9add08a354a1..d578e109ac87 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -80,7 +80,7 @@ public:
SwFieldRefPage(TabPageParent pParent, const SfxItemSet* pSet);
virtual ~SwFieldRefPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index e2431cff384c..b5aa075a6544 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -84,7 +84,6 @@ SwFieldVarPage::SwFieldVarPage(TabPageParent pParent, const SfxItemSet *const pC
SwFieldVarPage::~SwFieldVarPage()
{
- disposeOnce();
}
void SwFieldVarPage::Reset(const SfxItemSet* )
@@ -1204,10 +1203,10 @@ bool SwFieldVarPage::FillItemSet(SfxItemSet* )
return false;
}
-VclPtr<SfxTabPage> SwFieldVarPage::Create( TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwFieldVarPage::Create( TabPageParent pParent,
const SfxItemSet *const pAttrSet)
{
- return VclPtr<SwFieldVarPage>::Create( pParent, pAttrSet );
+ return std::make_unique<SwFieldVarPage>( pParent, pAttrSet );
}
sal_uInt16 SwFieldVarPage::GetGroup()
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index 245f575db77d..d47d3f819da8 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -70,11 +70,9 @@ protected:
public:
SwFieldVarPage(TabPageParent pParent, const SfxItemSet* pSet);
-
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual ~SwFieldVarPage() 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/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 769bf2d9fcc9..6e27d1d7dcd1 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -167,9 +167,9 @@ SwColumnDlg::SwColumnDlg(weld::Window* pParent, SwWrtShell& rSh)
assert(pColPgSet);
// create TabPage
- m_pTabPage = static_cast<SwColumnPage*>(SwColumnPage::Create(TabPageParent(m_xContentArea.get(), this), pColPgSet).get());
- m_pTabPage->GetApplyLabel()->show();
- weld::ComboBox* pApplyToLB = m_pTabPage->GetApplyComboBox();
+ m_xTabPage = std::make_unique<SwColumnPage>(TabPageParent(m_xContentArea.get(), this), *pColPgSet);
+ m_xTabPage->GetApplyLabel()->show();
+ weld::ComboBox* pApplyToLB = m_xTabPage->GetApplyComboBox();
pApplyToLB->show();
if (pCurrSection && (!m_rWrtShell.HasSelection() || 0 != nFullSectCnt))
@@ -210,13 +210,12 @@ SwColumnDlg::SwColumnDlg(weld::Window* pParent, SwWrtShell& rSh)
if (!pApplyToLB->get_count())
m_xOkButton->set_sensitive(false);
//#i97810# set focus to the TabPage
- m_pTabPage->ActivateColumnControl();
- m_pTabPage->Show();
+ m_xTabPage->ActivateColumnControl();
}
SwColumnDlg::~SwColumnDlg()
{
- m_pTabPage.disposeAndClear();
+ m_xTabPage.reset();
}
IMPL_LINK(SwColumnDlg, ObjectListBoxHdl, weld::ComboBox&, rBox, void)
@@ -230,9 +229,9 @@ void SwColumnDlg::ObjectHdl(const weld::ComboBox* pBox)
if (pBox)
{
- m_pTabPage->FillItemSet(pSet);
+ m_xTabPage->FillItemSet(pSet);
}
- weld::ComboBox* pApplyToLB = m_pTabPage->GetApplyComboBox();
+ weld::ComboBox* pApplyToLB = m_xTabPage->GetApplyComboBox();
m_nOldSelection = pApplyToLB->get_active_id().toInt32();
long nWidth = m_nSelectionWidth;
switch(m_nOldSelection)
@@ -258,19 +257,19 @@ void SwColumnDlg::ObjectHdl(const weld::ComboBox* pBox)
}
bool bIsSection = pSet == m_pSectionSet.get() || pSet == m_pSelectionSet.get();
- m_pTabPage->ShowBalance(bIsSection);
- m_pTabPage->SetInSection(bIsSection);
- m_pTabPage->SetFrameMode(true);
- m_pTabPage->SetPageWidth(nWidth);
+ m_xTabPage->ShowBalance(bIsSection);
+ m_xTabPage->SetInSection(bIsSection);
+ m_xTabPage->SetFrameMode(true);
+ m_xTabPage->SetPageWidth(nWidth);
if( pSet )
- m_pTabPage->Reset(pSet);
+ m_xTabPage->Reset(pSet);
}
IMPL_LINK_NOARG(SwColumnDlg, OkHdl, weld::Button&, void)
{
// evaluate current selection
SfxItemSet* pSet = EvalCurrentSelection();
- m_pTabPage->FillItemSet(pSet);
+ m_xTabPage->FillItemSet(pSet);
if(m_pSelectionSet && SfxItemState::SET == m_pSelectionSet->GetItemState(RES_COL))
{
@@ -511,11 +510,6 @@ SwColumnPage::SwColumnPage(TabPageParent pParent, const SfxItemSet &rSet)
SwColumnPage::~SwColumnPage()
{
- disposeOnce();
-}
-
-void SwColumnPage::dispose()
-{
m_xFrameExampleWN.reset();
m_xPgeExampleWN.reset();
m_xDefaultVS.reset();
@@ -527,7 +521,6 @@ void SwColumnPage::dispose()
m_xLineTypeDLB.reset();
m_xLineColorDLB.reset();
m_xTextDirectionLB.reset();
- SfxTabPage::dispose();
}
void SwColumnPage::SetPageWidth(long nPageWidth)
@@ -605,9 +598,9 @@ void SwColumnPage::Reset(const SfxItemSet *rSet)
}
// create TabPage
-VclPtr<SfxTabPage> SwColumnPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
+std::unique_ptr<SfxTabPage> SwColumnPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
{
- return VclPtr<SwColumnPage>::Create(pParent, *rSet);
+ return std::make_unique<SwColumnPage>(pParent, *rSet);
}
// stuff attributes into the Set when OK
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index c721285499c3..9add39674904 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -717,7 +717,6 @@ SwFramePage::SwFramePage(TabPageParent pParent, const SfxItemSet &rSet)
SwFramePage::~SwFramePage()
{
- disposeOnce();
}
namespace
@@ -821,9 +820,9 @@ void SwFramePage::setOptimalRelWidth()
m_xHoriRelationLB->clear();
}
-VclPtr<SfxTabPage> SwFramePage::Create(TabPageParent pParent, const SfxItemSet *rSet)
+std::unique_ptr<SfxTabPage> SwFramePage::Create(TabPageParent pParent, const SfxItemSet *rSet)
{
- return VclPtr<SwFramePage>::Create(pParent, *rSet);
+ return std::make_unique<SwFramePage>(pParent, *rSet);
}
void SwFramePage::EnableGraficMode()
@@ -911,9 +910,9 @@ void SwFramePage::Reset( const SfxItemSet *rSet )
else
{
if ( m_bNew )
- SetText(SwResId(STR_FRMUI_OLE_INSERT));
+ SetPageTitle(SwResId(STR_FRMUI_OLE_INSERT));
else
- SetText(SwResId(STR_FRMUI_OLE_EDIT));
+ SetPageTitle(SwResId(STR_FRMUI_OLE_EDIT));
}
}
else
@@ -2319,20 +2318,14 @@ SwGrfExtPage::SwGrfExtPage(TabPageParent pParent, const SfxItemSet &rSet)
SwGrfExtPage::~SwGrfExtPage()
{
- disposeOnce();
-}
-
-void SwGrfExtPage::dispose()
-{
m_xBmpWin.reset();
m_xCtlAngle.reset();
m_xGrfDlg.reset();
- SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SwGrfExtPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
+std::unique_ptr<SfxTabPage> SwGrfExtPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
{
- return VclPtr<SwGrfExtPage>::Create(pParent, *rSet);
+ return std::make_unique<SwGrfExtPage>(pParent, *rSet);
}
void SwGrfExtPage::Reset(const SfxItemSet *rSet)
@@ -2679,7 +2672,6 @@ SwFrameURLPage::SwFrameURLPage(TabPageParent pParent, const SfxItemSet &rSet)
SwFrameURLPage::~SwFrameURLPage()
{
- disposeOnce();
}
void SwFrameURLPage::Reset( const SfxItemSet *rSet )
@@ -2755,15 +2747,15 @@ bool SwFrameURLPage::FillItemSet(SfxItemSet *rSet)
return bModified;
}
-VclPtr<SfxTabPage> SwFrameURLPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
+std::unique_ptr<SfxTabPage> SwFrameURLPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
{
- return VclPtr<SwFrameURLPage>::Create(pParent, *rSet);
+ return std::make_unique<SwFrameURLPage>(pParent, *rSet);
}
IMPL_LINK_NOARG(SwFrameURLPage, InsertFileHdl, weld::Button&, void)
{
FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, GetFrameWeld());
+ FileDialogFlags::NONE, GetDialogFrameWeld());
uno::Reference < ui::dialogs::XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
try
@@ -2819,18 +2811,12 @@ SwFrameAddPage::SwFrameAddPage(TabPageParent pParent, const SfxItemSet &rSet)
SwFrameAddPage::~SwFrameAddPage()
{
- disposeOnce();
-}
-
-void SwFrameAddPage::dispose()
-{
m_xTextFlowLB.reset();
- SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SwFrameAddPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
+std::unique_ptr<SfxTabPage> SwFrameAddPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
{
- return VclPtr<SwFrameAddPage>::Create(pParent, *rSet);
+ return std::make_unique<SwFrameAddPage>(pParent, *rSet);
}
void SwFrameAddPage::Reset(const SfxItemSet *rSet )
diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx
index 9db98fd2e483..06d99bb2a78d 100644
--- a/sw/source/ui/frmdlg/uiborder.cxx
+++ b/sw/source/ui/frmdlg/uiborder.cxx
@@ -40,13 +40,13 @@ SwBorderDlg::SwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes
if (fnCreatePage)
{
TabPageParent pPageParent(get_content_area(), this);
- VclPtr<SfxTabPage> xNewPage = (*fnCreatePage)(pPageParent, &rSet);
+ std::unique_ptr<SfxTabPage> xNewPage = (*fnCreatePage)(pPageParent, &rSet);
SfxAllItemSet aSet(*(rSet.GetPool()));
aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE, static_cast<sal_uInt16>(nType)));
if(SwBorderModes::TABLE == nType)
aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_HIDESHADOWCTL));
xNewPage->PageCreated(aSet);
- SetTabPage(xNewPage);
+ SetTabPage(std::move(xNewPage));
}
}
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 99d9ad75e1b4..3b3f5909768a 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -59,10 +59,11 @@ SwWrapDlg::SwWrapDlg(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pWrtSh
{
// create TabPage
TabPageParent pPageParent(get_content_area(), this);
- VclPtr<SwWrapTabPage> xNewPage = static_cast<SwWrapTabPage*>(SwWrapTabPage::Create(pPageParent, &rSet).get());
- xNewPage->SetFormatUsed(false, bDrawMode);
- xNewPage->SetShell(pWrtShell);
- SetTabPage(xNewPage);
+ auto xNewPage = SwWrapTabPage::Create(pPageParent, &rSet);
+ SwWrapTabPage* pWrapPage = static_cast<SwWrapTabPage*>(xNewPage.get());
+ pWrapPage->SetFormatUsed(false, bDrawMode);
+ pWrapPage->SetShell(pWrtShell);
+ SetTabPage(std::move(xNewPage));
}
SwWrapTabPage::SwWrapTabPage(TabPageParent pParent, const SfxItemSet &rSet)
@@ -114,9 +115,9 @@ SwWrapTabPage::~SwWrapTabPage()
{
}
-VclPtr<SfxTabPage> SwWrapTabPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
+std::unique_ptr<SfxTabPage> SwWrapTabPage::Create(TabPageParent pParent, const SfxItemSet *rSet)
{
- return VclPtr<SwWrapTabPage>::Create(pParent, *rSet);
+ return std::make_unique<SwWrapTabPage>(pParent, *rSet);
}
void SwWrapTabPage::Reset(const SfxItemSet *rSet)
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index d8527538469b..a23cf50987b2 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -808,15 +808,9 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(TabPageParent pParent, const SfxItemSet&
SwTOXSelectTabPage::~SwTOXSelectTabPage()
{
- disposeOnce();
-}
-
-void SwTOXSelectTabPage::dispose()
-{
pIndexRes.reset();
pIndexEntryWrapper.reset();
m_xLanguageLB.reset();
- SfxTabPage::dispose();
}
void SwTOXSelectTabPage::SetWrtShell(SwWrtShell const & rSh)
@@ -1179,9 +1173,9 @@ DeactivateRC SwTOXSelectTabPage::DeactivatePage(SfxItemSet* _pSet)
return DeactivateRC::LeavePage;
}
-VclPtr<SfxTabPage> SwTOXSelectTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
+std::unique_ptr<SfxTabPage> SwTOXSelectTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{
- return VclPtr<SwTOXSelectTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwTOXSelectTabPage>(pParent, *rAttrSet);
}
IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, weld::ComboBox&, rBox, void)
@@ -1915,13 +1909,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(TabPageParent pParent, const SfxItemSet& rA
SwTOXEntryTabPage::~SwTOXEntryTabPage()
{
- disposeOnce();
-}
-
-void SwTOXEntryTabPage::dispose()
-{
m_xTokenWIN.reset();
- SfxTabPage::dispose();
}
IMPL_LINK_NOARG(SwTOXEntryTabPage, ModifyClickHdl, weld::ToggleButton&, void)
@@ -2124,9 +2112,9 @@ DeactivateRC SwTOXEntryTabPage::DeactivatePage( SfxItemSet* /*pSet*/)
return DeactivateRC::LeavePage;
}
-VclPtr<SfxTabPage> SwTOXEntryTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
+std::unique_ptr<SfxTabPage> SwTOXEntryTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{
- return VclPtr<SwTOXEntryTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwTOXEntryTabPage>(pParent, *rAttrSet);
}
IMPL_LINK_NOARG(SwTOXEntryTabPage, EditStyleHdl, weld::Button&, void)
@@ -3471,10 +3459,10 @@ DeactivateRC SwTOXStylesTabPage::DeactivatePage( SfxItemSet* /*pSet*/ )
return DeactivateRC::LeavePage;
}
-VclPtr<SfxTabPage> SwTOXStylesTabPage::Create(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwTOXStylesTabPage::Create(TabPageParent pParent,
const SfxItemSet* rAttrSet)
{
- return VclPtr<SwTOXStylesTabPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwTOXStylesTabPage>(pParent, *rAttrSet);
}
IMPL_LINK_NOARG(SwTOXStylesTabPage, EditStyleHdl, weld::Button&, void)
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)
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 1871d74a4f9e..a990769bde37 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -366,9 +366,9 @@ void SwFormatTablePage::ModifyHdl(const weld::MetricSpinButton& rEdit)
bModified = true;
}
-VclPtr<SfxTabPage> SwFormatTablePage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
+std::unique_ptr<SfxTabPage> SwFormatTablePage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{
- return VclPtr<SwFormatTablePage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwFormatTablePage>(pParent, *rAttrSet);
}
bool SwFormatTablePage::FillItemSet( SfxItemSet* rCoreSet )
@@ -767,22 +767,16 @@ IMPL_LINK_NOARG(SwTableColumnPage, SizeHdl, void*, void)
SwTableColumnPage::~SwTableColumnPage()
{
- disposeOnce();
-}
-
-void SwTableColumnPage::dispose()
-{
if (m_pSizeHdlEvent)
{
Application::RemoveUserEvent(m_pSizeHdlEvent);
m_pSizeHdlEvent = nullptr;
}
- SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SwTableColumnPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
+std::unique_ptr<SfxTabPage> SwTableColumnPage::Create(TabPageParent pParent, const SfxItemSet* rAttrSet)
{
- return VclPtr<SwTableColumnPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwTableColumnPage>(pParent, *rAttrSet);
}
void SwTableColumnPage::Reset( const SfxItemSet* )
@@ -1286,10 +1280,10 @@ SwTextFlowPage::~SwTextFlowPage()
{
}
-VclPtr<SfxTabPage> SwTextFlowPage::Create( TabPageParent pParent,
- const SfxItemSet* rAttrSet)
+std::unique_ptr<SfxTabPage> SwTextFlowPage::Create(TabPageParent pParent,
+ const SfxItemSet* rAttrSet)
{
- return VclPtr<SwTextFlowPage>::Create(pParent, *rAttrSet);
+ return std::make_unique<SwTextFlowPage>(pParent, *rAttrSet);
}
bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index b650846cedaa..196465f731cb 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -404,9 +404,9 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
ApplyUsrPref( aViewOpt, pAppView, bTextDialog? SvViewOpt::DestText : SvViewOpt::DestWeb);
}
-VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet )
+std::unique_ptr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet )
{
- VclPtr<SfxTabPage> pRet;
+ std::unique_ptr<SfxTabPage> xRet;
SfxAllItemSet aSet(*(rSet.GetPool()));
switch( nId )
{
@@ -415,12 +415,12 @@ VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( nId );
- pRet = (*fnCreatePage)( pParent, &rSet );
+ xRet = (*fnCreatePage)( pParent, &rSet );
break;
}
case RID_SW_TP_HTML_OPTGRID_PAGE:
case RID_SVXPAGE_GRID:
- pRet = SvxGridTabPage::Create(pParent, rSet);
+ xRet = SvxGridTabPage::Create(pParent, rSet);
break;
case RID_SW_TP_STD_FONT:
@@ -429,11 +429,11 @@ VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( nId );
- pRet = (*fnCreatePage)( pParent, &rSet );
+ xRet = (*fnCreatePage)( pParent, &rSet );
if(RID_SW_TP_STD_FONT != nId)
{
aSet.Put (SfxUInt16Item(SID_FONTMODE_TYPE, RID_SW_TP_STD_FONT_CJK == nId ? FONT_GROUP_CJK : FONT_GROUP_CTL));
- pRet->PageCreated(aSet);
+ xRet->PageCreated(aSet);
}
}
break;
@@ -442,9 +442,9 @@ VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( nId );
- pRet = (*fnCreatePage)( pParent, &rSet );
+ xRet = (*fnCreatePage)( pParent, &rSet );
aSet.Put (SfxBoolItem(SID_FAX_LIST, true));
- pRet->PageCreated(aSet);
+ xRet->PageCreated(aSet);
}
break;
case RID_SW_TP_HTML_OPTTABLE_PAGE:
@@ -452,7 +452,7 @@ VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( nId );
- pRet = (*fnCreatePage)( pParent, &rSet );
+ xRet = (*fnCreatePage)( pParent, &rSet );
SwView* pCurrView = GetView();
if(pCurrView)
{
@@ -462,7 +462,7 @@ VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen
(!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
{
aSet.Put (SwWrtShellItem(pCurrView->GetWrtShellPtr()));
- pRet->PageCreated(aSet);
+ xRet->PageCreated(aSet);
}
}
}
@@ -477,14 +477,14 @@ VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( nId );
- pRet = (*fnCreatePage)( pParent, &rSet );
+ xRet = (*fnCreatePage)( pParent, &rSet );
if (nId == RID_SW_TP_OPTSHDWCRSR || nId == RID_SW_TP_HTML_OPTSHDWCRSR)
{
SwView* pCurrView = GetView();
if(pCurrView)
{
aSet.Put( SwWrtShellItem( pCurrView->GetWrtShellPtr() ) );
- pRet->PageCreated(aSet);
+ xRet->PageCreated(aSet);
}
}
}
@@ -493,28 +493,28 @@ VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParen
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( nId );
- pRet = (*fnCreatePage)( pParent, &rSet );
+ xRet = (*fnCreatePage)( pParent, &rSet );
break;
}
case RID_SW_TP_BACKGROUND:
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND );
- pRet = (*fnCreatePage)( pParent, &rSet );
+ xRet = (*fnCreatePage)( pParent, &rSet );
break;
}
case RID_SW_TP_OPTCAPTION_PAGE:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SW_TP_OPTCAPTION_PAGE );
- pRet = (*fnCreatePage)( pParent, &rSet );
+ xRet = (*fnCreatePage)( pParent, &rSet );
}
break;
}
- if(!pRet)
+ if(!xRet)
SAL_WARN( "sw", "SwModule::CreateTabPage(): Unknown tabpage id " << nId );
- return pRet;
+ return xRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx
index 5b20909e163d..58067ee3fe2a 100644
--- a/sw/source/uibase/inc/chrdlg.hxx
+++ b/sw/source/uibase/inc/chrdlg.hxx
@@ -62,8 +62,7 @@ public:
SwCharURLPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwCharURLPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent,
const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx
index 427c802abebd..8b339c8aa48e 100644
--- a/sw/source/uibase/inc/column.hxx
+++ b/sw/source/uibase/inc/column.hxx
@@ -37,7 +37,7 @@ class SwColumnPage;
class SwColumnDlg : public SfxDialogController
{
SwWrtShell& m_rWrtShell;
- VclPtr<SwColumnPage> m_pTabPage;
+ std::unique_ptr<SwColumnPage> m_xTabPage;
std::unique_ptr<SfxItemSet> m_pPageSet;
std::unique_ptr<SfxItemSet> m_pSectionSet;
std::unique_ptr<SfxItemSet> m_pSelectionSet;
@@ -158,9 +158,6 @@ class SwColumnPage : public SfxTabPage
void ResetColWidth();
void SetLabels( sal_uInt16 nVis );
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
@@ -173,9 +170,8 @@ class SwColumnPage : public SfxTabPage
public:
SwColumnPage(TabPageParent pParent, const SfxItemSet &rSet);
virtual ~SwColumnPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
static const sal_uInt16* GetRanges() { return aPageRg; }
virtual bool FillItemSet(SfxItemSet *rSet) override;
diff --git a/sw/source/uibase/inc/docstdlg.hxx b/sw/source/uibase/inc/docstdlg.hxx
index 7ffbccc933b3..86c4a018412b 100644
--- a/sw/source/uibase/inc/docstdlg.hxx
+++ b/sw/source/uibase/inc/docstdlg.hxx
@@ -29,7 +29,7 @@ public:
SwDocStatPage(TabPageParent pParent, const SfxItemSet &rSet);
virtual ~SwDocStatPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
private:
virtual bool FillItemSet( SfxItemSet *rSet) override;
diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx
index 454385a60ea4..140f43347056 100644
--- a/sw/source/uibase/inc/drpcps.hxx
+++ b/sw/source/uibase/inc/drpcps.hxx
@@ -38,7 +38,7 @@ class SwDropCapsPage;
class SwDropCapsPict : public weld::CustomWidgetController
{
- VclPtr<SwDropCapsPage> mpPage;
+ SwDropCapsPage* mpPage;
OUString maText;
OUString maScriptText;
Color maBackColor;
@@ -144,16 +144,13 @@ friend class SwDropCapsPict;
DECL_LINK(SelectHdl, weld::ComboBox&, void);
DECL_LINK(WholeWordHdl, weld::ToggleButton&, void);
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
static const sal_uInt16 aPageRg[];
public:
SwDropCapsPage(TabPageParent pParent, const SfxItemSet &rSet);
virtual ~SwDropCapsPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
static const sal_uInt16* GetRanges() { return aPageRg; }
diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx
index 04686afdf93f..d62fd85f7477 100644
--- a/sw/source/uibase/inc/envlop.hxx
+++ b/sw/source/uibase/inc/envlop.hxx
@@ -103,15 +103,12 @@ class SwEnvPage : public SfxTabPage
SwEnvDlg* GetParentSwEnvDlg() { return m_pDialog; }
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
public:
SwEnvPage(TabPageParent pParent, const SfxItemSet& rSet);
void Init(SwEnvDlg* pDialog);
virtual ~SwEnvPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx
index c10cda5b0032..9f512ea3f7b8 100644
--- a/sw/source/uibase/inc/fldedt.hxx
+++ b/sw/source/uibase/inc/fldedt.hxx
@@ -38,7 +38,7 @@ class SwFieldEditDlg : public SfxSingleTabDialogController
DECL_LINK(NextPrevHdl, weld::Button&, void);
void Init();
- VclPtr<SfxTabPage> CreatePage(sal_uInt16 nGroup);
+ SfxTabPage* CreatePage(sal_uInt16 nGroup);
void EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr);
public:
diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx
index 8e89292dd9c2..34c76fa25500 100644
--- a/sw/source/uibase/inc/frmpage.hxx
+++ b/sw/source/uibase/inc/frmpage.hxx
@@ -173,16 +173,13 @@ class SwFramePage: public SfxTabPage
SwWrtShell *getFrameDlgParentShell();
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
static const sal_uInt16 aPageRg[];
public:
SwFramePage(TabPageParent pParent, const SfxItemSet &rSet);
virtual ~SwFramePage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
static const sal_uInt16* GetRanges() { return aPageRg; }
virtual bool FillItemSet(SfxItemSet *rSet) override;
@@ -230,16 +227,11 @@ class SwGrfExtPage : public SfxTabPage
DECL_LINK(BrowseHdl, weld::Button&, void);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual ~SwGrfExtPage() override;
- virtual void dispose() override;
-
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
public:
SwGrfExtPage(TabPageParent pParent, const SfxItemSet &rSet);
-
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ virtual ~SwGrfExtPage() override;
virtual bool FillItemSet(SfxItemSet *rSet) override;
virtual void Reset(const SfxItemSet *rSet) override;
@@ -260,14 +252,11 @@ class SwFrameURLPage : public SfxTabPage
DECL_LINK(InsertFileHdl, weld::Button&, void);
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
public:
SwFrameURLPage(TabPageParent pParent, const SfxItemSet &rSet);
virtual ~SwFrameURLPage() 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 *rSet) override;
@@ -316,9 +305,8 @@ class SwFrameAddPage : public SfxTabPage
public:
SwFrameAddPage(TabPageParent pParent, const SfxItemSet &rSet);
virtual ~SwFrameAddPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
static const sal_uInt16* GetRanges() { return aAddPgRg; }
virtual bool FillItemSet(SfxItemSet *rSet) override;
diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx
index b014e408b6a8..463f4e34c89d 100644
--- a/sw/source/uibase/inc/label.hxx
+++ b/sw/source/uibase/inc/label.hxx
@@ -33,7 +33,7 @@ class SwLabDlg : public SfxTabDialogController
{
SwLabelConfig aLabelsCfg;
SwDBManager* const pDBManager;
- VclPtr<SwLabPrtPage> pPrtPage;
+ SwLabPrtPage* m_pPrtPage;
std::vector<sal_uInt16> aTypeIds;
std::vector<OUString> aMakes;
diff --git a/sw/source/uibase/inc/mailconfigpage.hxx b/sw/source/uibase/inc/mailconfigpage.hxx
index f883b4100454..651589229c93 100644
--- a/sw/source/uibase/inc/mailconfigpage.hxx
+++ b/sw/source/uibase/inc/mailconfigpage.hxx
@@ -50,9 +50,8 @@ class SwMailConfigPage : public SfxTabPage
public:
SwMailConfigPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwMailConfigPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent,
const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx
index 3b1e3324a012..cac0942546fc 100644
--- a/sw/source/uibase/inc/mailmergewizard.hxx
+++ b/sw/source/uibase/inc/mailmergewizard.hxx
@@ -54,7 +54,7 @@ class SwMailMergeWizard : public ::vcl::RoadmapWizardMachine
using vcl::WizardMachine::skipUntil;
protected:
- virtual VclPtr<TabPage> createPage( WizardState _nState ) override;
+ virtual std::unique_ptr<BuilderPage> createPage( WizardState _nState ) override;
virtual void enterState( WizardState _nState ) override;
virtual OUString getStateDisplayName( WizardState _nState ) const override;
diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx
index dcd92d8fd8e3..ed1844fd9dcb 100644
--- a/sw/source/uibase/inc/num.hxx
+++ b/sw/source/uibase/inc/num.hxx
@@ -90,21 +90,17 @@ class SwNumPositionTabPage : public SfxTabPage
DECL_LINK(AlignAtHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(IndentAtHdl_Impl, weld::MetricSpinButton&, void);
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
public:
SwNumPositionTabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwNumPositionTabPage() override;
- virtual void dispose() override;
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent,
const SfxItemSet* rAttrSet);
void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;}
diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx
index 44dab6ae265e..fe2d66e5530d 100644
--- a/sw/source/uibase/inc/numpara.hxx
+++ b/sw/source/uibase/inc/numpara.hxx
@@ -65,7 +65,7 @@ public:
SwParagraphNumTabPage(TabPageParent pParent, const SfxItemSet& rSet );
virtual ~SwParagraphNumTabPage() override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent,
const SfxItemSet* rSet );
static const sal_uInt16* GetRanges() { return aPageRg; }
diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx
index c153a4d9eed1..e19f10f8aa68 100644
--- a/sw/source/uibase/inc/optcomp.hxx
+++ b/sw/source/uibase/inc/optcomp.hxx
@@ -68,7 +68,7 @@ public:
SwCompatibilityOptPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwCompatibilityOptPage() override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index d277a4d89e26..2c3461eab7d4 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -84,7 +84,7 @@ public:
SwLoadOptPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwLoadOptPage() override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent,
const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
@@ -185,9 +185,8 @@ private:
public:
SwCaptionOptPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwCaptionOptPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent,
const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index f6ef68d9d769..2778ea6ae131 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -62,7 +62,7 @@ public:
SwContentOptPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwContentOptPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
@@ -106,7 +106,7 @@ public:
SwAddPrinterTabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwAddPrinterTabPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
@@ -117,7 +117,6 @@ public:
class SwStdFontTabPage : public SfxTabPage
{
- friend class VclPtr<SwStdFontTabPage>;
OUString m_sShellStd;
OUString m_sShellTitle;
OUString m_sShellList;
@@ -166,12 +165,10 @@ class SwStdFontTabPage : public SfxTabPage
DECL_LINK(ModifyHdl, weld::ComboBox&, void );
DECL_LINK(LoseFocusHdl, weld::Widget&, void );
+public:
SwStdFontTabPage(TabPageParent pParent, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual ~SwStdFontTabPage() override;
- virtual void dispose() override;
-
-public:
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
@@ -209,7 +206,7 @@ public:
SwTableOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwTableOptionsTabPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
@@ -250,7 +247,7 @@ public:
SwShdwCursorOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwShdwCursorOptionsTabPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -322,9 +319,8 @@ class SwRedlineOptionsTabPage : public SfxTabPage
public:
SwRedlineOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwRedlineOptionsTabPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -340,7 +336,7 @@ public:
SwTestTabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwTestTabPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -381,7 +377,7 @@ public:
SwCompareOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SwCompareOptionsTabPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet );
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet );
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx
index f57ce394cbf7..76bc778c3d80 100644
--- a/sw/source/uibase/inc/outline.hxx
+++ b/sw/source/uibase/inc/outline.hxx
@@ -98,11 +98,10 @@ class SwOutlineSettingsTabPage : public SfxTabPage
void SetModified() { m_aPreviewWIN.Invalidate(); }
void CheckForStartValue_Impl(sal_uInt16 nNumberingType);
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
public:
SwOutlineSettingsTabPage(TabPageParent pParent, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent,
+ const SfxItemSet* rAttrSet);
virtual ~SwOutlineSettingsTabPage() override;
void SetWrtShell(SwWrtShell* pShell);
@@ -112,8 +111,6 @@ public:
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent,
- const SfxItemSet* rAttrSet);
void SetNumRule(SwNumRule *pRule)
{
pNumRule = pRule;
diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx
index 1333672518f8..b74e522f8a9d 100644
--- a/sw/source/uibase/inc/pgfnote.hxx
+++ b/sw/source/uibase/inc/pgfnote.hxx
@@ -27,18 +27,17 @@
// footnote settings TabPage
class SwFootNotePage: public SfxTabPage
{
- friend class VclPtr<SwFootNotePage>;
static const sal_uInt16 aPageRg[];
- SwFootNotePage(TabPageParent pParent, const SfxItemSet &rSet);
public:
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ SwFootNotePage(TabPageParent pParent, const SfxItemSet &rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ virtual ~SwFootNotePage() override;
+
static const sal_uInt16* GetRanges() { return aPageRg; }
virtual bool FillItemSet(SfxItemSet *rSet) override;
virtual void Reset(const SfxItemSet *rSet) override;
- virtual ~SwFootNotePage() override;
- virtual void dispose() override;
private:
long lMaxHeight;
@@ -60,9 +59,6 @@ private:
DECL_LINK(LineWidthChanged_Impl, weld::MetricSpinButton&, void);
DECL_LINK(LineColorSelected_Impl, ColorListBox&, void);
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx
index 9da77f57239f..826c67f44c2f 100644
--- a/sw/source/uibase/inc/pggrid.hxx
+++ b/sw/source/uibase/inc/pggrid.hxx
@@ -72,15 +72,11 @@ class SwTextGridPage: public SfxTabPage
DECL_LINK(GridModifyClickHdl, weld::ToggleButton&, void);
DECL_LINK(DisplayGridHdl, weld::ToggleButton&, void);
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
public:
SwTextGridPage(TabPageParent pParent, const SfxItemSet &rSet);
virtual ~SwTextGridPage() override;
- virtual void dispose() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
static const sal_uInt16* GetRanges();
virtual bool FillItemSet(SfxItemSet *rSet) override;
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index f33822807ee1..4d1414efe362 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -201,7 +201,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
SAL_DLLPRIVATE virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
SAL_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
SAL_DLLPRIVATE virtual bool HasPrintOptionsPage() const override;
- SAL_DLLPRIVATE virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) override;
+ SAL_DLLPRIVATE virtual std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) override;
SAL_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill );
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index 52719c41e3b3..f4597d9f1f33 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -165,7 +165,7 @@ public:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent,
const SfxItemSet* rAttrSet);
};
@@ -202,7 +202,7 @@ public:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent,
const SfxItemSet* rAttrSet);
};
@@ -221,7 +221,7 @@ public:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
void SetWrtShell(SwWrtShell const & rSh);
};
diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx
index c3f10021a74a..a00b7c354def 100644
--- a/sw/source/uibase/inc/swuiccoll.hxx
+++ b/sw/source/uibase/inc/swuiccoll.hxx
@@ -43,8 +43,6 @@ class SwCondCollPage : public SfxTabPage
std::unique_ptr<weld::Button> m_xRemovePB;
std::unique_ptr<weld::Button> m_xAssignPB;
- virtual ~SwCondCollPage() override;
-
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
DECL_LINK(OnOffHdl, weld::ToggleButton&, void);
@@ -55,15 +53,13 @@ class SwCondCollPage : public SfxTabPage
void AssignRemove(const weld::Widget*);
void SelectHdl(const weld::Widget*);
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
static const sal_uInt16 m_aPageRg[];
public:
SwCondCollPage(TabPageParent pParent, const SfxItemSet &rSet);
+ virtual ~SwCondCollPage() override;
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
static const sal_uInt16* GetRanges() { return m_aPageRg; }
virtual bool FillItemSet( SfxItemSet *rSet) override;
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index b3613020a1db..a0e3da23cd54 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -203,13 +203,9 @@ class SwTOXSelectTabPage : public SfxTabPage
void ApplyTOXDescription();
void FillTOXDescription();
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
public:
SwTOXSelectTabPage(TabPageParent pParent, const SfxItemSet& rAttrSet);
virtual ~SwTOXSelectTabPage() override;
- virtual void dispose() override;
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
@@ -217,7 +213,7 @@ public:
virtual void ActivatePage( const SfxItemSet& ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent,
const SfxItemSet* rAttrSet);
void SelectType(TOXTypes eSet); //preset TOXType, GlobalDoc
@@ -242,7 +238,7 @@ class SwTokenWindow
Idle m_aAdjustPositionsIdle;
- VclPtr<SwTOXEntryTabPage> m_pParent;
+ SwTOXEntryTabPage* m_pParent;
std::unique_ptr<weld::Container> m_xParentWidget;
std::unique_ptr<weld::Builder> m_xBuilder;
std::unique_ptr<weld::Container> m_xContainer;
@@ -385,20 +381,16 @@ class SwTOXEntryTabPage : public SfxTabPage
void OnModify(bool bAllLevels);
DECL_LINK(ModifyClickHdl, weld::ToggleButton&, void);
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
public:
SwTOXEntryTabPage(TabPageParent pParent, const SfxItemSet& rAttrSet);
virtual ~SwTOXEntryTabPage() override;
- virtual void dispose() override;
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
virtual void ActivatePage( const SfxItemSet& ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent,
const SfxItemSet* rAttrSet);
void SetWrtShell(SwWrtShell& rSh);
@@ -429,9 +421,6 @@ class SwTOXStylesTabPage : public SfxTabPage
return *pDlg->GetForm(pDlg->GetCurrentTOXType());
}
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
public:
SwTOXStylesTabPage(TabPageParent pParent, const SfxItemSet& rAttrSet);
virtual ~SwTOXStylesTabPage() override;
@@ -442,7 +431,7 @@ public:
virtual void ActivatePage( const SfxItemSet& ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent,
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent,
const SfxItemSet* rAttrSet);
};
diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx
index bffc69bb1c28..4abeca2a4fa6 100644
--- a/sw/source/uibase/inc/wrap.hxx
+++ b/sw/source/uibase/inc/wrap.hxx
@@ -68,8 +68,6 @@ class SwWrapTabPage: public SfxTabPage
std::unique_ptr<weld::CheckButton> m_xWrapOutsideCB;
std::unique_ptr<weld::CheckButton> m_xAllowOverlapCB;
- virtual ~SwWrapTabPage() override;
-
void SetImages();
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
@@ -78,15 +76,12 @@ class SwWrapTabPage: public SfxTabPage
DECL_LINK(WrapTypeHdl, weld::ToggleButton&, void);
DECL_LINK(ContourHdl, weld::ToggleButton&, void);
- using SfxTabPage::ActivatePage;
- using SfxTabPage::DeactivatePage;
-
static const sal_uInt16 m_aWrapPageRg[];
public:
SwWrapTabPage(TabPageParent pParent, const SfxItemSet &rSet);
-
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
+ virtual ~SwWrapTabPage() override;
virtual bool FillItemSet(SfxItemSet *rSet) override;
virtual void Reset(const SfxItemSet *rSet) override;
diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx
index f9d7c8d9ec50..6aea6553c59f 100644
--- a/sw/source/uibase/table/tablepg.hxx
+++ b/sw/source/uibase/table/tablepg.hxx
@@ -73,14 +73,11 @@ class SwFormatTablePage : public SfxTabPage
void RightModify();
DECL_LINK(ValueChangedHdl, weld::MetricSpinButton&, void);
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
public:
SwFormatTablePage(TabPageParent pParent, const SfxItemSet& rSet );
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual ~SwFormatTablePage() override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
@@ -124,15 +121,11 @@ class SwTableColumnPage : public SfxTabPage
void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth);
DECL_LINK(SizeHdl, void*, void);
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
public:
SwTableColumnPage(TabPageParent pParent, const SfxItemSet& rSet);
- virtual void dispose() override;
+ static std::unique_ptr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual ~SwTableColumnPage() override;
- static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
@@ -174,8 +167,8 @@ class SwTextFlowPage : public SfxTabPage
public:
SwTextFlowPage(TabPageParent pParent, const SfxItemSet& rSet);
+ static std::unique_ptr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet);
virtual ~SwTextFlowPage() 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/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 04f134490746..7306f7560795 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1696,7 +1696,7 @@ bool SwPagePreview::HasPrintOptionsPage() const
return true;
}
-VclPtr<SfxTabPage> SwPagePreview::CreatePrintOptionsPage(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwPagePreview::CreatePrintOptionsPage(TabPageParent pParent,
const SfxItemSet &rOptions)
{
return ::CreatePrintOptionsPage(pParent, rOptions, !m_bNormalPrint);
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 1aaa7750f5ac..52f82f0ab69a 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -174,7 +174,7 @@ namespace
// TabPage for application-specific print options
-VclPtr<SfxTabPage> SwView::CreatePrintOptionsPage(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> SwView::CreatePrintOptionsPage(TabPageParent pParent,
const SfxItemSet& rSet)
{
return ::CreatePrintOptionsPage(pParent, rSet, false);
@@ -307,7 +307,7 @@ void SwView::NotifyCursor(SfxViewShell* pViewShell) const
// Create page printer/additions for SwView and SwPagePreview
-VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent,
+std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent,
const SfxItemSet &rOptions,
bool bPreview)
{
@@ -318,16 +318,16 @@ VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent,
if (!fnCreatePage)
return nullptr;
- VclPtr<SfxTabPage> pSfxPage = fnCreatePage(pParent, &rOptions);
- OSL_ENSURE(pSfxPage, "No page");
- if (!pSfxPage)
+ std::unique_ptr<SfxTabPage> xSfxPage = fnCreatePage(pParent, &rOptions);
+ OSL_ENSURE(xSfxPage, "No page");
+ if (!xSfxPage)
return nullptr;
SfxAllItemSet aSet(*(rOptions.GetPool()));
aSet.Put(SfxBoolItem(SID_PREVIEWFLAG_TYPE, bPreview));
aSet.Put(SfxBoolItem(SID_FAX_LIST, true));
- pSfxPage->PageCreated(aSet);
- return pSfxPage;
+ xSfxPage->PageCreated(aSet);
+ return xSfxPage;
}
void SetAppPrintOptions( SwViewShell* pSh, bool bWeb )