Issue 103365 - value field of BOOLERR record should be just one byte
Summary: value field of BOOLERR record should be just one byte
Alias: None
Product: Calc
Classification: Application
Component: save-export (show other issues)
Version: OOo 3.0.1
Hardware: All All
: P5 (lowest) Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: needhelp
Depends on:
Reported: 2009-07-06 21:44 UTC by josh_micich
Modified: 2014-01-10 13:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description josh_micich 2009-07-06 21:44:10 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:

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;

 // ----------------------------------------------------------------------------