Fix bug #47034 - Reading the name of a NameRecord when the name is > 127
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@765163 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
344e422785
commit
be1fb69d9b
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
<!-- Don't forget to update status.xml too! -->
|
<!-- Don't forget to update status.xml too! -->
|
||||||
<release version="3.5-beta6" date="2009-??-??">
|
<release version="3.5-beta6" date="2009-??-??">
|
||||||
|
<action dev="POI-DEVELOPERS" type="fix">47034 - Fix reading the name of a NameRecord when the name is very long</action>
|
||||||
<action dev="POI-DEVELOPERS" type="fix">47001 - Fixed WriteAccessRecord and LinkTable to handle unusual format written by Google Docs</action>
|
<action dev="POI-DEVELOPERS" type="fix">47001 - Fixed WriteAccessRecord and LinkTable to handle unusual format written by Google Docs</action>
|
||||||
<action dev="POI-DEVELOPERS" type="fix">46973 - Fixed defined names to behave better when refersToFormula is unset</action>
|
<action dev="POI-DEVELOPERS" type="fix">46973 - Fixed defined names to behave better when refersToFormula is unset</action>
|
||||||
<action dev="POI-DEVELOPERS" type="fix">46832 - Allow merged regions with columns greater than 255 or rows bigger than 65536 in XSSF</action>
|
<action dev="POI-DEVELOPERS" type="fix">46832 - Allow merged regions with columns greater than 255 or rows bigger than 65536 in XSSF</action>
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
<!-- Don't forget to update changes.xml too! -->
|
<!-- Don't forget to update changes.xml too! -->
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.5-beta6" date="2009-??-??">
|
<release version="3.5-beta6" date="2009-??-??">
|
||||||
|
<action dev="POI-DEVELOPERS" type="fix">47034 - Fix reading the name of a NameRecord when the name is very long</action>
|
||||||
<action dev="POI-DEVELOPERS" type="fix">47001 - Fixed WriteAccessRecord and LinkTable to handle unusual format written by Google Docs</action>
|
<action dev="POI-DEVELOPERS" type="fix">47001 - Fixed WriteAccessRecord and LinkTable to handle unusual format written by Google Docs</action>
|
||||||
<action dev="POI-DEVELOPERS" type="fix">46973 - Fixed defined names to behave better when refersToFormula is unset</action>
|
<action dev="POI-DEVELOPERS" type="fix">46973 - Fixed defined names to behave better when refersToFormula is unset</action>
|
||||||
<action dev="POI-DEVELOPERS" type="fix">46832 - Allow merged regions with columns greater than 255 or rows bigger than 65536 in XSSF</action>
|
<action dev="POI-DEVELOPERS" type="fix">46832 - Allow merged regions with columns greater than 255 or rows bigger than 65536 in XSSF</action>
|
||||||
|
@ -416,7 +416,7 @@ public final class NameRecord extends StandardRecord {
|
|||||||
LittleEndianInput in = ris;
|
LittleEndianInput in = ris;
|
||||||
field_1_option_flag = in.readShort();
|
field_1_option_flag = in.readShort();
|
||||||
field_2_keyboard_shortcut = in.readByte();
|
field_2_keyboard_shortcut = in.readByte();
|
||||||
int field_3_length_name_text = in.readByte();
|
int field_3_length_name_text = in.readUByte();
|
||||||
int field_4_length_name_definition = in.readShort();
|
int field_4_length_name_definition = in.readShort();
|
||||||
field_5_externSheetIndex_plus1 = in.readShort();
|
field_5_externSheetIndex_plus1 = in.readShort();
|
||||||
field_6_sheetNumber = in.readUShort();
|
field_6_sheetNumber = in.readUShort();
|
||||||
|
BIN
src/testcases/org/apache/poi/hssf/data/47034.xls
Normal file
BIN
src/testcases/org/apache/poi/hssf/data/47034.xls
Normal file
Binary file not shown.
@ -1479,4 +1479,14 @@ public final class TestBugs extends BaseTestBugzillaIssues {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* java.lang.NegativeArraySizeException reading long
|
||||||
|
* non-unicode data for a name record
|
||||||
|
*/
|
||||||
|
public void test47034() throws IOException {
|
||||||
|
HSSFWorkbook wb = openSample("47034.xls");
|
||||||
|
assertEquals(893, wb.getNumberOfNames());
|
||||||
|
assertEquals("Matthew\\Matthew11_1\\Matthew2331_1\\Matthew2351_1\\Matthew2361_1___lab", wb.getNameName(300));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user