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 --- sfx2/source/appl/workwin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sfx2/source/appl') diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index a8ad4dbf45a2..1c15d90bffe9 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -581,7 +581,7 @@ void SfxWorkWindow::DeleteControllers_Impl() // DockingWindows) for (size_t n=0; n const &p = pSplit[n]; if (p->GetWindowCount()) p->Lock(); } @@ -1162,7 +1162,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2() sal_uInt16 n; for ( n=0; n const & p = pSplit[n]; if (p->GetWindowCount()) p->Lock(); } @@ -1246,7 +1246,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2() // Unlock the SplitWindows again for ( n=0; n const & p = pSplit[n]; if (p->GetWindowCount()) p->Lock(false); } @@ -2383,7 +2383,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin ) // (not pinned, FadeIn). // Only the abandoned window may be invisible, because perhaps its // size is just being calculated before it is displayed. - SfxSplitWindow* pSplitWin = pSplit[n]; + VclPtr const & pSplitWin = pSplit[n]; bool bDummyWindow = !pSplitWin->IsFadeIn(); vcl::Window *pDummy = pSplitWin->GetSplitWindow(); vcl::Window *pWin = bDummyWindow ? pDummy : pSplitWin; -- cgit