summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-16 15:38:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-09-16 18:04:03 +0200
commit7d41122d44f8566316d984333b17af39cf413a52 (patch)
tree002e0fff8fb9e952c81bf20c8d101de7727c7fa5 /sc/source
parent32efe70bbfc6c64df7cf73b6a6c0976ae1e038c8 (diff)
Resolves: tdf#127546 crash on clicking --Column-- or --Row--
Change-Id: I59cbcdf09b679521b54aa9752bfb15db89829993 Reviewed-on: https://gerrit.libreoffice.org/79016 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 1a4414f992d4..ccd9076570a4 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -632,7 +632,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl, weld::TreeView&, void)
while (nSelectPos != -1 && nSelectPos < nCnt && m_xLbRange->get_id(nSelectPos).toInt32() == nEntryDataDelim)
{ // skip Delimiter
++nMoves;
- m_xLbRange->select( ++nSelectPos );
+ ++nSelectPos;
}
OUString aRangeStr = m_xLbRange->get_selected_text();
if ( nMoves )
@@ -641,7 +641,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl, weld::TreeView&, void)
{ // if entries exist before the " --- Row --- " Delimiter then
// do not stop at the delimiter
nSelectPos = nCnt - 2;
- m_xLbRange->select( nSelectPos );
+ m_xLbRange->select(nSelectPos);
aRangeStr = m_xLbRange->get_selected_text();
}
else if ( nSelectPos > 2 && nSelectPos < nCnt && !aRangeStr.isEmpty()
@@ -651,6 +651,8 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl, weld::TreeView&, void)
m_xLbRange->select( nSelectPos );
aRangeStr = m_xLbRange->get_selected_text();
}
+ else
+ m_xLbRange->select(nSelectPos);
}
NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr);
if ( itr != aRangeMap.end() )