summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-16 15:17:13 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-04-16 15:22:27 -0400
commit1d1fbbe81b4435765d3f69c6bcae2840dc629912 (patch)
treea726505e840ae426c2e81a6a6896986692f56065
parent64b040866df60d3e89dcda17b63a1fffdac5e9df (diff)
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
-rw-r--r--sc/source/ui/undo/undoblk3.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index a23cf09d1385..437a9e189594 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -142,7 +142,6 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
aCopyRange.aEnd.SetTab(nTabCount-1);
pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, bMulti, pDoc, &aMarkData );
- BroadcastChanges(aCopyRange);
DoSdrUndoAction( pDrawUndo, pDoc );
@@ -184,7 +183,10 @@ void ScUndoDeleteContents::Undo()
DoChange( true );
EndUndo();
- BroadcastChanges(aRange);
+ if (nFlags & IDF_CONTENTS)
+ // Broadcast only when the content changes. fdo#74687
+ BroadcastChanges(aRange);
+
HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
}
@@ -194,7 +196,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);
}