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

Kohei Yoshida kohei.yoshida at collabora.com
Wed Apr 16 17:11:15 PDT 2014


 sc/source/ui/undo/undoblk3.cxx |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 8d63fce4ec73aa4ee9fd5348fe675e4f0b0a3b6b
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Apr 16 15:17:13 2014 -0400

    fdo#74687: Undo & redo of format-only changes don't need broadcasting.
    
    Also discovered that the undo path was broadcasting twice.  Let's only
    do it once.
    
    Change-Id: I169f1659aecb1eb78be3a497e244f79c5883e50f
    (cherry picked from commit 1d1fbbe81b4435765d3f69c6bcae2840dc629912)
    Reviewed-on: https://gerrit.libreoffice.org/9075
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 3239b1c..a06a076 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -141,7 +141,6 @@ void ScUndoDeleteContents::DoChange( const sal_Bool bUndo )
         aCopyRange.aEnd.SetTab(nTabCount-1);
 
         pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, bMulti, pDoc, &aMarkData );
-        BroadcastChanges(aCopyRange);
 
         DoSdrUndoAction( pDrawUndo, pDoc );
 
@@ -183,7 +182,10 @@ void ScUndoDeleteContents::Undo()
     DoChange( sal_True );
     EndUndo();
 
-    BroadcastChanges(aRange);
+    if (nFlags & IDF_CONTENTS)
+        // Broadcast only when the content changes. fdo#74687
+        BroadcastChanges(aRange);
+
     HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
 }
 
@@ -193,7 +195,10 @@ void ScUndoDeleteContents::Redo()
     DoChange( false );
     EndRedo();
 
-    BroadcastChanges(aRange);
+    if (nFlags & IDF_CONTENTS)
+        // Broadcast only when the content changes. fdo#74687
+        BroadcastChanges(aRange);
+
     HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
 }
 


More information about the Libreoffice-commits mailing list