summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-09-08 01:43:08 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-09-12 14:18:52 +0200
commitfd8340fbad33c0af045e7034c3c4ddf5c9af1dc5 (patch)
tree8487e5373ba1f29452fd4688470069466c32a25b /sc
parent3107b237629cef53619daba32aa110eb229b56cf (diff)
Use < instead of <= by not decreasing the number of entries
Change-Id: Ibbc706d1af58e1ecf314edf9c4546a779f510067
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 5f25f2ec121c..a6f2f24620fe 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -162,8 +162,8 @@ void ScMoveTableDlg::CheckNewTabName()
bool bMoveInCurrentDoc = (pBtnMove->IsChecked() && IsCurrentDocSelected());
bool bFound = false;
- const sal_Int32 nLast = pLbTable->GetEntryCount() - 1;
- for ( sal_uInt16 i=0; i<=nLast && !bFound; ++i )
+ const sal_Int32 nLast = pLbTable->GetEntryCount();
+ for ( sal_uInt16 i=0; i<nLast && !bFound; ++i )
{
if ( aNewName.equals(pLbTable->GetEntry(i)) )
{