mirror of https://github.com/apache/poi.git
- Adjusting the variant type moved to Property.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353595 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
55e91fa7e2
commit
8cb8e5f43d
|
@ -320,14 +320,8 @@ public class VariantSupport extends Variant
|
||||||
final Object value, final int codepage)
|
final Object value, final int codepage)
|
||||||
throws IOException, WritingNotSupportedException
|
throws IOException, WritingNotSupportedException
|
||||||
{
|
{
|
||||||
long lType = type;
|
|
||||||
|
|
||||||
/* Ensure that wide strings are written if the codepage is Unicode. */
|
|
||||||
if (codepage == Constants.CP_UNICODE && type == Variant.VT_LPSTR)
|
|
||||||
lType = Variant.VT_LPWSTR;
|
|
||||||
|
|
||||||
int length = 0;
|
int length = 0;
|
||||||
switch ((int) lType)
|
switch ((int) type)
|
||||||
{
|
{
|
||||||
case Variant.VT_BOOL:
|
case Variant.VT_BOOL:
|
||||||
{
|
{
|
||||||
|
@ -419,10 +413,10 @@ public class VariantSupport extends Variant
|
||||||
out.write(b);
|
out.write(b);
|
||||||
length = b.length;
|
length = b.length;
|
||||||
writeUnsupportedTypeMessage
|
writeUnsupportedTypeMessage
|
||||||
(new WritingNotSupportedException(lType, value));
|
(new WritingNotSupportedException(type, value));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new WritingNotSupportedException(lType, value);
|
throw new WritingNotSupportedException(type, value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue