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

Eike Rathke erack at redhat.com
Thu Sep 17 00:17:14 PDT 2015


 sc/source/core/data/document.cxx |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

New commits:
commit 50d4e7c928c372a14a5396971bc4c4ac1f437b51
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Sep 14 17:27:41 2015 +0200

    Resolves: tdf#93895 broadcast cell changes when multi-selection was pasted
    
    It is not sufficient to collect the cells, one has to broadcast on the
    collection.
    
    Change-Id: I11f889936aff43f958c56789e539809289819752
    (cherry picked from commit 97ad6393525a928b5dfe2a6562d7604446da7af0)
    Reviewed-on: https://gerrit.libreoffice.org/18573
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 153b77f..bb6431a 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2961,10 +2961,18 @@ void ScDocument::CopyMultiRangeFromClip(
     // Create Listener after everything has been inserted
     StartListeningFromClip(aDestRange.aStart.Col(), aDestRange.aStart.Row(),
                            aDestRange.aEnd.Col(), aDestRange.aEnd.Row(), rMark, nInsFlag );
-    // Re-broadcast after all Listener have been created
-    SetDirtyFromClip(
-        aDestRange.aStart.Col(), aDestRange.aStart.Row(), aDestRange.aEnd.Col(), aDestRange.aEnd.Row(),
-        rMark, nInsFlag, aBroadcastSpans);
+
+    {
+        ScBulkBroadcast aBulkBroadcast( GetBASM());
+
+        // Set formula cells dirty and collect non-formula cells.
+        SetDirtyFromClip(
+                aDestRange.aStart.Col(), aDestRange.aStart.Row(), aDestRange.aEnd.Col(), aDestRange.aEnd.Row(),
+                rMark, nInsFlag, aBroadcastSpans);
+
+        BroadcastAction aAction(*this);
+        aBroadcastSpans.executeColumnAction(*this, aAction);
+    }
 
     if (bResetCut)
         pClipDoc->GetClipParam().mbCutMode = false;


More information about the Libreoffice-commits mailing list