summaryrefslogtreecommitdiff
path: root/vcl/source/window/toolbox.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-25 16:23:17 +0200
committerAndras Timar <andras.timar@collabora.com>2017-02-18 00:45:43 +0100
commit390e951b78288e082361c386ff5c6618d917c333 (patch)
treede4f00b80ba6183f2678d6582d98d65a94b93aa7 /vcl/source/window/toolbox.cxx
parent599719217423e8468cc54cc74e7850b8a867120b (diff)
loplugin:vclwidgets check for assigning from VclPt<T> to T*
Inspired by a recent bug report where we were assigning the result of VclPtr<T>::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 <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit e6ffb539ee232ea0c679928ff456c1cf97429f63)
Diffstat (limited to 'vcl/source/window/toolbox.cxx')
-rw-r--r--vcl/source/window/toolbox.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 14579fafe3dc..a8be10972635 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -5590,7 +5590,7 @@ void ToolBox::ImplShowFocus()
ImplToolItem* pItem = ImplGetItem( mnHighItemId );
if( pItem->mpWindow && !pItem->mpWindow->IsDisposed() )
{
- vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow;
+ vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow.get() : pItem->mpWindow.get();
pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = true;
pWin->Invalidate();
}
@@ -5604,7 +5604,7 @@ void ToolBox::ImplHideFocus()
ImplToolItem* pItem = ImplGetItem( mnHighItemId );
if( pItem && pItem->mpWindow )
{
- vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow;
+ vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow.get() : pItem->mpWindow.get();
pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = false;
pWin->Invalidate();
}