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/scopetools.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/scopetools.hxx')
-rw-r--r-- | sc/inc/scopetools.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sc/inc/scopetools.hxx b/sc/inc/scopetools.hxx index 7489c0874f72..db76c8651633 100644 --- a/sc/inc/scopetools.hxx +++ b/sc/inc/scopetools.hxx @@ -93,6 +93,17 @@ public: ~DelayStartListeningFormulaCells(); void set(); }; + +/// Wrapper for ScDocument::EnableDelayDeletingBroadcasters() +class DelayDeletingBroadcasters +{ + ScDocument& mDoc; + const bool mOldValue; + +public: + DelayDeletingBroadcasters(ScDocument& doc); + ~DelayDeletingBroadcasters(); +}; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |