summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-10-17 00:13:02 +0200
committerEike Rathke <erack@redhat.com>2015-10-17 00:19:44 +0200
commit0ac191565d541f66d4cc88ec54c8f3b5e03f0989 (patch)
tree5d86ebc3671bd11defb2519061ec42047513284f /sc
parent313df729a3b6a94275ac992e74b18256fd286f93 (diff)
ignore "current document" values at module level, tdf#92256 follow-up
Change-Id: I3540ccce9bee652f838efc86dc9abc6fc2416819
Diffstat (limited to 'sc')
-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