diff options
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 4 | ||||
-rw-r--r-- | sc/inc/calcconfig.hxx | 8 | ||||
-rw-r--r-- | sc/inc/formulaopt.hxx | 8 | ||||
-rw-r--r-- | sc/source/core/tool/formulaopt.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/oox/workbookfragment.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpformula.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/src/optdlg.src | 8 |
7 files changed, 28 insertions, 26 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 2dd5d7cb7021..cc61d8371941 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1524,12 +1524,12 @@ </enumeration> <enumeration oor:value="1"> <info> - <desc>Ask before Recalc</desc> + <desc>Recalc never</desc> </info> </enumeration> <enumeration oor:value="2"> <info> - <desc>Recalc never</desc> + <desc>Ask before Recalc</desc> </info> </enumeration> </constraints> diff --git a/sc/inc/calcconfig.hxx b/sc/inc/calcconfig.hxx index 2006ba2314ee..7a9c73c7c0a6 100644 --- a/sc/inc/calcconfig.hxx +++ b/sc/inc/calcconfig.hxx @@ -32,6 +32,14 @@ #include "scdllapi.h" #include "formula/grammar.hxx" +// have to match the registry values +enum ScRecalcOptions +{ + RECALC_ALWAYS = 0, + RECALC_NEVER, + RECALC_ASK, +}; + /** * Configuration options for formula interpreter. */ diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx index bf12fce9e880..fe585fe43cc0 100644 --- a/sc/inc/formulaopt.hxx +++ b/sc/inc/formulaopt.hxx @@ -37,14 +37,6 @@ #include "global.hxx" #include "calcconfig.hxx" -// have to match the registry values -enum ScRecalcOptions -{ - RECALC_ALWAYS = 0, - RECALC_ASK = 1, - RECALC_NEVER = 2 -}; - class SC_DLLPUBLIC ScFormulaOptions { private: diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index fe546217d52e..a14463b78329 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -367,10 +367,10 @@ ScFormulaCfg::ScFormulaCfg() : eOpt = RECALC_ALWAYS; break; case 1: - eOpt = RECALC_ASK; + eOpt = RECALC_NEVER; break; case 2: - eOpt = RECALC_NEVER; + eOpt = RECALC_ASK; break; default: SAL_WARN("sc", "unknown ooxml recalc option!"); @@ -446,16 +446,16 @@ void ScFormulaCfg::Commit() break; case SCFORMULAOPT_OOXML_RECALC: { - sal_Int32 nVal = 1; + sal_Int32 nVal = 2; switch (GetOOXMLRecalcOptions()) { case RECALC_ALWAYS: nVal = 0; break; - case RECALC_ASK: + case RECALC_NEVER: nVal = 1; break; - case RECALC_NEVER: + case RECALC_ASK: nVal = 2; break; } diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index 4f71e5720e2a..ba74b967e92f 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -47,6 +47,7 @@ #include "document.hxx" #include "docsh.hxx" #include "globstr.hrc" +#include "calcconfig.hxx" #include <comphelper/processfactory.hxx> #include <officecfg/Office/Calc.hxx> @@ -321,9 +322,10 @@ void WorkbookFragment::finalizeImport() ScDocument& rDoc = getScDocument(); ScDocShell* pDocSh = static_cast<ScDocShell*>(rDoc.GetDocumentShell()); Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); - sal_Int32 nRecalcMode = officecfg::Office::Calc::Formula::Load::OOXMLRecalcMode::get(xContext); + ScRecalcOptions nRecalcMode = + static_cast<ScRecalcOptions>(officecfg::Office::Calc::Formula::Load::OOXMLRecalcMode::get(xContext)); bool bHardRecalc = false; - if (nRecalcMode == 1) + if (nRecalcMode == RECALC_ASK) { if (rDoc.IsUserInteractionEnabled()) { @@ -349,7 +351,7 @@ void WorkbookFragment::finalizeImport() batch->commit(); } } - else if (nRecalcMode == 0) + else if (nRecalcMode == RECALC_ALWAYS) bHardRecalc = true; if (bHardRecalc) diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index 4a9608ca72ce..ba34d6fc8677 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -286,10 +286,10 @@ sal_Bool ScTpFormulaOptions::FillItemSet(SfxItemSet& rCoreSet) eOOXMLRecalc = RECALC_ALWAYS; break; case 1: - eOOXMLRecalc = RECALC_ASK; + eOOXMLRecalc = RECALC_NEVER; break; case 2: - eOOXMLRecalc = RECALC_NEVER; + eOOXMLRecalc = RECALC_ASK; break; }; @@ -342,10 +342,10 @@ void ScTpFormulaOptions::Reset(const SfxItemSet& rCoreSet) case RECALC_ALWAYS: maLbOOXMLRecalcOptions.SelectEntryPos(0); break; - case RECALC_ASK: + case RECALC_NEVER: maLbOOXMLRecalcOptions.SelectEntryPos(1); break; - case RECALC_NEVER: + case RECALC_ASK: maLbOOXMLRecalcOptions.SelectEntryPos(2); break; } diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src index 43cb5951862f..e1c5a28aedb8 100644 --- a/sc/source/ui/src/optdlg.src +++ b/sc/source/ui/src/optdlg.src @@ -294,14 +294,14 @@ TabPage RID_SCPAGE_FORMULA ListBox LB_OOXML_RECALC { Pos = MAP_APPFONT( 21, 147 ); - Size = MAP_APPFONT( 100, 50 ); + Size = MAP_APPFONT( 80, 50 ); Border = TRUE; DropDown = TRUE; StringList [ en-US ] = { - "Recalculate always"; - "Ask before recalculation"; - "Recalculate never"; + "Always recalculate"; + "Never recalculate"; + "Prompt user"; }; }; }; |