[Libreoffice-commits] core.git: vcl/source
Katarina Behrens
Katarina.Behrens at cib.de
Thu Jan 28 07:29:28 PST 2016
vcl/source/window/brdwin.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 590ef5d5dc5f5aefd9d590aa65686d0d9554506d
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Thu Jan 28 13:21:47 2016 +0100
tdf#96745: Hold VclPtr on a border window's client window
It was Noel's idea ... makes sense given that following Close()
call not only closes, but also deletes the window
Change-Id: Icea766d2a7bb7bd834f32080f7c69a9fc67ebf54
Reviewed-on: https://gerrit.libreoffice.org/21878
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 962bd8a..fc804fa 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -960,9 +960,9 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt )
{
// dispatch to correct window type (why is Close() not virtual ??? )
// TODO: make Close() virtual
- vcl::Window *pWin = pBorderWindow->ImplGetClientWindow()->ImplGetWindow();
- SystemWindow *pSysWin = dynamic_cast<SystemWindow* >(pWin);
- DockingWindow *pDockWin = dynamic_cast<DockingWindow*>(pWin);
+ VclPtr<vcl::Window> pWin = pBorderWindow->ImplGetClientWindow()->ImplGetWindow();
+ SystemWindow *pSysWin = dynamic_cast<SystemWindow* >(pWin.get());
+ DockingWindow *pDockWin = dynamic_cast<DockingWindow*>(pWin.get());
if ( pSysWin )
pSysWin->Close();
else if ( pDockWin )
More information about the Libreoffice-commits
mailing list