[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Mon Oct 13 01:17:58 PDT 2014
sc/source/ui/undo/undoblk3.cxx | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
New commits:
commit eb5f25984307cd9e63e9cc88cbdb09228d66b097
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Sat Oct 11 14:18:10 2014 -0400
fdo#80846: Broadcast changes before EndUndo().
EndUndo() calls PostDataChanged(), which renders the recalculated formula
cells. Not broadcasting before EndUndo causes some dependent formula
cells to not get recalculated.
This one unfortunately is not currently unit-testable as this behavior
depends on the presence of ScTabViewShell....
Change-Id: I86288608b7f2627cda7c74be27a18029832775ef
(cherry picked from commit 424bfaa773e58d6b609ac7f64907db4b542d1315)
Reviewed-on: https://gerrit.libreoffice.org/11927
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 03edabf..6784134 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -170,12 +170,20 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
SetChangeTrack();
}
+ if (nFlags & IDF_CONTENTS)
+ {
+ // Broadcast only when the content changes. fdo#74687
+ if (mpDataSpans)
+ BroadcastChanges(*mpDataSpans);
+ else
+ BroadcastChanges(aRange);
+ }
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
/*A*/ pDocShell->PostPaint( aRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
- pDocShell->PostDataChanged();
if (pViewShell)
pViewShell->CellContentChanged();
@@ -188,15 +196,6 @@ void ScUndoDeleteContents::Undo()
DoChange( true );
EndUndo();
- if (nFlags & IDF_CONTENTS)
- {
- // Broadcast only when the content changes. fdo#74687
- if (mpDataSpans)
- BroadcastChanges(*mpDataSpans);
- else
- BroadcastChanges(aRange);
- }
-
HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange);
}
@@ -206,10 +205,6 @@ void ScUndoDeleteContents::Redo()
DoChange( false );
EndRedo();
- 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