Kaydet (Commit) 337066eb authored tarafından Markus Mohrhard's avatar Markus Mohrhard

bail out early for error cells

Change-Id: Ice38b42cdd01b8dbb472752d2c8e1679181f8422
üst d6b10909
......@@ -887,20 +887,24 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
void XclExpFormulaCell::WriteContents( XclExpStream& rStrm )
{
sal_uInt16 nScErrCode = mrScFmlaCell.GetErrCode();
if( nScErrCode )
{
rStrm << EXC_FORMULA_RES_ERROR << sal_uInt8( 0 )
<< XclTools::GetXclErrorCode( nScErrCode )
<< sal_uInt8( 0 ) << sal_uInt16( 0 )
<< sal_uInt16( 0xFFFF );
return;
}
// result of the formula
switch( mrScFmlaCell.GetFormatType() )
{
case NUMBERFORMAT_NUMBER:
{
// either value or error code
sal_uInt16 nScErrCode = mrScFmlaCell.GetErrCode();
if( nScErrCode )
rStrm << EXC_FORMULA_RES_ERROR << sal_uInt8( 0 )
<< XclTools::GetXclErrorCode( nScErrCode )
<< sal_uInt8( 0 ) << sal_uInt16( 0 )
<< sal_uInt16( 0xFFFF );
else
rStrm << mrScFmlaCell.GetValue();
rStrm << mrScFmlaCell.GetValue();
}
break;
......
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