pad VT_BOOL to 4 bytes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1178112 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-10-02 00:59:03 +00:00
parent 7d3d6d01d7
commit ba59a4b316
1 changed files with 5 additions and 4 deletions

View File

@ -476,13 +476,14 @@ public class VariantSupport extends Variant
{
case Variant.VT_BOOL:
{
int trueOrFalse;
short trueOrFalse;
if ( ( (Boolean) value ).booleanValue() )
trueOrFalse = 0xFFFF;
trueOrFalse = (short) 0xFFFF;
else
trueOrFalse = 0x0000;
trueOrFalse = (short) 0x0000;
TypeWriter.writeUShortToStream( out, trueOrFalse );
length += 2;
TypeWriter.writeUShortToStream( out, (short) 0x0000 );
length += 4;
break;
}
case Variant.VT_LPSTR: