summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-03 12:02:36 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:22:03 +0200
commit25aa7cf964f527f00f24fb5582dfa5dc3b99787c (patch)
treeb1af48959fdb0a9069faeef58070a9d6986b11ba /cui
parent0d148087657487b2db4331b4fe12cd682d8ea5d9 (diff)
Apply new VclPtr clang plugin to catch potential problems.
Omit the plugin, and sw's FrameControlsManager for now. Change-Id: Ifb98a2e6e03a9d099efc1668305b96bd9142ca5f Reviewed-on: https://gerrit.libreoffice.org/16117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx5
-rw-r--r--cui/source/dialogs/hltpbase.cxx2
-rw-r--r--cui/source/inc/align.hxx1
-rw-r--r--cui/source/inc/autocdlg.hxx3
-rw-r--r--cui/source/inc/backgrnd.hxx1
-rw-r--r--cui/source/inc/border.hxx1
-rw-r--r--cui/source/inc/chardlg.hxx4
-rw-r--r--cui/source/inc/grfpage.hxx1
-rw-r--r--cui/source/inc/numfmt.hxx1
-rw-r--r--cui/source/inc/optlingu.hxx1
-rw-r--r--cui/source/inc/page.hxx1
-rw-r--r--cui/source/inc/paragrph.hxx4
-rw-r--r--cui/source/inc/tabstpge.hxx1
-rw-r--r--cui/source/options/dbregister.cxx2
-rw-r--r--cui/source/options/optinet2.cxx2
-rw-r--r--cui/source/options/optinet2.hxx2
-rw-r--r--cui/source/options/optlingu.cxx3
-rw-r--r--cui/source/tabpages/align.cxx3
-rw-r--r--cui/source/tabpages/autocdlg.cxx7
-rw-r--r--cui/source/tabpages/backgrnd.cxx2
-rw-r--r--cui/source/tabpages/border.cxx3
-rw-r--r--cui/source/tabpages/chardlg.cxx12
-rw-r--r--cui/source/tabpages/grfpage.cxx3
-rw-r--r--cui/source/tabpages/macroass.cxx2
-rw-r--r--cui/source/tabpages/numfmt.cxx2
-rw-r--r--cui/source/tabpages/page.cxx4
-rw-r--r--cui/source/tabpages/paragrph.cxx8
-rw-r--r--cui/source/tabpages/tabstpge.cxx2
-rw-r--r--cui/source/tabpages/tpcolor.cxx2
29 files changed, 48 insertions, 37 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index bbf8d43b2a9f..5e74b9cc53dc 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2118,8 +2118,9 @@ IMPL_LINK( SvxConfigPage, AsyncInfoMsg, OUString*, pMsg )
(void)pMsg;
// Asynchronous msg because of D&D
- MessageDialog( this, CUI_RES(
- RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ), VCL_MESSAGE_INFO ).Execute();
+ ScopedVclPtr<MessageDialog>::Create( this,
+ CUI_RES( RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ),
+ VCL_MESSAGE_INFO )->Execute();
return 0;
}
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 44724042527d..c9b7af89df3c 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -100,7 +100,7 @@ SvxHyperlinkTabPageBase::SvxHyperlinkTabPageBase ( vcl::Window *pParent,
aEmptyStr()
{
// create bookmark-window
- mpMarkWnd = new SvxHlinkDlgMarkWnd ( this );
+ mpMarkWnd = VclPtr<SvxHlinkDlgMarkWnd>::Create( this );
}
SvxHyperlinkTabPageBase::~SvxHyperlinkTabPageBase()
diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index 10ab45233440..a667eb9a902b 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -54,6 +54,7 @@ namespace svx {
class AlignmentTabPage : public SfxTabPage
{
using TabPage::DeactivatePage;
+ friend class VclPtr<AlignmentTabPage>;
static const sal_uInt16 s_pRanges[];
public:
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index db8bc8a84323..1ff86e70fcdf 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -125,6 +125,7 @@ public:
class OfaSwAutoFmtOptionsPage : public SfxTabPage
{
+ friend class VclPtr<OfaSwAutoFmtOptionsPage>;
using TabPage::ActivatePage;
VclPtr<OfaACorrCheckListBox> m_pCheckLB;
@@ -338,6 +339,7 @@ public:
class OfaQuoteTabPage : public SfxTabPage
{
+ friend class VclPtr<OfaQuoteTabPage>;
using TabPage::ActivatePage;
private:
@@ -402,6 +404,7 @@ public:
class OfaAutoCompleteTabPage : public SfxTabPage
{
+ friend class VclPtr<OfaAutoCompleteTabPage>;
public:
class AutoCompleteMultiListBox : public MultiListBox
{
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 89af13d6f0a9..633e4e6c1e9e 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -45,6 +45,7 @@ class SvxBrushItem;
class SvxBackgroundTabPage : public SvxTabPage
{
using TabPage::DeactivatePage;
+ friend class VclPtr<SvxBackgroundTabPage>;
static const sal_uInt16 pPageRanges[];
public:
static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 75b438b1962a..ff7780403bbb 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -40,6 +40,7 @@ namespace editeng
class SvxBorderTabPage : public SfxTabPage
{
+ friend class VclPtr<SvxBorderTabPage>;
using TabPage::DeactivatePage;
static const sal_uInt16 pRanges[];
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 9611af4c268f..577b5e1f09d6 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -77,6 +77,7 @@ struct SvxCharNamePage_Impl;
class SvxCharNamePage : public SvxCharBasePage
{
+ friend class VclPtr<SvxCharNamePage>;
private:
static const sal_uInt16 pNameRanges[];
@@ -175,6 +176,7 @@ public:
class SvxCharEffectsPage : public SvxCharBasePage
{
+ friend class VclPtr<SvxCharEffectsPage>;
private:
static const sal_uInt16 pEffectsRanges[];
@@ -254,6 +256,7 @@ public:
class SvxCharPositionPage : public SvxCharBasePage
{
+ friend class VclPtr<SvxCharPositionPage>;
static const sal_uInt16 pPositionRanges[];
private:
@@ -334,6 +337,7 @@ public:
class SvxCharTwoLinesPage : public SvxCharBasePage
{
+ friend class VclPtr<SvxCharTwoLinesPage>;
private:
static const sal_uInt16 pTwoLinesRanges[];
VclPtr<CheckBox> m_pTwoLinesBtn;
diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index 47fb0e9425a7..47ac00007c03 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -52,6 +52,7 @@ public:
class SvxGrfCropPage : public SfxTabPage
{
+ friend class VclPtr<SvxGrfCropPage>;
using Window::CalcZoom;
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index c4413ab894fd..0c3e21295c41 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -65,6 +65,7 @@ public:
class SvxNumberFormatTabPage : public SfxTabPage
{
+ friend class VclPtr<SvxNumberFormatTabPage>;
using SfxTabPage::DeactivatePage;
static const sal_uInt16 pRanges[];
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index 73d9aceac4f4..96a02388f8f4 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -93,6 +93,7 @@ public:
class SvxLinguTabPage : public SfxTabPage
{
+ friend class VclPtr<SvxLinguTabPage>;
private:
VclPtr<FixedText> m_pLinguModulesFT;
VclPtr<SvxCheckListBox> m_pLinguModulesCLB;
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index f68bf339bab7..c7b6436e551d 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -69,6 +69,7 @@ typedef sal_uInt16 MarginPosition;
class SvxPageDescPage : public SfxTabPage
{
+ friend class VclPtr<SvxPageDescPage>;
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 0c55af1988e2..db939787629c 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -45,6 +45,7 @@ class SvxLineSpacingItem;
class SvxStdParagraphTabPage: public SfxTabPage
{
+ friend class VclPtr<SvxStdParagraphTabPage>;
using TabPage::DeactivatePage;
static const sal_uInt16 pStdRanges[];
@@ -124,6 +125,7 @@ public:
class SvxParaAlignTabPage : public SfxTabPage
{
+ friend class VclPtr<SvxParaAlignTabPage>;
using TabPage::DeactivatePage;
static const sal_uInt16 pAlignRanges[];
@@ -191,6 +193,7 @@ public:
class SvxExtParagraphTabPage: public SfxTabPage
{
+ friend class VclPtr<SvxExtParagraphTabPage>;
using TabPage::DeactivatePage;
static const sal_uInt16 pExtRanges[];
@@ -265,6 +268,7 @@ private:
class SvxAsianTabPage : public SfxTabPage
{
+ friend class VclPtr<SvxAsianTabPage>;
VclPtr<CheckBox> m_pForbiddenRulesCB;
VclPtr<CheckBox> m_pHangingPunctCB;
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index 05903afd03a4..d73e9635a813 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -45,6 +45,7 @@ class TabWin_Impl;
class SvxTabulatorTabPage : public SfxTabPage
{
+ friend class VclPtr<SvxTabulatorTabPage>;
using TabPage::DeactivatePage;
static const sal_uInt16 pRanges[];
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index ba17c70246ef..dc58d2c2e034 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -125,7 +125,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons
Size aBoxSize = m_pPathCtrl->GetOutputSizePixel();
WinBits nBits = WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP;
- pPathBox = new svx::OptHeaderTabListBox( *m_pPathCtrl, nBits );
+ pPathBox = VclPtr<svx::OptHeaderTabListBox>::Create( *m_pPathCtrl, nBits );
HeaderBar &rBar = pPathBox->GetTheHeaderBar();
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 62989f32822c..a3c72ff37eef 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -912,7 +912,7 @@ void SvxSecurityTabPage::InitControls()
VclPtr<SfxTabPage> SvxSecurityTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
- return VclPtr<SfxTabPage>(new SvxSecurityTabPage(pParent, *rAttrSet), SAL_NO_ACQUIRE);
+ return VclPtr<SvxSecurityTabPage>::Create(pParent, *rAttrSet);
}
void SvxSecurityTabPage::ActivatePage( const SfxItemSet& )
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 15403a16082a..c23dc7be8c87 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -128,7 +128,7 @@ class SvxSecurityTabPage : public SfxTabPage
{
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
-
+ friend class VclPtr<SvxSecurityTabPage>;
private:
VclPtr<PushButton> m_pSecurityOptionsPB;
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 3c535f85e544..cafbe1180deb 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1153,8 +1153,7 @@ void SvxLinguTabPage::dispose()
VclPtr<SfxTabPage> SvxLinguTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{
- return VclPtr<SfxTabPage>( new SvxLinguTabPage( pParent, *rAttrSet ),
- SAL_NO_ACQUIRE );
+ return VclPtr<SvxLinguTabPage>::Create( pParent, *rAttrSet );
}
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 94012e5dc25e..cad777dfcc7a 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -286,8 +286,7 @@ void AlignmentTabPage::dispose()
VclPtr<SfxTabPage> AlignmentTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
- return VclPtr<SfxTabPage>( new AlignmentTabPage( pParent, *rAttrSet ),
- SAL_NO_ACQUIRE );
+ return VclPtr<AlignmentTabPage>::Create( pParent, *rAttrSet );
}
bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index c4a91772b2fe..c720d6725028 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -514,7 +514,7 @@ void OfaSwAutoFmtOptionsPage::dispose()
VclPtr<SfxTabPage> OfaSwAutoFmtOptionsPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet)
{
- return VclPtr<SfxTabPage>( new OfaSwAutoFmtOptionsPage(pParent, *rAttrSet), SAL_NO_ACQUIRE );
+ return VclPtr<OfaSwAutoFmtOptionsPage>::Create(pParent, *rAttrSet);
}
bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet* )
@@ -1906,8 +1906,7 @@ void OfaQuoteTabPage::dispose()
VclPtr<SfxTabPage> OfaQuoteTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet)
{
- return VclPtr<SfxTabPage>( new OfaQuoteTabPage(pParent, *rAttrSet),
- SAL_NO_ACQUIRE );
+ return VclPtr<OfaQuoteTabPage>::Create(pParent, *rAttrSet);
}
bool OfaQuoteTabPage::FillItemSet( SfxItemSet* )
@@ -2247,7 +2246,7 @@ void OfaAutoCompleteTabPage::dispose()
VclPtr<SfxTabPage> OfaAutoCompleteTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rSet)
{
- return VclPtr<SfxTabPage>( new OfaAutoCompleteTabPage( pParent, *rSet ), SAL_NO_ACQUIRE );
+ return VclPtr<OfaAutoCompleteTabPage>::Create( pParent, *rSet );
}
bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet* )
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 8c5703cd6241..9ba70fa9758f 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -482,7 +482,7 @@ void SvxBackgroundTabPage::dispose()
VclPtr<SfxTabPage> SvxBackgroundTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
{
- return VclPtr<SfxTabPage>( new SvxBackgroundTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
+ return VclPtr<SvxBackgroundTabPage>::Create( pParent, *rAttrSet );
}
void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 01881fe816d4..3daf13fb0317 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -372,8 +372,7 @@ void SvxBorderTabPage::dispose()
VclPtr<SfxTabPage> SvxBorderTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{
- return VclPtr<SfxTabPage>(new SvxBorderTabPage( pParent, *rAttrSet ),
- SAL_NO_ACQUIRE);
+ return VclPtr<SvxBorderTabPage>::Create( pParent, *rAttrSet );
}
void SvxBorderTabPage::ResetFrameLine_Impl( svx::FrameBorderType eBorder, const SvxBorderLine* pCoreLine, bool bValid )
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index ec30ed37a87e..dc1e7ef5de17 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1220,8 +1220,7 @@ SfxTabPage::sfxpg SvxCharNamePage::DeactivatePage( SfxItemSet* _pSet )
VclPtr<SfxTabPage> SvxCharNamePage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
- return VclPtr<SfxTabPage>( new SvxCharNamePage( pParent, *rSet ),
- SAL_NO_ACQUIRE );
+ return VclPtr<SvxCharNamePage>::Create( pParent, *rSet );
}
@@ -1786,8 +1785,7 @@ SfxTabPage::sfxpg SvxCharEffectsPage::DeactivatePage( SfxItemSet* _pSet )
VclPtr<SfxTabPage> SvxCharEffectsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
- return VclPtr<SfxTabPage>( new SvxCharEffectsPage( pParent, *rSet ),
- SAL_NO_ACQUIRE );
+ return VclPtr<SvxCharEffectsPage>::Create( pParent, *rSet );
}
@@ -2977,8 +2975,7 @@ SfxTabPage::sfxpg SvxCharPositionPage::DeactivatePage( SfxItemSet* _pSet )
VclPtr<SfxTabPage> SvxCharPositionPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
- return VclPtr<SfxTabPage>( new SvxCharPositionPage( pParent, *rSet ),
- SAL_NO_ACQUIRE );
+ return VclPtr<SvxCharPositionPage>::Create( pParent, *rSet );
}
@@ -3550,8 +3547,7 @@ SfxTabPage::sfxpg SvxCharTwoLinesPage::DeactivatePage( SfxItemSet* _pSet )
VclPtr<SfxTabPage> SvxCharTwoLinesPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
- return VclPtr<SfxTabPage>( new SvxCharTwoLinesPage( pParent, *rSet ),
- SAL_NO_ACQUIRE );
+ return VclPtr<SvxCharTwoLinesPage>::Create( pParent, *rSet );
}
void SvxCharTwoLinesPage::Reset( const SfxItemSet* rSet )
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 4e4095a60e93..7d24012235e3 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -156,8 +156,7 @@ void SvxGrfCropPage::dispose()
VclPtr<SfxTabPage> SvxGrfCropPage::Create(vcl::Window *pParent, const SfxItemSet *rSet)
{
- return VclPtr<SfxTabPage>( new SvxGrfCropPage( pParent, *rSet ),
- SAL_NO_ACQUIRE );
+ return VclPtr<SvxGrfCropPage>::Create( pParent, *rSet );
}
void SvxGrfCropPage::Reset( const SfxItemSet *rSet )
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 2e90ed844306..cb096cab7018 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -458,7 +458,7 @@ namespace
{
VclPtr<SfxMacroTabPage> CreateSfxMacroTabPage( vcl::Window* pParent, const SfxItemSet& rAttrSet )
{
- return VclPtr<SfxMacroTabPage>( new SfxMacroTabPage( pParent, NULL, rAttrSet ), SAL_NO_ACQUIRE );
+ return VclPtr<SfxMacroTabPage>::Create( pParent, nullptr, rAttrSet );
}
}
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index a8974af76baf..54bcb270b116 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -383,7 +383,7 @@ void SvxNumberFormatTabPage::Init_Impl()
VclPtr<SfxTabPage> SvxNumberFormatTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{
- return VclPtr<SfxTabPage>( new SvxNumberFormatTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
+ return VclPtr<SvxNumberFormatTabPage>::Create( pParent, *rAttrSet );
}
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 65c28c798561..7a60414d310f 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -166,7 +166,7 @@ bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize )
VclPtr<SfxTabPage> SvxPageDescPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
- return VclPtr<SfxTabPage>(new SvxPageDescPage( pParent, *rSet ), SAL_NO_ACQUIRE );
+ return VclPtr<SvxPageDescPage>::Create( pParent, *rSet );
}
SvxPageDescPage::SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rAttr ) :
@@ -292,7 +292,7 @@ SvxPageDescPage::SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rAttr
}
else
{
- mpDefPrinter = new Printer;
+ mpDefPrinter = VclPtr<Printer>::Create();
mbDelPrinter = true;
}
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index d128a30060b4..111dac960a4b 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -196,7 +196,7 @@ IMPL_LINK_NOARG(SvxStdParagraphTabPage, ELRLoseFocusHdl)
VclPtr<SfxTabPage> SvxStdParagraphTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet)
{
- return VclPtr<SfxTabPage>( new SvxStdParagraphTabPage( pParent, *rSet ), SAL_NO_ACQUIRE );
+ return VclPtr<SvxStdParagraphTabPage>::Create( pParent, *rSet );
}
bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
@@ -1072,7 +1072,7 @@ SfxTabPage::sfxpg SvxParaAlignTabPage::DeactivatePage( SfxItemSet* _pSet )
VclPtr<SfxTabPage> SvxParaAlignTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
- return VclPtr<SfxTabPage>( new SvxParaAlignTabPage(pParent, *rSet), SAL_NO_ACQUIRE );
+ return VclPtr<SvxParaAlignTabPage>::Create(pParent, *rSet);
}
bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet )
@@ -1346,7 +1346,7 @@ void SvxParaAlignTabPage::PageCreated (const SfxAllItemSet& aSet)
VclPtr<SfxTabPage> SvxExtParagraphTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rSet )
{
- return VclPtr<SfxTabPage>( new SvxExtParagraphTabPage( pParent, *rSet ), SAL_NO_ACQUIRE );
+ return VclPtr<SvxExtParagraphTabPage>::Create( pParent, *rSet );
}
bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
@@ -2193,7 +2193,7 @@ void SvxAsianTabPage::dispose()
VclPtr<SfxTabPage> SvxAsianTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet )
{
- return VclPtr<SfxTabPage>(new SvxAsianTabPage(pParent, *rSet), SAL_NO_ACQUIRE );
+ return VclPtr<SvxAsianTabPage>::Create(pParent, *rSet);
}
const sal_uInt16* SvxAsianTabPage::GetRanges()
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 6bef88304734..87c493b43901 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -265,7 +265,7 @@ bool SvxTabulatorTabPage::FillItemSet(SfxItemSet* rSet)
VclPtr<SfxTabPage> SvxTabulatorTabPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
{
- return VclPtr<SfxTabPage>(new SvxTabulatorTabPage(pParent, *rSet), SAL_NO_ACQUIRE);
+ return VclPtr<SvxTabulatorTabPage>::Create(pParent, *rSet);
}
void SvxTabulatorTabPage::Reset(const SfxItemSet* rSet)
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 6319c4d47752..94231c5f0f32 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -723,7 +723,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl)
if( !pWarnBox )
{
- pWarnBox.reset(new MessageDialog( GetParentDialog()
+ pWarnBox.reset(VclPtr<MessageDialog>::Create( GetParentDialog()
,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui"));
}