summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-02 21:17:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-02 15:20:05 -0600
commit2aa4b7e1f06d85ffcaecf58b77c0fde0d15845ab (patch)
tree0109165c9d669affc653c6ddaf2551e950fe2b29 /svtools
parentaee12451d1d99881833b9f6a1a6af5598802801a (diff)
coverity#984421 Unused pointer value
Change-Id: Id44c9c3da6624db63e1f0f95dcaeddcc8b5402d5 Reviewed-on: https://gerrit.libreoffice.org/8426 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/treelistbox.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index f829cd775955..7a13b011638d 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3390,13 +3390,14 @@ Rectangle SvTreeListBox::GetFocusRect( SvTreeListEntry* pEntry, long nLine )
// if SelTab != 0, we have to calculate also
if( nFocusWidth == -1 || nFirstSelTab )
{
+ SvLBoxTab* pLastTab = NULL; // default to select whole width
+
sal_uInt16 nLastTab;
- SvLBoxTab* pLastTab = GetLastTab(SV_LBOXTAB_SHOW_SELECTION,nLastTab);
+ GetLastTab(SV_LBOXTAB_SHOW_SELECTION,nLastTab);
nLastTab++;
if( nLastTab < aTabs.size() ) // is there another one?
pLastTab = aTabs[ nLastTab ];
- else
- pLastTab = 0; // select whole width
+
aSize.Width() = pLastTab ? pLastTab->GetPos() : 0x0fffffff;
nFocusWidth = (short)aSize.Width();
if( pTab )