diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-03-05 22:11:30 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-03-06 08:19:51 +0100 |
commit | 648a4b30b33569052847b797c38e52ba2fd2d500 (patch) | |
tree | 2ce30db4b37d739479f4a247408ab763e570cd1c /sc/inc/column.hxx | |
parent | 7ac19fbce8a35f559eebb879cd0f232bfc95e703 (diff) |
do not destroy broadcasters and then recreate again (tdf#134268)
Sorting ends tells all listeners on all the sorted cells to end
listening to stop updates, then sorts the cells and starts
listening again. This will cause all broadcasters for the sorted
cells to temporarily stop having any listeners, so they'll be
deleted and removed from the mdds vector (which may additionally
cause moving large parts of the mdds vector repeatedly). And
since all listeners will want to listen again after the sort,
this will all need to be reconstructed. To avoid this,
temporarily block this removal and then later just checks
and remove any possibly left-over broadcasters that ended up
with no listeners.
Change-Id: Ie2d41d9acd7b657cf31a445870ce7f18d28d5ebb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131069
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/inc/column.hxx')
-rw-r--r-- | sc/inc/column.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 1ec4aac4204b..1b1ae1e6ab93 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -178,7 +178,8 @@ class ScColumn : protected ScColumnData SCCOL nCol; SCTAB nTab; - bool mbFiltering; // it is true if there is a filtering in the column + bool mbFiltering : 1; // it is true if there is a filtering in the column + bool mbEmptyBroadcastersPending : 1; // a broadcaster not removed during EnableDelayDeletingBroadcasters() friend class ScDocument; // for FillInfo friend class ScTable; @@ -633,6 +634,7 @@ public: void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2 ); void PrepareBroadcastersForDestruction(); + void DeleteEmptyBroadcasters(); void Broadcast( SCROW nRow ); void BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint ); |