Fix bug #49219 - ExternalNameRecord can have a DDE Link entry without an operation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1082958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
263c8a28f4
commit
5d2184a007
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.8-beta2" date="2011-??-??">
|
<release version="3.8-beta2" date="2011-??-??">
|
||||||
|
<action dev="poi-developers" type="fix">49219 - ExternalNameRecord support for DDE Link entries without an operation</action>
|
||||||
<action dev="poi-developers" type="fix">50846 - More XSSFColor theme improvements, this time for Cell Borders</action>
|
<action dev="poi-developers" type="fix">50846 - More XSSFColor theme improvements, this time for Cell Borders</action>
|
||||||
<action dev="poi-developers" type="fix">50939 - ChartEndObjectRecord is supposed to have 6 bytes at the end, but handle it not</action>
|
<action dev="poi-developers" type="fix">50939 - ChartEndObjectRecord is supposed to have 6 bytes at the end, but handle it not</action>
|
||||||
<action dev="poi-developers" type="add">HMEF - New component which supports TNEF (Transport Neutral Encoding Format), aka winmail.dat</action>
|
<action dev="poi-developers" type="add">HMEF - New component which supports TNEF (Transport Neutral Encoding Format), aka winmail.dat</action>
|
||||||
|
@ -176,14 +176,16 @@ public final class ExternalNameRecord extends StandardRecord {
|
|||||||
// another switch: the fWantAdvise bit specifies whether the body describes
|
// another switch: the fWantAdvise bit specifies whether the body describes
|
||||||
// an external defined name or a DDE data item
|
// an external defined name or a DDE data item
|
||||||
if(isAutomaticLink()){
|
if(isAutomaticLink()){
|
||||||
//body specifies DDE data item
|
if(in.available() > 0) {
|
||||||
int nColumns = in.readUByte() + 1;
|
//body specifies DDE data item
|
||||||
int nRows = in.readShort() + 1;
|
int nColumns = in.readUByte() + 1;
|
||||||
|
int nRows = in.readShort() + 1;
|
||||||
int totalCount = nRows * nColumns;
|
|
||||||
_ddeValues = ConstantValueParser.parse(in, totalCount);
|
int totalCount = nRows * nColumns;
|
||||||
_nColumns = nColumns;
|
_ddeValues = ConstantValueParser.parse(in, totalCount);
|
||||||
_nRows = nRows;
|
_nColumns = nColumns;
|
||||||
|
_nRows = nRows;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
//body specifies an external defined name
|
//body specifies an external defined name
|
||||||
int formulaLen = in.readUShort();
|
int formulaLen = in.readUShort();
|
||||||
|
@ -2036,4 +2036,10 @@ if(1==2) {
|
|||||||
HSSFWorkbook wb = openSample("50939.xls");
|
HSSFWorkbook wb = openSample("50939.xls");
|
||||||
assertEquals(2, wb.getNumberOfSheets());
|
assertEquals(2, wb.getNumberOfSheets());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void test49219() throws Exception {
|
||||||
|
HSSFWorkbook wb = openSample("49219.xls");
|
||||||
|
assertEquals(1, wb.getNumberOfSheets());
|
||||||
|
assertEquals("DGATE", wb.getSheetAt(0).getRow(1).getCell(0).getStringCellValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
BIN
test-data/spreadsheet/49219.xls
Normal file
BIN
test-data/spreadsheet/49219.xls
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user