]> source.dussan.org Git - poi.git/commitdiff
fix VT_BOOL support
authorSergey Vladimirov <sergey@apache.org>
Sun, 2 Oct 2011 08:36:51 +0000 (08:36 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sun, 2 Oct 2011 08:36:51 +0000 (08:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1178147 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hpsf/VariantSupport.java

index af7347b7140dfddf95ee768fcd26899dccc41eb2..ecb486b94bafb822a6e5967a86fbfb6169ed6e9f 100644 (file)
@@ -476,12 +476,16 @@ public class VariantSupport extends Variant
         {
             case Variant.VT_BOOL:
             {
-                short trueOrFalse;
                 if ( ( (Boolean) value ).booleanValue() )
-                    trueOrFalse = (short) 0xFFFF;
+                {
+                    out.write( 0xff );
+                    out.write( 0xff );
+                }
                 else
-                    trueOrFalse = (short) 0x0000;
-                TypeWriter.writeUShortToStream( out, trueOrFalse );
+                {
+                    out.write( 0x00 );
+                    out.write( 0x00 );
+                }
                 length += 2;
                 break;
             }