Kaydet (Commit) 0c7a1b6e authored tarafından Eike Rathke's avatar Eike Rathke

resolved fdo#60087 corrected .xlsx export of functions

Change-Id: I6c7ba47dde88a73d035b1db5f7f4cede78b262db
üst 63e3d867
...@@ -1406,20 +1406,24 @@ void XclExpFmlaCompImpl::ProcessFunction( const XclExpScToken& rTokData ) ...@@ -1406,20 +1406,24 @@ void XclExpFmlaCompImpl::ProcessFunction( const XclExpScToken& rTokData )
void XclExpFmlaCompImpl::PrepareFunction( XclExpFuncData& rFuncData ) void XclExpFmlaCompImpl::PrepareFunction( XclExpFuncData& rFuncData )
{ {
switch( rFuncData.GetOpCode() ) // For OOXML these are not rewritten anymore.
if (GetOutput() != EXC_OUTPUT_XML_2007)
{ {
case ocCosecant: // simulate CSC(x) by (1/SIN(x)) switch( rFuncData.GetOpCode() )
case ocSecant: // simulate SEC(x) by (1/COS(x)) {
case ocCot: // simulate COT(x) by (1/TAN(x)) case ocCosecant: // simulate CSC(x) by (1/SIN(x))
case ocCosecantHyp: // simulate CSCH(x) by (1/SINH(x)) case ocSecant: // simulate SEC(x) by (1/COS(x))
case ocSecantHyp: // simulate SECH(x) by (1/COSH(x)) case ocCot: // simulate COT(x) by (1/TAN(x))
case ocCotHyp: // simulate COTH(x) by (1/TANH(x)) case ocCosecantHyp: // simulate CSCH(x) by (1/SINH(x))
AppendIntToken( 1 ); case ocSecantHyp: // simulate SECH(x) by (1/COSH(x))
break; case ocCotHyp: // simulate COTH(x) by (1/TANH(x))
case ocArcCot: // simulate ACOT(x) by (PI/2-ATAN(x)) AppendIntToken( 1 );
AppendNumToken( F_PI2 ); break;
break; case ocArcCot: // simulate ACOT(x) by (PI/2-ATAN(x))
default:; AppendNumToken( F_PI2 );
break;
default:;
}
} }
} }
...@@ -1468,12 +1472,20 @@ void XclExpFmlaCompImpl::FinishFunction( XclExpFuncData& rFuncData, sal_uInt8 nC ...@@ -1468,12 +1472,20 @@ void XclExpFmlaCompImpl::FinishFunction( XclExpFuncData& rFuncData, sal_uInt8 nC
case ocCosecantHyp: // simulate CSCH(x) by (1/SINH(x)) case ocCosecantHyp: // simulate CSCH(x) by (1/SINH(x))
case ocSecantHyp: // simulate SECH(x) by (1/COSH(x)) case ocSecantHyp: // simulate SECH(x) by (1/COSH(x))
case ocCotHyp: // simulate COTH(x) by (1/TANH(x)) case ocCotHyp: // simulate COTH(x) by (1/TANH(x))
AppendBinaryOperatorToken( EXC_TOKID_DIV, true ); // For OOXML not rewritten anymore.
AppendParenToken(); if (GetOutput() != EXC_OUTPUT_XML_2007)
{
AppendBinaryOperatorToken( EXC_TOKID_DIV, true );
AppendParenToken();
}
break; break;
case ocArcCot: // simulate ACOT(x) by (PI/2-ATAN(x)) case ocArcCot: // simulate ACOT(x) by (PI/2-ATAN(x))
AppendBinaryOperatorToken( EXC_TOKID_SUB, true ); // For OOXML not rewritten anymore.
AppendParenToken(); if (GetOutput() != EXC_OUTPUT_XML_2007)
{
AppendBinaryOperatorToken( EXC_TOKID_SUB, true );
AppendParenToken();
}
break; break;
default:; default:;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment