summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-12-20 14:50:36 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-12-20 14:51:38 -0500
commit3cbf1ced422d56e8a89e36cada8f1988b0e8d453 (patch)
tree4eaf07679e68643b8a7439af3b5025f60414c615
parent2d9a6c9e5b0e2515cc08fd6f2c0701bd15bef25c (diff)
Forgot to add checkbox to the dialog & saving the option when checked.
Also remove a printf statement. Change-Id: I29c89a19f0c75b21f912d12903d1fceea535a6c7
-rw-r--r--sc/source/filter/oox/workbookfragment.cxx4
-rw-r--r--sc/source/ui/docshell/docsh.cxx15
2 files changed, 15 insertions, 4 deletions
diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index ba74b967e92f..ba0c2fdd86b4 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -335,20 +335,20 @@ void WorkbookFragment::finalizeImport()
ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_XLS));
aBox.SetCheckBoxText(ScGlobal::GetRscString(STR_ALWAYS_PERFORM_SELECTED));
- boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() );
sal_Int32 nRet = aBox.Execute();
bHardRecalc = nRet == RET_YES;
if (aBox.GetCheckBoxState())
{
// Always perform selected action in the future.
+ boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() );
officecfg::Office::Calc::Formula::Load::OOXMLRecalcMode::set(sal_Int32(0), batch);
ScFormulaOptions aOpt = SC_MOD()->GetFormulaOptions();
aOpt.SetOOXMLRecalcOptions(bHardRecalc ? RECALC_ALWAYS : RECALC_NEVER);
SC_MOD()->SetFormulaOptions(aOpt);
+ batch->commit();
}
- batch->commit();
}
}
else if (nRecalcMode == RECALC_ALWAYS)
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 0a5b488cadd5..291f5e0540da 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -442,15 +442,26 @@ sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::un
QueryBox aBox(
GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES),
ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_ODS));
+ aBox.SetCheckBoxText(ScGlobal::GetRscString(STR_ALWAYS_PERFORM_SELECTED));
bHardRecalc = aBox.Execute() == RET_YES;
+
+ if (aBox.GetCheckBoxState())
+ {
+ // Always perform selected action in the future.
+ boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() );
+ officecfg::Office::Calc::Formula::Load::ODFRecalcMode::set(sal_Int32(0), batch);
+ ScFormulaOptions aOpt = SC_MOD()->GetFormulaOptions();
+ aOpt.SetODFRecalcOptions(bHardRecalc ? RECALC_ALWAYS : RECALC_NEVER);
+ SC_MOD()->SetFormulaOptions(aOpt);
+
+ batch->commit();
+ }
}
}
else if (nRecalcMode == RECALC_ALWAYS)
bHardRecalc = true;
- fprintf(stdout, "ScDocShell::LoadXML: hard recalc = %d\n", bHardRecalc);
-
if (bHardRecalc)
DoHardRecalc(false);
else