From 25aa7cf964f527f00f24fb5582dfa5dc3b99787c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 3 Jun 2015 12:02:36 +0200 Subject: 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 Reviewed-by: Michael Meeks Tested-by: Michael Meeks --- cui/source/customize/cfg.cxx | 5 +++-- cui/source/dialogs/hltpbase.cxx | 2 +- cui/source/inc/align.hxx | 1 + cui/source/inc/autocdlg.hxx | 3 +++ cui/source/inc/backgrnd.hxx | 1 + cui/source/inc/border.hxx | 1 + cui/source/inc/chardlg.hxx | 4 ++++ cui/source/inc/grfpage.hxx | 1 + cui/source/inc/numfmt.hxx | 1 + cui/source/inc/optlingu.hxx | 1 + cui/source/inc/page.hxx | 1 + cui/source/inc/paragrph.hxx | 4 ++++ cui/source/inc/tabstpge.hxx | 1 + cui/source/options/dbregister.cxx | 2 +- cui/source/options/optinet2.cxx | 2 +- cui/source/options/optinet2.hxx | 2 +- cui/source/options/optlingu.cxx | 3 +-- cui/source/tabpages/align.cxx | 3 +-- cui/source/tabpages/autocdlg.cxx | 7 +++---- cui/source/tabpages/backgrnd.cxx | 2 +- cui/source/tabpages/border.cxx | 3 +-- cui/source/tabpages/chardlg.cxx | 12 ++++-------- cui/source/tabpages/grfpage.cxx | 3 +-- cui/source/tabpages/macroass.cxx | 2 +- cui/source/tabpages/numfmt.cxx | 2 +- cui/source/tabpages/page.cxx | 4 ++-- cui/source/tabpages/paragrph.cxx | 8 ++++---- cui/source/tabpages/tabstpge.cxx | 2 +- cui/source/tabpages/tpcolor.cxx | 2 +- 29 files changed, 48 insertions(+), 37 deletions(-) (limited to 'cui') 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::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::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; 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; using TabPage::ActivatePage; VclPtr m_pCheckLB; @@ -338,6 +339,7 @@ public: class OfaQuoteTabPage : public SfxTabPage { + friend class VclPtr; using TabPage::ActivatePage; private: @@ -402,6 +404,7 @@ public: class OfaAutoCompleteTabPage : public SfxTabPage { + friend class VclPtr; 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; static const sal_uInt16 pPageRanges[]; public: static VclPtr 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; 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; private: static const sal_uInt16 pNameRanges[]; @@ -175,6 +176,7 @@ public: class SvxCharEffectsPage : public SvxCharBasePage { + friend class VclPtr; private: static const sal_uInt16 pEffectsRanges[]; @@ -254,6 +256,7 @@ public: class SvxCharPositionPage : public SvxCharBasePage { + friend class VclPtr; static const sal_uInt16 pPositionRanges[]; private: @@ -334,6 +337,7 @@ public: class SvxCharTwoLinesPage : public SvxCharBasePage { + friend class VclPtr; private: static const sal_uInt16 pTwoLinesRanges[]; VclPtr 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; 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; 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; private: VclPtr m_pLinguModulesFT; VclPtr 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; 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; using TabPage::DeactivatePage; static const sal_uInt16 pStdRanges[]; @@ -124,6 +125,7 @@ public: class SvxParaAlignTabPage : public SfxTabPage { + friend class VclPtr; using TabPage::DeactivatePage; static const sal_uInt16 pAlignRanges[]; @@ -191,6 +193,7 @@ public: class SvxExtParagraphTabPage: public SfxTabPage { + friend class VclPtr; using TabPage::DeactivatePage; static const sal_uInt16 pExtRanges[]; @@ -265,6 +268,7 @@ private: class SvxAsianTabPage : public SfxTabPage { + friend class VclPtr; VclPtr m_pForbiddenRulesCB; VclPtr 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; 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::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 SvxSecurityTabPage::Create(vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr(new SvxSecurityTabPage(pParent, *rAttrSet), SAL_NO_ACQUIRE); + return VclPtr::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; private: VclPtr 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 SvxLinguTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr( new SvxLinguTabPage( pParent, *rAttrSet ), - SAL_NO_ACQUIRE ); + return VclPtr::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 AlignmentTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr( new AlignmentTabPage( pParent, *rAttrSet ), - SAL_NO_ACQUIRE ); + return VclPtr::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 OfaSwAutoFmtOptionsPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet) { - return VclPtr( new OfaSwAutoFmtOptionsPage(pParent, *rAttrSet), SAL_NO_ACQUIRE ); + return VclPtr::Create(pParent, *rAttrSet); } bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet* ) @@ -1906,8 +1906,7 @@ void OfaQuoteTabPage::dispose() VclPtr OfaQuoteTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet) { - return VclPtr( new OfaQuoteTabPage(pParent, *rAttrSet), - SAL_NO_ACQUIRE ); + return VclPtr::Create(pParent, *rAttrSet); } bool OfaQuoteTabPage::FillItemSet( SfxItemSet* ) @@ -2247,7 +2246,7 @@ void OfaAutoCompleteTabPage::dispose() VclPtr OfaAutoCompleteTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet) { - return VclPtr( new OfaAutoCompleteTabPage( pParent, *rSet ), SAL_NO_ACQUIRE ); + return VclPtr::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 SvxBackgroundTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr( new SvxBackgroundTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE ); + return VclPtr::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 SvxBorderTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr(new SvxBorderTabPage( pParent, *rAttrSet ), - SAL_NO_ACQUIRE); + return VclPtr::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 SvxCharNamePage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return VclPtr( new SvxCharNamePage( pParent, *rSet ), - SAL_NO_ACQUIRE ); + return VclPtr::Create( pParent, *rSet ); } @@ -1786,8 +1785,7 @@ SfxTabPage::sfxpg SvxCharEffectsPage::DeactivatePage( SfxItemSet* _pSet ) VclPtr SvxCharEffectsPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return VclPtr( new SvxCharEffectsPage( pParent, *rSet ), - SAL_NO_ACQUIRE ); + return VclPtr::Create( pParent, *rSet ); } @@ -2977,8 +2975,7 @@ SfxTabPage::sfxpg SvxCharPositionPage::DeactivatePage( SfxItemSet* _pSet ) VclPtr SvxCharPositionPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return VclPtr( new SvxCharPositionPage( pParent, *rSet ), - SAL_NO_ACQUIRE ); + return VclPtr::Create( pParent, *rSet ); } @@ -3550,8 +3547,7 @@ SfxTabPage::sfxpg SvxCharTwoLinesPage::DeactivatePage( SfxItemSet* _pSet ) VclPtr SvxCharTwoLinesPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return VclPtr( new SvxCharTwoLinesPage( pParent, *rSet ), - SAL_NO_ACQUIRE ); + return VclPtr::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 SvxGrfCropPage::Create(vcl::Window *pParent, const SfxItemSet *rSet) { - return VclPtr( new SvxGrfCropPage( pParent, *rSet ), - SAL_NO_ACQUIRE ); + return VclPtr::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 CreateSfxMacroTabPage( vcl::Window* pParent, const SfxItemSet& rAttrSet ) { - return VclPtr( new SfxMacroTabPage( pParent, NULL, rAttrSet ), SAL_NO_ACQUIRE ); + return VclPtr::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 SvxNumberFormatTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) { - return VclPtr( new SvxNumberFormatTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE ); + return VclPtr::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 SvxPageDescPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return VclPtr(new SvxPageDescPage( pParent, *rSet ), SAL_NO_ACQUIRE ); + return VclPtr::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::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 SvxStdParagraphTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet) { - return VclPtr( new SvxStdParagraphTabPage( pParent, *rSet ), SAL_NO_ACQUIRE ); + return VclPtr::Create( pParent, *rSet ); } bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) @@ -1072,7 +1072,7 @@ SfxTabPage::sfxpg SvxParaAlignTabPage::DeactivatePage( SfxItemSet* _pSet ) VclPtr SvxParaAlignTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return VclPtr( new SvxParaAlignTabPage(pParent, *rSet), SAL_NO_ACQUIRE ); + return VclPtr::Create(pParent, *rSet); } bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet ) @@ -1346,7 +1346,7 @@ void SvxParaAlignTabPage::PageCreated (const SfxAllItemSet& aSet) VclPtr SvxExtParagraphTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return VclPtr( new SvxExtParagraphTabPage( pParent, *rSet ), SAL_NO_ACQUIRE ); + return VclPtr::Create( pParent, *rSet ); } bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) @@ -2193,7 +2193,7 @@ void SvxAsianTabPage::dispose() VclPtr SvxAsianTabPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return VclPtr(new SvxAsianTabPage(pParent, *rSet), SAL_NO_ACQUIRE ); + return VclPtr::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 SvxTabulatorTabPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) { - return VclPtr(new SvxTabulatorTabPage(pParent, *rSet), SAL_NO_ACQUIRE); + return VclPtr::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::Create( GetParentDialog() ,"DuplicateNameDialog" ,"cui/ui/queryduplicatedialog.ui")); } -- cgit v1.2.3