You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ma...@apache.org on 2011/09/13 15:08:42 UTC

svn commit: r1170166 - /poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java

Author: maxcom
Date: Tue Sep 13 13:08:42 2011
New Revision: 1170166

URL: http://svn.apache.org/viewvc?rev=1170166&view=rev
Log:
XLS: HyperlinkRecord: remove check for value in usKeyValue field because some (correct) files has unexpected value there

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java?rev=1170166&r1=1170165&r2=1170166&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java Tue Sep 13 13:08:42 2011
@@ -501,10 +501,9 @@ public final class HyperlinkRecord exten
                     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;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org