summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-09-27 21:55:45 +0200
committerEike Rathke <erack@redhat.com>2016-09-28 00:09:19 +0200
commitb325f332409ec72d8c5906c64d635e9f083ebfdd (patch)
tree0d8a91c1bbe0e7171c375d57d99dbc2a23f5f092 /sc/source/core
parent049d2ffd329f88934a92b72e4ec650ea46bf8c61 (diff)
sc-perf: remove one more unnecessary call to TrackFormulas()
... when leaving bulk broadcast. Change-Id: I3d456094ecc7759ed3e58af7901d544126c30b27
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/bcaslot.cxx12
-rw-r--r--sc/source/core/inc/bcaslot.hxx2
2 files changed, 8 insertions, 6 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 2051f2cf4ee3..368906232740 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -1098,10 +1098,12 @@ void ScBroadcastAreaSlotMachine::LeaveBulkBroadcast()
if (--nInBulkBroadcast == 0)
{
ScBroadcastAreasBulk().swap( aBulkBroadcastAreas);
- BulkBroadcastGroupAreas();
+ bool bBroadcasted = BulkBroadcastGroupAreas();
// Trigger the "final" tracking.
if (pDoc->IsTrackFormulasPending())
pDoc->FinalTrackFormulas();
+ else if (bBroadcasted)
+ pDoc->TrackFormulas();
}
}
}
@@ -1125,10 +1127,10 @@ void ScBroadcastAreaSlotMachine::InsertBulkGroupArea( ScBroadcastArea* pArea, co
pSet->set(rRange, true);
}
-void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
+bool ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
{
if (m_BulkGroupAreas.empty())
- return;
+ return false;
sc::BulkDataHint aHint(*pDoc);
@@ -1156,8 +1158,8 @@ void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
}
m_BulkGroupAreas.clear();
- if (bBroadcasted)
- pDoc->TrackFormulas();
+
+ return bBroadcasted;
}
size_t ScBroadcastAreaSlotMachine::RemoveBulkArea( const ScBroadcastArea* pArea )
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index a7d020b3ff3c..9ff6b9720a9c 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -323,7 +323,7 @@ public:
void InsertBulkGroupArea( ScBroadcastArea* pArea, const ScRange& rRange );
void RemoveBulkGroupArea( ScBroadcastArea* pArea );
- void BulkBroadcastGroupAreas();
+ bool BulkBroadcastGroupAreas();
/// @return: how many removed
size_t RemoveBulkArea( const ScBroadcastArea* p );