fix VT_LPWSTR support

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1178149 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-10-02 08:44:05 +00:00
parent df1727e1e6
commit 0b92810530

View File

@ -507,7 +507,7 @@ public class VariantSupport extends Variant
{
final int nrOfChars = ( (String) value ).length() + 1;
length += TypeWriter.writeUIntToStream( out, nrOfChars );
char[] s = Util.pad4((String) value);
char[] s = ( (String) value ).toCharArray();
for ( int i = 0; i < s.length; i++ )
{
final int high = ( ( s[i] & 0x0000ff00 ) >> 8 );
@ -518,6 +518,10 @@ public class VariantSupport extends Variant
out.write( highb );
length += 2;
}
// NullTerminator
out.write( 0x00 );
out.write( 0x00 );
length += 2;
break;
}
case Variant.VT_CF: