summaryrefslogtreecommitdiff
path: root/formula/source
diff options
context:
space:
mode:
Diffstat (limited to 'formula/source')
-rw-r--r--formula/source/core/api/token.cxx6
-rw-r--r--formula/source/core/resource/core_resource.src28
2 files changed, 25 insertions, 9 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index e1f97fb1b093..a5e93923e971 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1054,6 +1054,7 @@ inline bool MissingConventionOOXML::isRewriteNeeded( OpCode eOp )
case ocIndex:
case ocCeil:
+ case ocFloor:
case ocGammaDist:
case ocFDist_LT:
@@ -1414,10 +1415,11 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissing( const MissingConvention &
}
if (bAdd)
{
- if ( pCur->GetOpCode() == ocCeil &&
+ if ( ( pCur->GetOpCode() == ocCeil || pCur->GetOpCode() == ocFloor ) &&
rConv.getConvention() == MissingConvention::FORMULA_MISSING_CONVENTION_OOXML )
{
- FormulaToken *pToken = new FormulaToken( svByte, ocCeil_Math );
+ FormulaToken *pToken = new FormulaToken( svByte,
+ ( pCur->GetOpCode() == ocCeil ? ocCeil_Math : ocFloor_Math ) );
pNewArr->AddToken( *pToken );
}
else
diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src
index 298560c81623..534dafcb2651 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -154,8 +154,10 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
String SC_OPCODE_CEIL_MS { Text = "COM.MICROSOFT.CEILING" ; };
String SC_OPCODE_CEIL_PRECISE { Text = "COM.MICROSOFT.CEILING.PRECISE" ; };
String SC_OPCODE_CEIL_ISO { Text = "COM.MICROSOFT.ISO.CEILING" ; };
- String SC_OPCODE_FLOOR_MS { Text = "COM.MICROSOFT.FLOOR.PRECISE" ; };
String SC_OPCODE_FLOOR { Text = "FLOOR" ; };
+ String SC_OPCODE_FLOOR_MS { Text = "COM.MICROSOFT.FLOOR" ; };
+ String SC_OPCODE_FLOOR_MATH { Text = "COM.MICROSOFT.FLOOR.MATH" ; };
+ String SC_OPCODE_FLOOR_PRECISE { Text = "COM.MICROSOFT.FLOOR.PRECISE" ; };
String SC_OPCODE_ROUND { Text = "ROUND" ; };
String SC_OPCODE_ROUND_UP { Text = "ROUNDUP" ; };
String SC_OPCODE_ROUND_DOWN { Text = "ROUNDDOWN" ; };
@@ -573,8 +575,10 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML
String SC_OPCODE_CEIL_MS { Text = "CEILING" ; };
String SC_OPCODE_CEIL_PRECISE { Text = "_xlfn.CEILING.PRECISE" ; };
String SC_OPCODE_CEIL_ISO { Text = "ISO.CEILING" ; };
- String SC_OPCODE_FLOOR_MS { Text = "_xlfn.FLOOR.PRECISE" ; };
- String SC_OPCODE_FLOOR { Text = "FLOOR" ; };
+ String SC_OPCODE_FLOOR_MS { Text = "FLOOR" ; };
+ String SC_OPCODE_FLOOR_MATH { Text = "_xlfn.FLOOR.MATH" ; };
+ String SC_OPCODE_FLOOR { Text = "_xlfn.FLOOR.MATH" ; };
+ String SC_OPCODE_FLOOR_PRECISE { Text = "_xlfn.FLOOR.PRECISE" ; };
String SC_OPCODE_ROUND { Text = "ROUND" ; };
String SC_OPCODE_ROUND_UP { Text = "ROUNDUP" ; };
String SC_OPCODE_ROUND_DOWN { Text = "ROUNDDOWN" ; };
@@ -994,8 +998,10 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH
String SC_OPCODE_CEIL_MS { Text = "CEILING.XCL" ; };
String SC_OPCODE_CEIL_PRECISE { Text = "CEILING.PRECISE" ; };
String SC_OPCODE_CEIL_ISO { Text = "ISO.CEILING" ; };
- String SC_OPCODE_FLOOR_MS { Text = "FLOOR.PRECISE" ; };
String SC_OPCODE_FLOOR { Text = "FLOOR" ; };
+ String SC_OPCODE_FLOOR_MS { Text = "FLOOR.XCL" ; };
+ String SC_OPCODE_FLOOR_MATH { Text = "FLOOR.MATH" ; };
+ String SC_OPCODE_FLOOR_PRECISE { Text = "FLOOR.PRECISE" ; };
String SC_OPCODE_ROUND { Text = "ROUND" ; };
String SC_OPCODE_ROUND_UP { Text = "ROUNDUP" ; };
String SC_OPCODE_ROUND_DOWN { Text = "ROUNDDOWN" ; };
@@ -1747,13 +1753,21 @@ Resource RID_STRLIST_FUNCTION_NAMES
{
Text [ en-US ] = "ISO.CEILING" ;
};
+ String SC_OPCODE_FLOOR
+ {
+ Text [ en-US ] = "FLOOR" ;
+ };
String SC_OPCODE_FLOOR_MS
{
- Text [ en-US ] = "FLOOR.PRECISE" ;
+ Text [ en-US ] = "FLOOR.XCL" ;
};
- String SC_OPCODE_FLOOR
+ String SC_OPCODE_FLOOR_MATH
{
- Text [ en-US ] = "FLOOR" ;
+ Text [ en-US ] = "FLOOR.MATH" ;
+ };
+ String SC_OPCODE_FLOOR_PRECISE
+ {
+ Text [ en-US ] = "FLOOR.PRECISE" ;
};
String SC_OPCODE_ROUND
{