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 46e1c019cc
commit 02f7229fa3

View File

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