summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-08-15 01:03:00 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-08-15 07:48:36 +0000
commit8f86674214c9dc755302be163690528104dbc473 (patch)
tree3a93b0741499410fb6c9b4ee54dd38e225baa04c /sc
parentd1cb302bc47b553ac2f6e126f19ea75f69564f18 (diff)
resolved fdo#67571 write flags and formula token array again
Regression introduced with 337066eb1fa395990b78d1032c399a4688d2a6f9, flags and formula token array weren't written if the formula result was an error value. Change-Id: I8ccd55a7b43d5ceb79002e01f0b3d33d36d85538 (cherry picked from commit 25763e59625ce83de4b82927359108f9e7878744) Reviewed-on: https://gerrit.libreoffice.org/5429 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xetable.cxx66
1 files changed, 33 insertions, 33 deletions
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 8694a495b499..079231877723 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -936,45 +936,45 @@ void XclExpFormulaCell::WriteContents( XclExpStream& rStrm )
<< XclTools::GetXclErrorCode( nScErrCode )
<< sal_uInt8( 0 ) << sal_uInt16( 0 )
<< sal_uInt16( 0xFFFF );
-
- return;
}
-
- // result of the formula
- switch( mrScFmlaCell.GetFormatType() )
+ else
{
- case NUMBERFORMAT_NUMBER:
+ // result of the formula
+ switch( mrScFmlaCell.GetFormatType() )
{
- // either value or error code
- rStrm << mrScFmlaCell.GetValue();
- }
- break;
+ case NUMBERFORMAT_NUMBER:
+ {
+ // either value or error code
+ rStrm << mrScFmlaCell.GetValue();
+ }
+ break;
- case NUMBERFORMAT_TEXT:
- {
- OUString aResult = mrScFmlaCell.GetString();
- if( !aResult.isEmpty() || (rStrm.GetRoot().GetBiff() <= EXC_BIFF5) )
- {
- rStrm << EXC_FORMULA_RES_STRING;
- mxStringRec.reset( new XclExpStringRec( rStrm.GetRoot(), aResult ) );
- }
- else
- rStrm << EXC_FORMULA_RES_EMPTY; // BIFF8 only
- rStrm << sal_uInt8( 0 ) << sal_uInt32( 0 ) << sal_uInt16( 0xFFFF );
- }
- break;
+ case NUMBERFORMAT_TEXT:
+ {
+ OUString aResult = mrScFmlaCell.GetString();
+ if( !aResult.isEmpty() || (rStrm.GetRoot().GetBiff() <= EXC_BIFF5) )
+ {
+ rStrm << EXC_FORMULA_RES_STRING;
+ mxStringRec.reset( new XclExpStringRec( rStrm.GetRoot(), aResult ) );
+ }
+ else
+ rStrm << EXC_FORMULA_RES_EMPTY; // BIFF8 only
+ rStrm << sal_uInt8( 0 ) << sal_uInt32( 0 ) << sal_uInt16( 0xFFFF );
+ }
+ break;
- case NUMBERFORMAT_LOGICAL:
- {
- sal_uInt8 nXclValue = (mrScFmlaCell.GetValue() == 0.0) ? 0 : 1;
- rStrm << EXC_FORMULA_RES_BOOL << sal_uInt8( 0 )
- << nXclValue << sal_uInt8( 0 ) << sal_uInt16( 0 )
- << sal_uInt16( 0xFFFF );
- }
- break;
+ case NUMBERFORMAT_LOGICAL:
+ {
+ sal_uInt8 nXclValue = (mrScFmlaCell.GetValue() == 0.0) ? 0 : 1;
+ rStrm << EXC_FORMULA_RES_BOOL << sal_uInt8( 0 )
+ << nXclValue << sal_uInt8( 0 ) << sal_uInt16( 0 )
+ << sal_uInt16( 0xFFFF );
+ }
+ break;
- default:
- rStrm << mrScFmlaCell.GetValue();
+ default:
+ rStrm << mrScFmlaCell.GetValue();
+ }
}
// flags and formula token array