diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-10-15 13:16:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-15 16:23:43 +0000 |
commit | 87f3db9b4873e9db6e6b2e04146fbe4a3835b7f7 (patch) | |
tree | b6ca24e00f574060c401929f5a548ddaabd1db40 /svx | |
parent | 6894ebffe4154887fd8b2521b5c5d1980dfe9e62 (diff) |
tdf#94495 - protect lstbox usage post-dispose, and fix ItemWin focus.
Change-Id: I2e4d1c79f57ec048d66111ed393491b7803ee3b9
Reviewed-on: https://gerrit.libreoffice.org/19387
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/itemwin.cxx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 0b575c292cf7..e4e207ff7d18 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -419,16 +419,19 @@ bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt ) { MouseNotifyEvent nType = rNEvt.GetType(); - if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) - nCurPos = GetSelectEntryPos(); - else if ( MouseNotifyEvent::LOSEFOCUS == nType - && Application::GetFocusWindow() - && !IsWindowOrChild( Application::GetFocusWindow(), true ) ) + if (!isDisposed()) { - if ( !bSelect ) - SelectEntryPos( nCurPos ); - else - bSelect = false; + if ( MouseNotifyEvent::MOUSEBUTTONDOWN == nType || MouseNotifyEvent::GETFOCUS == nType ) + nCurPos = GetSelectEntryPos(); + else if ( MouseNotifyEvent::LOSEFOCUS == nType + && Application::GetFocusWindow() + && !IsWindowOrChild( Application::GetFocusWindow(), true ) ) + { + if ( !bSelect ) + SelectEntryPos( nCurPos ); + else + bSelect = false; + } } return FillTypeLB::PreNotify( rNEvt ); @@ -440,6 +443,9 @@ bool SvxFillTypeBox::Notify( NotifyEvent& rNEvt ) { bool nHandled = FillTypeLB::Notify( rNEvt ); + if (isDisposed()) + return false; + if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); |