summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorKshitij Pathania <kshitijpathania@gmail.com>2018-01-27 00:40:50 +0530
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-01-28 18:22:56 +0100
commit056c3bf2dcae23cd711d4cbffc3058cf31bfe75e (patch)
tree78c541b6307238c406c3170aa02ff182bb42148a /svtools/source
parent94823392874be9c9249e312f6783394edf0e731f (diff)
tdf#111837 removed lag in navigator selection update
Change-Id: I0d15f8352ab1d8846df3b03334bda20550d117d2 Reviewed-on: https://gerrit.libreoffice.org/48717 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/contnr/treelistbox.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 1a8c07d521a6..64236a8a8d45 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3489,6 +3489,19 @@ SvTreeListEntry* SvTreeListBox::GetNextEntryInView(SvTreeListEntry* pEntry ) con
return pNext;
}
+SvTreeListEntry* SvTreeListBox::GetPrevEntryInView(SvTreeListEntry* pEntry ) const
+{
+ SvTreeListEntry* pPrev = PrevVisible( pEntry );
+ if( pPrev )
+ {
+ Point aPos( GetEntryPosition(pPrev) );
+ const Size& rSize = pImpl->GetOutputSize();
+ if( aPos.Y() < 0 || aPos.Y() >= rSize.Height() )
+ return nullptr;
+ }
+ return pPrev;
+}
+
SvTreeListEntry* SvTreeListBox::GetLastEntryInView() const
{
SvTreeListEntry* pEntry = GetFirstEntryInView();