[Libreoffice-commits] core.git: formula/source
Winfried Donkers
winfrieddonkers at libreoffice.org
Wed Oct 26 11:13:31 UTC 2016
formula/source/core/api/token.cxx | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
New commits:
commit 1276e95193a714391c78120aadb0d347432eb35f
Author: Winfried Donkers <winfrieddonkers at libreoffice.org>
Date: Tue Oct 18 16:30:19 2016 +0200
tdf#103088, improve interoperability with Excel for LOGNORMDIST().
Change-Id: I5f4ccbb54b212247a3ff8b13ff012c930d18a86c
Reviewed-on: https://gerrit.libreoffice.org/30020
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 409c417..f910d71 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1525,14 +1525,30 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissing( const MissingConvention &
}
if (bAdd)
{
- if ( ( pCur->GetOpCode() == ocCeil || pCur->GetOpCode() == ocFloor ) &&
+ OpCode eOp = pCur->GetOpCode();
+ if ( ( eOp == ocCeil || eOp == ocFloor ||
+ ( eOp == ocLogNormDist && pCur->GetByte() == 4 ) ) &&
rConv.getConvention() == MissingConvention::FORMULA_MISSING_CONVENTION_OOXML )
{
- FormulaToken *pToken = new FormulaToken( svByte,
- ( pCur->GetOpCode() == ocCeil ? ocCeil_Math : ocFloor_Math ) );
+ switch ( eOp )
+ {
+ case ocCeil :
+ eOp = ocCeil_Math;
+ break;
+ case ocFloor :
+ eOp = ocFloor_Math;
+ break;
+ case ocLogNormDist :
+ eOp = ocLogNormDist_MS;
+ break;
+ default :
+ eOp = ocNone;
+ break;
+ }
+ FormulaToken *pToken = new FormulaToken( svByte, eOp );
pNewArr->Add( pToken );
}
- else if ( pCur->GetOpCode() == ocHypGeomDist &&
+ else if ( eOp == ocHypGeomDist &&
rConv.getConvention() == MissingConvention::FORMULA_MISSING_CONVENTION_OOXML )
{
FormulaToken *pToken = new FormulaToken( svByte, ocHypGeomDist_MS );
More information about the Libreoffice-commits
mailing list