summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-07-28 21:34:40 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-07-28 22:08:22 -0400
commit300845922eec7a28bc1da337acd21f138685d759 (patch)
tree3a9c210ac2e4ec2b6d98da0ebbad645c25a5a363 /sc/source/ui/undo
parenta0b9200eed928ac81d798bd59aed69ed6d470bac (diff)
fdo#79578: Properly update formulas upon change in db collection.
Update it to handle formula groups correctly. Change-Id: I009a7fcf3d3fb17ef6951c50534ca6bc1fffc259
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r--sc/source/ui/undo/undocell.cxx2
-rw-r--r--sc/source/ui/undo/undodat.cxx8
-rw-r--r--sc/source/ui/undo/undorangename.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 5ece768fa2e0..bc37706095e5 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -1008,7 +1008,7 @@ void ScUndoRangeNames::DoChange( bool bUndo )
rDoc.SetRangeName( new ScRangeName( *pNewRanges ) );
}
- rDoc.PostprocessRangeNameUpdate();
+ rDoc.CompileHybridFormula();
SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
}
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 4f4d1656ba5b..ac1b8fd38e19 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1013,9 +1013,9 @@ void ScUndoDBData::Undo()
bool bOldAutoCalc = rDoc.GetAutoCalc();
rDoc.SetAutoCalc( false ); // Avoid unnecessary calculations
- rDoc.CompileDBFormula( true ); // CreateFormulaString
+ rDoc.PreprocessDBDataUpdate();
rDoc.SetDBCollection( new ScDBCollection(*pUndoColl), true );
- rDoc.CompileDBFormula( false ); // CompileFormulaString
+ rDoc.CompileHybridFormula();
rDoc.SetAutoCalc( bOldAutoCalc );
SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -1031,9 +1031,9 @@ void ScUndoDBData::Redo()
bool bOldAutoCalc = rDoc.GetAutoCalc();
rDoc.SetAutoCalc( false ); // Avoid unnecessary calculations
- rDoc.CompileDBFormula( true ); // CreateFormulaString
+ rDoc.PreprocessDBDataUpdate();
rDoc.SetDBCollection( new ScDBCollection(*pRedoColl), true );
- rDoc.CompileDBFormula( false ); // CompileFormulaString
+ rDoc.CompileHybridFormula();
rDoc.SetAutoCalc( bOldAutoCalc );
SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx
index 8eafa6bf8dde..790661fcd42f 100644
--- a/sc/source/ui/undo/undorangename.cxx
+++ b/sc/source/ui/undo/undorangename.cxx
@@ -78,7 +78,7 @@ void ScUndoAllRangeNames::DoChange(const boost::ptr_map<OUString, ScRangeName>&
rDoc.PreprocessRangeNameUpdate();
rDoc.SetAllRangeNames(rNames);
- rDoc.PostprocessRangeNameUpdate();
+ rDoc.CompileHybridFormula();
SfxGetpApp()->Broadcast(SfxSimpleHint(SC_HINT_AREAS_CHANGED));
}