summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-06-28 18:51:16 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-07-02 05:08:27 +0200
commitaaa0d9af02ad7484377f946d528cdbfc51483c9d (patch)
treed74c3931d27b6bd8efd61a375199d37610d8b388
parentd892a9c4ec62da75075e812380f3d7807b720cd0 (diff)
Resolves: tdf#108796 let ScViewData::InsertTabs() insert the correct amount
... at the correct position. This only ever worked by chance, if at all, and now surfaced after commit 73dec49802ef8fc42c5719efaa42a33cde68e569 Date: Tue Mar 7 10:46:12 2017 +0100 Change-Id: I9bd0aeb5a471bd644c1497306effe9045c1daa97 (cherry picked from commit c9591f3b6153614c9849b8afbdcacbecc99c1f7c) Reviewed-on: https://gerrit.libreoffice.org/39373 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/ui/view/viewdata.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 789e84c17e46..e0fe575a7d27 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -527,7 +527,7 @@ void ScViewData::InsertTab( SCTAB nTab )
void ScViewData::InsertTabs( SCTAB nTab, SCTAB nNewSheets )
{
- if( nTab+nNewSheets >= static_cast<SCTAB>(maTabData.size()))
+ if (nTab >= static_cast<SCTAB>(maTabData.size()))
maTabData.resize(nTab+nNewSheets, nullptr);
else
{