diff options
author | Eike Rathke <erack@redhat.com> | 2016-06-27 13:02:20 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-06-27 11:50:29 +0000 |
commit | 087b0b88dbbfa297d2f3d47e4e7ea7e02dfff4f0 (patch) | |
tree | fbdd7c13c01e3c30b659aca40da7f52c800758a8 | |
parent | aaeeb0288dfeeeed9beb33efc0a693bc1a025986 (diff) |
correct OOXML function name is EFFECT instead of EFFECTIVE
(cherry picked from commit ed5bcef57b678cb92c68bf842a72e50f4dd1e2ea)
accept EFFECTIVE as EFFECT in OOXML import
(cherry picked from commit f3f89f4f3180b0fd63c5290c665894c6a27f2ae2)
18a914972d69a37e9dcf5b18ffbea9177004dad7
Change-Id: Ieb7484afe210e378efd43ba3a181cd90d29619b9
Reviewed-on: https://gerrit.libreoffice.org/26702
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | formula/source/core/resource/core_resource.src | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src index 551de2fa1c74..a1868fa56696 100644 --- a/formula/source/core/resource/core_resource.src +++ b/formula/source/core/resource/core_resource.src @@ -678,7 +678,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML String SC_OPCODE_PPMT { Text = "PPMT" ; }; String SC_OPCODE_CUM_IPMT { Text = "CUMIPMT" ; }; String SC_OPCODE_CUM_PRINC { Text = "CUMPRINC" ; }; - String SC_OPCODE_EFFECTIVE { Text = "EFFECTIVE" ; }; + String SC_OPCODE_EFFECTIVE { Text = "EFFECT" ; }; String SC_OPCODE_NOMINAL { Text = "NOMINAL" ; }; String SC_OPCODE_SUB_TOTAL { Text = "SUBTOTAL" ; }; String SC_OPCODE_DB_SUM { Text = "DSUM" ; }; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 97820289396a..adff3f468e92 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2740,6 +2740,28 @@ bool ScCompiler::IsOpCode( const OUString& rName, bool bInArray ) } } } + else if (mxSymbols->isOOXML()) + { + // OOXML names that are not written in the current mapping but to be + // recognized as old versions wrote them. + struct FunctionName + { + const sal_Char* pName; + OpCode eOp; + }; + static const FunctionName aOoxmlAliases[] = { + { "EFFECTIVE", ocEffective } // EFFECTIVE -> EFFECT + }; + for (const FunctionName& rOoxmlAlias : aOoxmlAliases) + { + if (rName.equalsIgnoreAsciiCaseAscii( rOoxmlAlias.pName)) + { + maRawToken.SetOpCode( rOoxmlAlias.eOp); + bFound = true; + break; // for + } + } + } if (!bFound) { OUString aIntName; |