summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table2.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-12 21:53:34 -0400
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-03-13 10:44:00 -0500
commit3da21555accb654a3185bdac5532304ac6ce5b34 (patch)
tree108c800066b4709efd46cda9f32ae24262d40b09 /sc/source/core/data/table2.cxx
parent6293d898c16bafeb703129ed0d33857934ab1dfb (diff)
fdo#75977: Clear sheet deleted flags for affected references when undoing.
This will allow formula cells to restore deleted references when they get recalculated. With this change, SetDirty() that previosly took no argument has been renamed to SetAllFormulasDirty(), and it now takes one argument that stores context information. (cherry picked from commit 18909ddb30db7ca9416ee2bfb0503753e877f002) Conflicts: sc/inc/document.hxx sc/source/ui/docshell/docsh5.cxx sc/source/ui/view/spelldialog.cxx Change-Id: If0de5dc1737a2722b6d61a87644b10a4f921edc5 Reviewed-on: https://gerrit.libreoffice.org/8564 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/core/data/table2.cxx')
-rw-r--r--sc/source/core/data/table2.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 7d49a0026d14..076087fda883 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1651,13 +1651,12 @@ void ScTable::SetDirtyVar()
}
-void ScTable::SetDirty()
+void ScTable::SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt )
{
- bool bOldAutoCalc = pDocument->GetAutoCalc();
- pDocument->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
+ sc::AutoCalcSwitch aACSwitch(*pDocument, false);
+
for (SCCOL i=0; i<=MAXCOL; i++)
- aCol[i].SetDirty();
- pDocument->SetAutoCalc( bOldAutoCalc );
+ aCol[i].SetAllFormulasDirty(rCxt);
}