From e6ffb539ee232ea0c679928ff456c1cf97429f63 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 25 Nov 2016 16:23:17 +0200 Subject: loplugin:vclwidgets check for assigning from VclPt to T* Inspired by a recent bug report where we were assigning the result of VclPtr::Create to a raw pointer. As a consequence, we also need to change various methods that were returning newly created Window subclasses via raw pointer, to instead return those via VclPtr Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b Reviewed-on: https://gerrit.libreoffice.org/31318 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- framework/source/uielement/toolbarwrapper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framework/source/uielement/toolbarwrapper.cxx') diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 8733666c047b..288294ada9ac 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -141,7 +141,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th if ( xFrame.is() && m_xConfigSource.is() ) { // Create VCL based toolbar which will be filled with settings data - ToolBox* pToolBar = nullptr; + VclPtr pToolBar; ToolBarManager* pToolBarManager = nullptr; { SolarMutexGuard aSolarMutexGuard; -- cgit