summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--formula/source/core/resource/core_resource.src2
-rw-r--r--sc/source/core/tool/compiler.cxx3
-rw-r--r--sc/source/filter/excel/xlformula.cxx9
3 files changed, 11 insertions, 3 deletions
diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src
index 6a2d7d2eb82a..0a1699da9348 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 8cb953476864..44ab14b36107 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 0e9257fcca0f..809fb5b2ebfd 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 )