XLS: HyperlinkRecord: remove check for value in usKeyValue field because some (correct) files has unexpected value there

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1170166 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maxim Valyanskiy 2011-09-13 13:08:42 +00:00
parent 57f40b0e3f
commit 1fbf6e4ae8

View File

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