[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/source

Eike Rathke erack at redhat.com
Thu Aug 13 03:06:46 PDT 2015


 sc/source/core/data/bcaslot.cxx |   20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

New commits:
commit 860093671accbdfb6fb6de9017ad0b6a7a57703a
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Aug 12 20:15:08 2015 +0200

    Resolves: tdf#93388 broadcasting to removed listeners isn't a good idea
    
    This cures only a symptom, the underlying cause is that the broadcasters
    still are listed in maBulkGroupAreas.
    
    Change-Id: I9625483016a51eb6f6a7e3d58ed42c7dad3a57b3
    (cherry picked from commit 2d4edd7de2e67db5bd17e7a89e2496611ebcc165)
    Reviewed-on: https://gerrit.libreoffice.org/17685
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 12aeee7..83e5e48 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -1229,12 +1229,22 @@ void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
     for (; it != itEnd; ++it)
     {
         ScBroadcastArea* pArea = it->first;
-        const sc::ColumnSpanSet* pSpans = it->second;
         assert(pArea);
-        assert(pSpans);
-        aHint.setSpans(pSpans);
-        pArea->GetBroadcaster().Broadcast(aHint);
-        bBroadcasted = true;
+        SvtBroadcaster& rBC = pArea->GetBroadcaster();
+        if (!rBC.HasListeners())
+        {
+            /* FIXME: find the cause where the last listener is removed and
+             * this area is still listed here. */
+            SAL_WARN("sc.core","ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas - pArea has no listeners and should had been removed already");
+        }
+        else
+        {
+            const sc::ColumnSpanSet* pSpans = it->second;
+            assert(pSpans);
+            aHint.setSpans(pSpans);
+            rBC.Broadcast(aHint);
+            bBroadcasted = true;
+        }
     }
 
     maBulkGroupAreas.clear();


More information about the Libreoffice-commits mailing list