diff options
author | Eike Rathke <erack@redhat.com> | 2015-08-15 00:47:03 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-09-28 10:06:47 +0200 |
commit | cf7e32372f6231f65ac332cb2bb7acb2fffc8260 (patch) | |
tree | 5a1e2f88eb2b478af49a6f850be6b1891bef4c9f | |
parent | 838d9110d66e2c68a44b94390dc97d92019820b5 (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/17766
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 8006e35e934bd2c24c377d39f72f810e5c69ed59)
-rw-r--r-- | sc/source/core/data/column2.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 06ee75a02797..7dae3d92f732 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -825,7 +825,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) { @@ -841,6 +852,7 @@ void ScColumn::GetOptimalHeight( nEnd = nEditPos - 1; // standard - part } } + } sc::SingleColumnSpanSet aSpanSet; aSpanSet.scan(*this, nStart, nEnd); |