summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/scmod.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/app/scmod.cxx')
-rw-r--r--sc/source/ui/app/scmod.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index dcf9d51f97e7..5b5933056d77 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1039,7 +1039,19 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// ScDocShell::SetFormulaOptions() may check for changed settings, so
// set the new options here after that has been called.
- SetFormulaOptions( rOpt );
+ if (!bCalcAll || rOpt.GetWriteCalcConfig())
+ {
+ // CalcConfig is new, didn't change or is global, simply set all.
+ SetFormulaOptions( rOpt );
+ }
+ else
+ {
+ // If "only for current document" was checked, reset those affected
+ // by that setting to previous values.
+ ScFormulaOptions aNewOpt( rOpt);
+ aNewOpt.GetCalcConfig().MergeDocumentSpecific( pFormulaCfg->GetCalcConfig());
+ SetFormulaOptions( aNewOpt);
+ }
}
// ViewOptions