From cf43ff5262a111f9fbebe58d254b704ec057cbf6 Mon Sep 17 00:00:00 2001 From: Winfried Donkers Date: Thu, 13 Oct 2016 13:49:18 +0200 Subject: tdf#102948 Make HYPGEOMDIST ODFF1.2 compliant. Also reduce duplicate code. On Export to OOXML, HYPGEOMDIST is converted to HYPGEOM.DIST. Change-Id: I70a70ee6b5c542e272ef574073ebcd1924f31083 Reviewed-on: https://gerrit.libreoffice.org/29767 Tested-by: Jenkins Reviewed-by: Eike Rathke Tested-by: Eike Rathke --- formula/source/core/api/token.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'formula') diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 7d5528c40c73..a9abdd0ef133 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -1111,10 +1111,12 @@ inline bool MissingConventionOOXML::isRewriteNeeded( OpCode eOp ) case ocPoissonDist: case ocNormDist: case ocLogNormDist: + case ocHypGeomDist: case ocDBCount: case ocDBCount2: return true; + default: return false; } @@ -1244,6 +1246,14 @@ void FormulaMissingContext::AddMoreArgs( FormulaTokenArray *pNewArr, const Missi } break; + case ocHypGeomDist: + if ( mnCurArg == 3 ) + { + pNewArr->AddOpCode( ocSep ); + pNewArr->AddDouble( 0.0 ); // 5th, Cumulative = false() + } + break; + case ocRound: case ocRoundUp: case ocRoundDown: @@ -1515,6 +1525,12 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissing( const MissingConvention & ( pCur->GetOpCode() == ocCeil ? ocCeil_Math : ocFloor_Math ) ); pNewArr->Add( pToken ); } + else if ( pCur->GetOpCode() == ocHypGeomDist && + rConv.getConvention() == MissingConvention::FORMULA_MISSING_CONVENTION_OOXML ) + { + FormulaToken *pToken = new FormulaToken( svByte, ocHypGeomDist_MS ); + pNewArr->Add( pToken ); + } else pNewArr->AddToken( *pCur ); } -- cgit 'distro/collabora/cp-6.2'>distro/collabora/cp-6.2 LibreOffice 界面翻译代码仓库文档基金会
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-01-25 16:54:36 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-01-25 17:13:26 +0100
commitcbe7554c6a4fddd40da90728699d7ff5d95cab89 (patch)
treecbc2610391d639b48ca2e7940f893e0cb2a195c6
parent4668a661bfdc743bb88bfc5b7fbc83383974d733 (diff)
update translations for master
and force-fix errors using pocheck Change-Id: Id37c39c29b4b44c9383bb2cf2606eb27a845852c