[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sc/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jan 21 19:57:29 UTC 2020
sc/source/core/data/column.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 92051303dce5efbc29b2afe426f9e076cee01736
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Tue Dec 17 23:51:54 2019 +0100
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Tue Jan 21 20:57:00 2020 +0100
Resolves: tdf#129396 Refresh shared formula group area listeners upon shifting
Regression from
commit 47230a036fe35b9a7a7c0609232849fcbb51efcc
CommitDate: Thu Feb 5 11:52:51 2015 +0100
Resolves: tdf#88792 do not hold a ScFormulaCell** in group area listener
where previously the listener position's column was taken from the
group's remembered top formula cell (then updated) position, which
holding the cell was wrong in other cases.
Change-Id: Ida1503daa7cbda2b41459ff5d63652a6febd91e0
Reviewed-on: https://gerrit.libreoffice.org/85347
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 491e8f60bf7f216a3bb3092b22334924b6c9aee1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85353
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 18132d2fc454..a8894521ca34 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2156,6 +2156,7 @@ class UpdateRefOnNonCopy
// Run this before the position gets updated.
sc::RefUpdateResult aRes = pCode->AdjustReferenceOnShift(*mpCxt, aOldPos);
+ bool bGroupShifted = false;
if (pTop->UpdatePosOnShift(*mpCxt))
{
ScAddress aErrorPos( ScAddress::UNINITIALIZED );
@@ -2171,6 +2172,15 @@ class UpdateRefOnNonCopy
if (pCode->IsRecalcModeOnRefMove())
aRes.mbValueChanged = true;
+
+ // FormulaGroupAreaListener (contrary to ScBroadcastArea) is not
+ // updated but needs to be re-setup, else at least its mpColumn
+ // would indicate the old column to collect cells from. tdf#129396
+ /* TODO: investigate if that could be short-cut to avoid all the
+ * EndListeningTo() / StartListeningTo() overhead and is really
+ * only necessary when shifting the column, not also when shifting
+ * rows. */
+ bGroupShifted = true;
}
else if (aRes.mbReferenceModified && pCode->IsRecalcModeOnRefMove())
{
@@ -2182,7 +2192,7 @@ class UpdateRefOnNonCopy
if (aRes.mbNameModified)
recompileTokenArray(*pTop);
- if (aRes.mbReferenceModified || aRes.mbNameModified)
+ if (aRes.mbReferenceModified || aRes.mbNameModified || bGroupShifted)
{
sc::EndListeningContext aEndCxt(mpCxt->mrDoc, pOldCode.get());
aEndCxt.setPositionDelta(
More information about the Libreoffice-commits
mailing list