]> source.dussan.org Git - poi.git/commitdiff
XLS: HyperlinkRecord: remove check for value in usKeyValue field because some (correc...
authorMaxim Valyanskiy <maxcom@apache.org>
Tue, 13 Sep 2011 13:08:42 +0000 (13:08 +0000)
committerMaxim Valyanskiy <maxcom@apache.org>
Tue, 13 Sep 2011 13:08:42 +0000 (13:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1170166 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/record/HyperlinkRecord.java

index 18355b31da722d728dcbb425807f04cb914a0c2a..3d6b237cf8a57620a01cda54ad9d5de8e96ca62b 100644 (file)
@@ -501,10 +501,9 @@ public final class HyperlinkRecord extends StandardRecord {
                     int charDataSize = in.readInt();
 
                     //From the spec: An optional unsigned integer that MUST be 3 if present
-                    int optFlags = in.readUShort();
-                    if (optFlags != 0x0003) {
-                        throw new RecordFormatException("Expected 0x3 but found " + optFlags);
-                    }
+                    // but some files has 4
+                    int usKeyValue = in.readUShort();
+
                     _address = StringUtil.readUnicodeLE(in, charDataSize/2);
                 } else {
                     _address = null;