sc/source/core/data/documen7.cxx | 3 ++- sc/source/core/data/table5.cxx | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-)
New commits: commit de4a0f769501b0b79b05e007ae340af344017dd0 Author: Eike Rathke <er...@redhat.com> Date: Thu Aug 24 19:33:32 2017 +0200 Resolves: tdf#93171 follow-up, notify dependents of subtotal formula cells Track ScHiddenRowsChanged collected cells and broadcast with ScDataChanged. Change-Id: Id41d2731585f6749533319bf42ad655a845ecf30 (cherry picked from commit c84332184a5de3e4180514cf6e3282597ffe5dd6) Reviewed-on: https://gerrit.libreoffice.org/41530 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx index 8ab7e6014266..913b9cf0c055 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -559,7 +559,8 @@ void ScDocument::TrackFormulas( SfxHintId nHintId ) if (!pBASM) return; - if (pBASM->IsInBulkBroadcast() && !IsFinalTrackFormulas() && nHintId == SfxHintId::ScDataChanged) + if (pBASM->IsInBulkBroadcast() && !IsFinalTrackFormulas() && + (nHintId == SfxHintId::ScDataChanged || nHintId == SfxHintId::ScHiddenRowsChanged)) { SetTrackFormulasPending(); return; diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index 81ad0057e68b..d65632536262 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -40,6 +40,7 @@ #include "globalnames.hxx" #include "scmod.hxx" #include "printopt.hxx" +#include "bcaslot.hxx" #include <com/sun/star/sheet/TablePageBreakData.hpp> @@ -593,9 +594,17 @@ bool ScTable::SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden) { if (IsStreamValid()) SetStreamValid(false); - for (SCCOL i = 0; i < aCol.size(); i++) - { - aCol[i].BroadcastRows(nStartRow, nEndRow, SfxHintId::ScHiddenRowsChanged); + + { // Scoped bulk broadcast. + // Only subtotal formula cells will accept the notification of + // SfxHintId::ScHiddenRowsChanged, leaving the bulk will track + // those and broadcast SfxHintId::ScDataChanged to notify all + // dependents. + ScBulkBroadcast aBulkBroadcast( pDocument->GetBASM(), SfxHintId::ScDataChanged); + for (SCCOL i = 0; i < aCol.size(); i++) + { + aCol[i].BroadcastRows(nStartRow, nEndRow, SfxHintId::ScHiddenRowsChanged); + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits