Kaydet (Commit) c8433218 authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: tdf#93171 follow-up, notify dependents of subtotal formula cells

Track ScHiddenRowsChanged collected cells and broadcast with ScDataChanged.

Change-Id: Id41d2731585f6749533319bf42ad655a845ecf30
üst 39c08074
...@@ -559,7 +559,8 @@ void ScDocument::TrackFormulas( SfxHintId nHintId ) ...@@ -559,7 +559,8 @@ void ScDocument::TrackFormulas( SfxHintId nHintId )
if (!pBASM) if (!pBASM)
return; return;
if (pBASM->IsInBulkBroadcast() && !IsFinalTrackFormulas() && nHintId == SfxHintId::ScDataChanged) if (pBASM->IsInBulkBroadcast() && !IsFinalTrackFormulas() &&
(nHintId == SfxHintId::ScDataChanged || nHintId == SfxHintId::ScHiddenRowsChanged))
{ {
SetTrackFormulasPending(); SetTrackFormulasPending();
return; return;
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "globalnames.hxx" #include "globalnames.hxx"
#include "scmod.hxx" #include "scmod.hxx"
#include "printopt.hxx" #include "printopt.hxx"
#include "bcaslot.hxx"
#include <com/sun/star/sheet/TablePageBreakData.hpp> #include <com/sun/star/sheet/TablePageBreakData.hpp>
...@@ -593,9 +594,17 @@ bool ScTable::SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden) ...@@ -593,9 +594,17 @@ bool ScTable::SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden)
{ {
if (IsStreamValid()) if (IsStreamValid())
SetStreamValid(false); SetStreamValid(false);
for (SCCOL i = 0; i < aCol.size(); i++)
{ { // Scoped bulk broadcast.
aCol[i].BroadcastRows(nStartRow, nEndRow, SfxHintId::ScHiddenRowsChanged); // 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);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment