diff options
author | Winfried Donkers <winfrieddonkers@libreoffice.org> | 2015-06-01 13:47:07 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-06-11 11:17:58 +0000 |
commit | cb13c46da1cdd1e2b95fd473cc0ff54f776dfe9c (patch) | |
tree | 9474954b7d84c6ad88a809b53ade12ac7b2b5b5b /formula/source | |
parent | 29f6ef4632a53243b1bf60cb412d8c5ee8447dc6 (diff) |
tdf#69552 [part 2] support all ODFF1.2 and Excel2013 variations
of CEILING and FLOOR
Change-Id: I9537d9bd8dbca2eac769e74e9d3d5b298b76f594
Reviewed-on: https://gerrit.libreoffice.org/16016
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'formula/source')
-rw-r--r-- | formula/source/core/api/token.cxx | 6 | ||||
-rw-r--r-- | formula/source/core/resource/core_resource.src | 28 |
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 { |