[Libreoffice-commits] core.git: Branch 'feature/vclptr' - 3 commits - svtools/source sw/source vcl/source
Michael Meeks
michael.meeks at collabora.com
Thu Apr 16 01:51:39 PDT 2015
svtools/source/contnr/treelistbox.cxx | 8 +++++---
sw/source/uibase/utlui/navipi.cxx | 10 ++++++++--
vcl/source/control/lstbox.cxx | 10 ++++++++--
3 files changed, 21 insertions(+), 7 deletions(-)
New commits:
commit 93f9f9cc132fda19a8860c80f40a872e4158110e
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Apr 16 09:54:40 2015 +0100
Stop timers, and guard against emission on disposed navigator.
Change-Id: Ide1f94c07c83a5b8d9a522e02177ad2fe481eff2
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index f5f788f..ed513a5 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -878,6 +878,9 @@ void SwNavigationPI::dispose()
aContentTree.disposeAndClear();
aGlobalTree.disposeAndClear();
aDocListBox.disposeAndClear();
+
+ aPageChgIdle.Stop();
+
vcl::Window::dispose();
}
@@ -1249,8 +1252,11 @@ bool SwNavigationPI::IsGlobalDoc() const
IMPL_LINK_NOARG(SwNavigationPI, ChangePageHdl)
{
- EditAction(&GetPageEdit());
- GetPageEdit().GrabFocus();
+ if (!IsDisposed())
+ {
+ EditAction(&GetPageEdit());
+ GetPageEdit().GrabFocus();
+ }
return 0;
}
commit 83dbbfe52d280f8b18423f83b68ffb8147998c85
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Apr 16 09:54:22 2015 +0100
Make ListBox handier post dispose.
Change-Id: I98fcf119a1a7118b46482a43c5f8acb7f0044900
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 966ddbb..1cc42b1 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -521,9 +521,15 @@ vcl::Window* ListBox::GetPreferredKeyInputWindow()
void ListBox::LoseFocus()
{
if( IsDropDownBox() )
- mpImplWin->HideFocus();
+ {
+ if (mpImplWin)
+ mpImplWin->HideFocus();
+ }
else
- mpImplLB->HideFocus();
+ {
+ if (mpImplLB)
+ mpImplLB->HideFocus();
+ }
Control::LoseFocus();
}
commit baca9020b83c09dc486e706a1e99060cf0dac063
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Apr 16 09:34:30 2015 +0100
More protection for SvTreeListBox.
Change-Id: I55731cd69aa12f5709e300759f556e29e8ceff5d
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index bc5e933e..1091438 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -2219,10 +2219,10 @@ void SvTreeListBox::GetFocus()
void SvTreeListBox::LoseFocus()
{
- //If there is no item in the tree, delete visual focus.
- if( !First())
+ // If there is no item in the tree, delete visual focus.
+ if ( !First() )
Invalidate();
- if( pImp )
+ if ( pImp )
pImp->LoseFocus();
Control::LoseFocus();
}
@@ -3514,6 +3514,8 @@ void SvTreeListBox::NotifyScrolled()
void SvTreeListBox::Invalidate( sal_uInt16 nInvalidateFlags )
{
+ if (!pImp)
+ return;
if( nFocusWidth == -1 )
// to make sure that the control doesn't show the wrong focus rectangle
// after painting
More information about the Libreoffice-commits
mailing list