Kaydet (Commit) 590ef5d5 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Caolán McNamara

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/21878Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e5323836
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment