sc/source/core/data/bcaslot.cxx | 12 +++++++----- sc/source/core/inc/bcaslot.hxx | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-)
New commits: commit b325f332409ec72d8c5906c64d635e9f083ebfdd Author: Eike Rathke <er...@redhat.com> Date: Tue Sep 27 21:55:45 2016 +0200 sc-perf: remove one more unnecessary call to TrackFormulas() ... when leaving bulk broadcast. Change-Id: I3d456094ecc7759ed3e58af7901d544126c30b27 diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index 2051f2c..3689062 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 a7d020b..9ff6b97 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 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits