summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-08-15 00:47:03 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-08-17 10:50:32 +0000
commit31050925ad6788c627af23f751bdbf5768cc7afa (patch)
tree06305159d7bd823cbf8c3c3a882a1cf709f4f5ad
parent7cbcde5e8727b84b4d3ca9f80020082644d9638a (diff)
Resolves: tdf#93358 resync attribute pattern that may have changed
Change-Id: If3ce8feec940c7212fe467f39db868630522b17e (cherry picked from commit f089de7dc5c367a3123129b08a9050b3bacc4eba) Reviewed-on: https://gerrit.libreoffice.org/17765 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/core/data/column2.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 566c13997e88..bb6a37da927b 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -824,7 +824,18 @@ void ScColumn::GetOptimalHeight(
}
if (bStdOnly)
- if (HasEditCells(nStart,nEnd,nEditPos)) // includes mixed script types
+ {
+ bool bHasEditCells = HasEditCells(nStart,nEnd,nEditPos);
+ // Call to HasEditCells() may change pattern due to
+ // calculation, => sync always.
+ // We don't know which row changed first, but as pPattern
+ // covered nStart to nEnd we can pick nStart. Worst case we
+ // have to repeat that for every row in range if every row
+ // changed.
+ pPattern = aIter.Resync( nStart, nStart, nEnd);
+ if (bHasEditCells && nEnd < nEditPos)
+ bHasEditCells = false; // run into that again
+ if (bHasEditCells) // includes mixed script types
{
if (nEditPos == nStart)
{
@@ -840,6 +851,7 @@ void ScColumn::GetOptimalHeight(
nEnd = nEditPos - 1; // standard - part
}
}
+ }
sc::SingleColumnSpanSet aSpanSet;
aSpanSet.scan(*this, nStart, nEnd);