Apache OpenOffice (AOO) Bugzilla – Issue 103365
value field of BOOLERR record should be just one byte
Last modified: 2023-09-29 01:29:50 UTC
Currently Cacl writes two bytes for the value field when the record type is EXC_BOOLERR_BOOL. Correct behaviour occurs when the record type is EXC_BOOLERR_ERROR - the value is written as a single byte (since mnErrCode is sal_uInt8) Excel seems to handle this OK but POI (until the recent patch) does not. This should be a one line fix to xetable.cxx: http://svn.services.openoffice.org/ooo/trunk/sc/source/filter/excel/xetable.cxx Index: xetable.cxx =================================================================== --- xetable.cxx (revision 268869) +++ xetable.cxx (working copy) @@ -648,7 +648,7 @@ void XclExpBooleanCell::WriteContents( XclExpStream& rStrm ) { - rStrm << sal_uInt16( mbValue ? 1 : 0 ) << EXC_BOOLERR_BOOL; + rStrm << sal_uInt8( mbValue ? 1 : 0 ) << EXC_BOOLERR_BOOL; } // ----------------------------------------------------------------------------
This is a real bug, with a test case in the linked Apache POI bug. Josh: thank you for your bug report. Can we please use your patch under the Apache License V2?