summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-03-07 10:46:12 +0100
committerEike Rathke <erack@redhat.com>2017-03-07 10:51:50 +0100
commit73dec49802ef8fc42c5719efaa42a33cde68e569 (patch)
tree183c172cab6fc8bda2f7b7e1bee0b85e93d8241b
parent4c8059a3e140171399ac85ceb882d23bb458599d (diff)
a size is a size
Change-Id: I98b54ac353bc0c078f31b447aec2eff7e80b4308
-rw-r--r--sc/source/ui/view/viewdata.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index e875f10207a7..93c9a4ad5643 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1554,9 +1554,9 @@ void ScViewData::CreateSelectedTabData()
void ScViewData::EnsureTabDataSize(size_t nSize)
{
- if (nSize >= maTabData.size())
+ if (nSize > maTabData.size())
{
- size_t n = nSize - maTabData.size() + 1;
+ size_t n = nSize - maTabData.size();
maTabData.insert(maTabData.end(), n, nullptr);
}
}
@@ -2843,7 +2843,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
sal_Int16 nTemp16(0);
bool bPageMode(false);
- EnsureTabDataSize(GetDocument()->GetTableCount()-1);
+ EnsureTabDataSize(GetDocument()->GetTableCount());
for (sal_Int32 i = 0; i < nCount; i++)
{