[Libreoffice-commits] core.git: 3 commits - formula/source sc/source
Eike Rathke
erack at redhat.com
Thu Aug 21 19:33:09 PDT 2014
formula/source/ui/dlg/formula.cxx | 2 +-
sc/source/filter/oox/workbookhelper.cxx | 4 ++--
sc/source/ui/docshell/docsh.cxx | 4 ++--
sc/source/ui/docshell/docsh6.cxx | 14 ++++++++++----
4 files changed, 15 insertions(+), 9 deletions(-)
New commits:
commit 10b6bda51c9da5429ca562c70ce75ee03e5f4e56
Author: Eike Rathke <erack at redhat.com>
Date: Fri Aug 22 04:29:06 2014 +0200
init formula options once, fdo#82183
Change-Id: I1db4816f4693e35024c6dc6c70585d7b72e68c32
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index a752fef..c4b25ac 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -459,9 +459,15 @@ void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoadi
/* TODO: bForLoading is a workaround, rather get rid of setting any
* globals from per document instances like ScDocShell. */
- if (!bForLoading)
+ /* XXX this is utter crap, we rely on the options being set here at least
+ * once, for the very first document, empty or loaded. */
+ static bool bInitOnce = true;
+
+ if (!bForLoading || bInitOnce)
{
- if (rOpt.GetUseEnglishFuncName() != SC_MOD()->GetFormulaOptions().GetUseEnglishFuncName())
+ bool bForceInit = bInitOnce;
+ bInitOnce = false;
+ if (bForceInit || rOpt.GetUseEnglishFuncName() != SC_MOD()->GetFormulaOptions().GetUseEnglishFuncName())
{
// This needs to be called first since it may re-initialize the entire
// opcode map.
commit 9344af955b68143b362a586a50543c5f05467c63
Author: Eike Rathke <erack at redhat.com>
Date: Fri Aug 22 02:59:38 2014 +0200
nitpick on comment form
Change-Id: I023f79187aaf6eb943a50516dace2aa229c5a87b
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index bfe360e..3b9665a 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -675,8 +675,8 @@ void WorkbookGlobals::recalcFormulaCells()
officecfg::Office::Calc::Formula::Load::OOXMLRecalcMode::set(sal_Int32(0), batch);
ScFormulaOptions aOpt = SC_MOD()->GetFormulaOptions();
aOpt.SetOOXMLRecalcOptions(bHardRecalc ? RECALC_ALWAYS : RECALC_NEVER);
- /** XXX is this really supposed to set the ScModule options?
- Not the ScDocShell options? */
+ /* XXX is this really supposed to set the ScModule options?
+ * Not the ScDocShell options? */
SC_MOD()->SetFormulaOptions(aOpt);
batch->commit();
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index bc1d284..29f6e5a 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -484,8 +484,8 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R
officecfg::Office::Calc::Formula::Load::ODFRecalcMode::set(sal_Int32(0), batch);
ScFormulaOptions aOpt = SC_MOD()->GetFormulaOptions();
aOpt.SetODFRecalcOptions(bHardRecalc ? RECALC_ALWAYS : RECALC_NEVER);
- /** XXX is this really supposed to set the ScModule options?
- Not the ScDocShell options? */
+ /* XXX is this really supposed to set the ScModule options?
+ * Not the ScDocShell options? */
SC_MOD()->SetFormulaOptions(aOpt);
batch->commit();
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 78228eb..a752fef 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -456,8 +456,8 @@ void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoadi
// Wizard when loading the second document.
// Do the stupid stuff only when we're not called while loading a document.
- /** TODO: bForLoading is a workaround, rather get rid of setting any
- globals from per document instances like ScDocShell. */
+ /* TODO: bForLoading is a workaround, rather get rid of setting any
+ * globals from per document instances like ScDocShell. */
if (!bForLoading)
{
commit 0be29a469c565ec134cdc0b7cb5594cc65206ccc
Author: Eike Rathke <erack at redhat.com>
Date: Fri Aug 22 02:52:13 2014 +0200
reactivate the verify
Missed this earlier. Should be a SAL_WARN, but postponed.
Change-Id: Ia6b178702461c8a0fa5ded3e1c47795b95da7d98
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 5a2710c..3377565 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -1831,7 +1831,7 @@ void FormulaDlg::StoreFormEditData(FormEditData* pData)
const IFunctionDescription* FormulaDlg::getCurrentFunctionDescription() const
{
- //OSL_VERIFY(!m_pImpl->pFuncDesc || m_pImpl->pFuncDesc->getSuppressedArgumentCount() == m_pImpl->nArgs);
+ OSL_VERIFY(!m_pImpl->pFuncDesc || m_pImpl->pFuncDesc->getSuppressedArgumentCount() == m_pImpl->nArgs);
return m_pImpl->pFuncDesc;
}
More information about the Libreoffice-commits
mailing list