formula/source/core/resource/core_resource.src | 2 +- sc/source/core/tool/compiler.cxx | 3 ++- sc/source/filter/excel/xlformula.cxx | 9 ++++++++- 3 files changed, 11 insertions(+), 3 deletions(-)
New commits: commit feef105196021c03191d22dd952d8c82276a7bd0 Author: Eike Rathke <er...@redhat.com> Date: Thu Jul 14 18:15:14 2016 +0200 save ERRORTYPE as _xlfn.ORG.OPENOFFICE.ERRORTYPE to OOXML Was wrongly saved as ERRORTYPE without _xlfn. prefix and namespace. Be able to still read ERRORTYPE. Change-Id: Ia028fe06d930f60b4260adf589ee3190b90ea099 diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src index 6a2d7d2..0a1699d 100644 --- a/formula/source/core/resource/core_resource.src +++ b/formula/source/core/resource/core_resource.src @@ -585,7 +585,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML String SC_OPCODE_S_NORM_INV_MS { Text = "_xlfn.NORM.S.INV" ; }; String SC_OPCODE_GAMMA_LN { Text = "GAMMALN" ; }; String SC_OPCODE_GAMMA_LN_MS { Text = "_xlfn.GAMMALN.PRECISE" ; }; - String SC_OPCODE_ERROR_TYPE { Text = "ERRORTYPE" ; }; + String SC_OPCODE_ERROR_TYPE { Text = "_xlfn.ORG.OPENOFFICE.ERRORTYPE" ; }; String SC_OPCODE_ERROR_TYPE_ODF { Text = "ERROR.TYPE" ; }; String SC_OPCODE_FORMULA { Text = "_xlfn.FORMULATEXT"; }; String SC_OPCODE_ARC_TAN_2 { Text = "ATAN2" ; }; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 8cb9534..44ab14b 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2750,7 +2750,8 @@ bool ScCompiler::IsOpCode( const OUString& rName, bool bInArray ) OpCode eOp; }; static const FunctionName aOoxmlAliases[] = { - { "EFFECTIVE", ocEffect } // EFFECTIVE -> EFFECT + { "EFFECTIVE", ocEffect }, // EFFECTIVE -> EFFECT + { "ERRORTYPE", ocErrorType } // ERRORTYPE -> _xlfn.ORG.OPENOFFICE.ERRORTYPE }; for (const FunctionName& rOoxmlAlias : aOoxmlAliases) { diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index 0e9257f..809fb5b 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -259,7 +259,7 @@ static const XclFunctionInfo saFuncTable_4[] = { ocRank, 216, 2, 3, V, { VR, RO, VR }, 0, nullptr }, { ocDB, 247, 4, 5, V, { VR }, 0, nullptr }, { ocFrequency, 252, 2, 2, A, { RA }, 0, nullptr }, - { ocErrorType, 261, 1, 1, V, { VR }, 0, nullptr }, + { ocErrorType_ODF, 261, 1, 1, V, { VR }, 0, nullptr }, { ocAveDev, 269, 1, MX, V, { RX }, 0, nullptr }, { ocBetaDist, 270, 3, 5, V, { VR }, 0, nullptr }, { ocGammaLn, 271, 1, 1, V, { VR }, 0, nullptr }, @@ -605,9 +605,15 @@ static const XclFunctionInfo saFuncTable_Odf[] = { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), EXC_FUNCNAME( asciiname ) }, \ { opcode, 255, (minparam)+1, (maxparam)+1, V, { RO_E, RO }, EXC_FUNCFLAG_EXPORTONLY|(flags), EXC_FUNCNAME( asciiname ) } +// Import Broken Raw ... even without leading _xlfn. +#define EXC_FUNCENTRY_OOO_IBR( opcode, minparam, maxparam, flags, asciiname ) \ + { opcode, NOID, minparam, maxparam, V, { VR }, EXC_FUNCFLAG_IMPORTONLY|(flags), asciiname } + /** Functions defined by Calc, but not in OpenFormula nor supported by Excel. */ static const XclFunctionInfo saFuncTable_OOoLO[] = { + EXC_FUNCENTRY_OOO( ocErrorType, 1, 1, 0, "ORG.OPENOFFICE.ERRORTYPE" ), + EXC_FUNCENTRY_OOO_IBR( ocErrorType, 1, 1, 0, "ERRORTYPE" ), // was written wrongly, read it EXC_FUNCENTRY_OOO( ocConvert, 3, 3, 0, "ORG.OPENOFFICE.CONVERT" ), EXC_FUNCENTRY_OOO( ocColor, 3, 4, 0, "ORG.LIBREOFFICE.COLOR" ), EXC_FUNCENTRY_OOO( ocRawSubtract, 2, MX, 0, "ORG.LIBREOFFICE.RAWSUBTRACT" ), @@ -617,6 +623,7 @@ static const XclFunctionInfo saFuncTable_OOoLO[] = EXC_FUNCENTRY_OOO( ocForecast_ETS_STM, 3, 6, 0, "ORG.LIBREOFFICE.FORECAST.ETS.STAT.MULT" ) }; +#undef EXC_FUNCENTRY_OOO_IBR #undef EXC_FUNCENTRY_OOO XclFunctionProvider::XclFunctionProvider( const XclRoot& rRoot ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits