aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/hpsf/VariantSupport.java
diff options
context:
space:
mode:
authorRainer Klute <klute@apache.org>2004-08-31 20:46:41 +0000
committerRainer Klute <klute@apache.org>2004-08-31 20:46:41 +0000
commit8cb8e5f43d74ba72997b4e95945f23b528ce44bc (patch)
tree19d97b0d50e36af398d752fc2354a9c6990d3147 /src/java/org/apache/poi/hpsf/VariantSupport.java
parent55e91fa7e29931c73767cc181f6bbc7cfb16aca6 (diff)
downloadpoi-8cb8e5f43d74ba72997b4e95945f23b528ce44bc.tar.gz
poi-8cb8e5f43d74ba72997b4e95945f23b528ce44bc.zip
- 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
Diffstat (limited to 'src/java/org/apache/poi/hpsf/VariantSupport.java')
-rw-r--r--src/java/org/apache/poi/hpsf/VariantSupport.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/java/org/apache/poi/hpsf/VariantSupport.java b/src/java/org/apache/poi/hpsf/VariantSupport.java
index 95ff2e4690..7b4719a4fb 100644
--- a/src/java/org/apache/poi/hpsf/VariantSupport.java
+++ b/src/java/org/apache/poi/hpsf/VariantSupport.java
@@ -320,14 +320,8 @@ public class VariantSupport extends Variant
final Object value, final int codepage)
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;
- switch ((int) lType)
+ switch ((int) type)
{
case Variant.VT_BOOL:
{
@@ -419,10 +413,10 @@ public class VariantSupport extends Variant
out.write(b);
length = b.length;
writeUnsupportedTypeMessage
- (new WritingNotSupportedException(lType, value));
+ (new WritingNotSupportedException(type, value));
}
else
- throw new WritingNotSupportedException(lType, value);
+ throw new WritingNotSupportedException(type, value);
break;
}
}