summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-04-06 12:43:16 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-04-12 14:07:23 +0000
commit95c9d125df7c1c3fe6400cf51f5b4ca9b91c8834 (patch)
tree7f0017a8ff321ec142b0b12ebdedd6ea68535e46
parenta4c6fc2c2641d2020cce626877749a22ca10be4b (diff)
(re)broadcast if value replaces cell of grouped formulas, tdf#97897 related
Replacing a grouped formula cell with a different content may lead to the remaining cells of the group not being recalculated if they listen to a range that contains the current position. For example A1: 1 A2: =SUM($A$1:$A1) => 1 A3: =SUM($A$1:$A2) => 2 Enter 2 in A2 => A3 should be 3 but is not recalculated. Loading http://bugs.documentfoundation.org/attachment.cgi?id=122714 of tdf#97897 exhibits that behavior. Change-Id: I10b91e77549a7534143be3d6e3cc03026cdaa764 (cherry picked from commit ce28d83912d14bc81c455af64893842de78a8c8d) Reviewed-on: https://gerrit.libreoffice.org/23855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/core/data/document.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 0a3141985919..138cb0790af0 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3270,6 +3270,11 @@ bool ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString&
SetNeedsListeningGroups(aGroupPos);
StartNeededListeners();
+
+ // Listeners may just have been setup that are affected by the current
+ // position thus were not notified by a ScColumn::BroadcastNewCell()
+ // during ScTable::SetString(), so do it here.
+ Broadcast( ScHint( SC_HINT_DATACHANGED, aPos));
}
else
{