aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/hpsf/VariantSupport.java
diff options
context:
space:
mode:
authorRainer Klute <klute@apache.org>2005-04-13 16:33:22 +0000
committerRainer Klute <klute@apache.org>2005-04-13 16:33:22 +0000
commite33d4f7cd18e8b8730c28b4969e5dbe237102b78 (patch)
tree57ab87cc327ab4a1b0f210e98cfca23b45a4e91b /src/java/org/apache/poi/hpsf/VariantSupport.java
parent1a5920f221eb3d1b124c9733af5957429efc148f (diff)
downloadpoi-e33d4f7cd18e8b8730c28b4969e5dbe237102b78.tar.gz
poi-e33d4f7cd18e8b8730c28b4969e5dbe237102b78.zip
- Support for variant type VT_R8 added.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353637 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.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/hpsf/VariantSupport.java b/src/java/org/apache/poi/hpsf/VariantSupport.java
index 081e7f4dd4..b9ab14ffca 100644
--- a/src/java/org/apache/poi/hpsf/VariantSupport.java
+++ b/src/java/org/apache/poi/hpsf/VariantSupport.java
@@ -169,6 +169,15 @@ public class VariantSupport extends Variant
value = new Long(LittleEndian.getUInt(src, o1));
break;
}
+ case Variant.VT_R8:
+ {
+ /*
+ * Read an eight-byte double value. In Java it is represented as
+ * a Double object.
+ */
+ value = new Double(LittleEndian.getDouble(src, o1));
+ break;
+ }
case Variant.VT_FILETIME:
{
/*
@@ -394,6 +403,12 @@ public class VariantSupport extends Variant
((Long) value).intValue());
break;
}
+ case Variant.VT_R8:
+ {
+ length += TypeWriter.writeToStream(out,
+ ((Double) value).doubleValue());
+ break;
+ }
case Variant.VT_FILETIME:
{
long filetime = Util.dateToFileTime((Date) value);