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 --- svtools/source/dialogs/prnsetup.cxx | 2 +- svtools/source/uno/unoiface.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'svtools') diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index a4c4431d8da9..05a7e6d9c59b 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -104,7 +104,7 @@ Printer* ImplPrnDlgUpdatePrinter( Printer* pPrinter, Printer* pTempPrinterIn ) if ( ! Printer::GetQueueInfo( aPrnName, false ) ) { pTempPrinter.disposeAndClear(); - pTempPrinter = new Printer; + pTempPrinter = VclPtr::Create(); } return pTempPrinter; diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index 8b9dd52f5446..55d0a483ca0d 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -118,7 +118,7 @@ SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const :: } else if (aServiceName.equalsIgnoreAsciiCase("roadmap") ) { - pWindow = new ::svt::ORoadmap( pParent, WB_TABSTOP ); + pWindow = VclPtr<::svt::ORoadmap>::Create( pParent, WB_TABSTOP ); *ppNewComp = new SVTXRoadmap; } else if ( aServiceName.equalsIgnoreAsciiCase( "ProgressBar" ) ) @@ -157,7 +157,7 @@ SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const :: { if ( pParent ) { - pWindow = new ::svt::table::TableControl(pParent, nWinBits); + pWindow = VclPtr<::svt::table::TableControl>::Create(pParent, nWinBits); *ppNewComp = new SVTXGridControl; } else -- cgit v1.2.3