mirror of https://github.com/apache/poi.git
correctly handle 2-byte properties
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1178107 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5351f594ef
commit
123661b5ab
|
@ -108,6 +108,13 @@ public class MutableProperty extends Property
|
|||
int length = 0;
|
||||
long variantType = getType();
|
||||
|
||||
if ( variantType == 0x0002 )
|
||||
{
|
||||
TypeWriter
|
||||
.writeToStream( out, ( (Number) getValue() ).shortValue() );
|
||||
return 2;
|
||||
}
|
||||
|
||||
/* Ensure that wide strings are written if the codepage is Unicode. */
|
||||
if (codepage == Constants.CP_UNICODE && variantType == Variant.VT_LPSTR)
|
||||
variantType = Variant.VT_LPWSTR;
|
||||
|
|
Loading…
Reference in New Issue