aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2014-07-18 15:59:55 +0000
committerNick Burch <nick@apache.org>2014-07-18 15:59:55 +0000
commit9f92157045050e039e6701fc3fe2a603bf032d9a (patch)
treeca87bf6c0b4b77d4b7c0b7ad23e4373e464b4f1c /src/testcases/org
parent6c05ec47f2e7bb42f630815cb9aba9a88f9197ad (diff)
downloadpoi-9f92157045050e039e6701fc3fe2a603bf032d9a.tar.gz
poi-9f92157045050e039e6701fc3fe2a603bf032d9a.zip
#56737 Sometimes Excel writes an internal reference to a local name in an odd way, without an ExternalNameRecord, try to detect and work around those
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1611681 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org')
-rw-r--r--src/testcases/org/apache/poi/hssf/model/TestLinkTable.java15
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java1
2 files changed, 12 insertions, 4 deletions
diff --git a/src/testcases/org/apache/poi/hssf/model/TestLinkTable.java b/src/testcases/org/apache/poi/hssf/model/TestLinkTable.java
index d62a80d72b..48c81ea0bb 100644
--- a/src/testcases/org/apache/poi/hssf/model/TestLinkTable.java
+++ b/src/testcases/org/apache/poi/hssf/model/TestLinkTable.java
@@ -27,7 +27,16 @@ import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
import org.apache.poi.hssf.HSSFTestDataSamples;
-import org.apache.poi.hssf.record.*;
+import org.apache.poi.hssf.record.BOFRecord;
+import org.apache.poi.hssf.record.CountryRecord;
+import org.apache.poi.hssf.record.EOFRecord;
+import org.apache.poi.hssf.record.ExternSheetRecord;
+import org.apache.poi.hssf.record.ExternalNameRecord;
+import org.apache.poi.hssf.record.NameCommentRecord;
+import org.apache.poi.hssf.record.NameRecord;
+import org.apache.poi.hssf.record.Record;
+import org.apache.poi.hssf.record.SSTRecord;
+import org.apache.poi.hssf.record.SupBookRecord;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.formula.ptg.NameXPtg;
@@ -230,7 +239,7 @@ public final class TestLinkTable extends TestCase {
//check that
assertEquals(0, tbl.resolveNameXIx(namex1.getSheetRefIndex(), namex1.getNameIndex()));
- assertEquals("ISODD", tbl.resolveNameXText(namex1.getSheetRefIndex(), namex1.getNameIndex()));
+ assertEquals("ISODD", tbl.resolveNameXText(namex1.getSheetRefIndex(), namex1.getNameIndex(), null));
assertNull(tbl.getNameXPtg("ISEVEN"));
NameXPtg namex2 = tbl.addNameXPtg("ISEVEN"); // adds two new rercords
@@ -256,7 +265,7 @@ public final class TestLinkTable extends TestCase {
assertTrue(wrl.get(7) instanceof EOFRecord);
assertEquals(0, tbl.resolveNameXIx(namex2.getSheetRefIndex(), namex2.getNameIndex()));
- assertEquals("ISEVEN", tbl.resolveNameXText(namex2.getSheetRefIndex(), namex2.getNameIndex()));
+ assertEquals("ISEVEN", tbl.resolveNameXText(namex2.getSheetRefIndex(), namex2.getNameIndex(), null));
}
}
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
index 5d03b45d3f..f9fac83d80 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
@@ -2619,7 +2619,6 @@ public final class TestBugs extends BaseTestBugzillaIssues {
* Currently failing with
* java.lang.RuntimeException: Unexpected eval class (org.apache.poi.ss.formula.eval.NameXEval)
*/
- @Ignore
@Test
public void bug56737() throws IOException {
Workbook wb = openSample("56737.xls");