Kaydet (Commit) d98b8882 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Forgot to add checkbox to the dialog & saving the option when checked.

Also remove a printf statement.

Change-Id: I29c89a19f0c75b21f912d12903d1fceea535a6c7
üst 3d21bda6
......@@ -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)
......
......@@ -444,15 +444,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment