diff options
author | Eike Rathke <erack@redhat.com> | 2015-08-15 00:47:03 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-17 12:33:39 +0000 |
commit | fe1792bd24b45f6b2e5dc21cbf2a8744f8c42f17 (patch) | |
tree | 2f819e54219e4bfc110829a79c55423a5fb9a176 /sc | |
parent | cbf080ab3ff57da62820c9a0ac42974dae91b3a3 (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>
Diffstat (limited to 'sc')
-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 6f764c7d57fb..93f61a6f2b75 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -823,7 +823,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) { @@ -839,6 +850,7 @@ void ScColumn::GetOptimalHeight( nEnd = nEditPos - 1; // standard - part } } + } sc::SingleColumnSpanSet aSpanSet; aSpanSet.scan(*this, nStart, nEnd); |