aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorJosh Micich <josh@apache.org>2009-06-18 21:01:13 +0000
committerJosh Micich <josh@apache.org>2009-06-18 21:01:13 +0000
commit3c74d4f9e4c38d0f9f94b114b686c85e85abbc92 (patch)
treedf10348ed051284a894e9ad28dc43281e60c6b80 /src/java/org/apache
parenta275338291635177d92945705f9add7f85031c46 (diff)
downloadpoi-3c74d4f9e4c38d0f9f94b114b686c85e85abbc92.tar.gz
poi-3c74d4f9e4c38d0f9f94b114b686c85e85abbc92.zip
Bugzilla 47384 - Fixed ExternalNameRecord to handle unicode names
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@786267 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rwxr-xr-xsrc/java/org/apache/poi/hssf/record/ExternalNameRecord.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/java/org/apache/poi/hssf/record/ExternalNameRecord.java b/src/java/org/apache/poi/hssf/record/ExternalNameRecord.java
index 0ac34880d5..3c7d94354c 100755
--- a/src/java/org/apache/poi/hssf/record/ExternalNameRecord.java
+++ b/src/java/org/apache/poi/hssf/record/ExternalNameRecord.java
@@ -135,8 +135,13 @@ public final class ExternalNameRecord extends StandardRecord {
field_1_option_flag = in.readShort();
field_2_index = in.readShort();
field_3_not_used = in.readShort();
- short nameLength = in.readShort();
- field_4_name = in.readCompressedUnicode(nameLength);
+ int nameLength = in.readUByte();
+ int multibyteFlag = in.readUByte();
+ if (multibyteFlag == 0) {
+ field_4_name = in.readCompressedUnicode(nameLength);
+ } else {
+ field_4_name = in.readUnicodeLEString(nameLength);
+ }
if(!hasFormula()) {
if (!isStdDocumentNameIdentifier() && !isOLELink() && isAutomaticLink()) {
// both need to be incremented