Fix bug (broken junit) introduced in r773412. Also hooked up test.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@773441 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
93c369411f
commit
df9cd1738e
@ -25,6 +25,7 @@ import org.apache.poi.hssf.record.BOFRecord;
|
|||||||
import org.apache.poi.hssf.record.EOFRecord;
|
import org.apache.poi.hssf.record.EOFRecord;
|
||||||
import org.apache.poi.hssf.record.Record;
|
import org.apache.poi.hssf.record.Record;
|
||||||
import org.apache.poi.hssf.record.RecordBase;
|
import org.apache.poi.hssf.record.RecordBase;
|
||||||
|
import org.apache.poi.hssf.record.UnknownRecord;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages the all the records associated with a chart sub-stream.<br/>
|
* Manages the all the records associated with a chart sub-stream.<br/>
|
||||||
@ -47,6 +48,11 @@ public final class ChartSubstreamRecordAggregate extends RecordAggregate {
|
|||||||
while (rs.peekNextClass() != EOFRecord.class) {
|
while (rs.peekNextClass() != EOFRecord.class) {
|
||||||
if (PageSettingsBlock.isComponentRecord(rs.peekNextSid())) {
|
if (PageSettingsBlock.isComponentRecord(rs.peekNextSid())) {
|
||||||
if (_psBlock != null) {
|
if (_psBlock != null) {
|
||||||
|
if (rs.peekNextSid() == UnknownRecord.HEADER_FOOTER_089C) {
|
||||||
|
// test samples: 45538_classic_Footer.xls, 45538_classic_Header.xls
|
||||||
|
_psBlock.addLateHeaderFooter(rs.getNext());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
"Found more than one PageSettingsBlock in chart sub-stream");
|
"Found more than one PageSettingsBlock in chart sub-stream");
|
||||||
}
|
}
|
||||||
|
@ -48,10 +48,7 @@ public final class HSSFTests {
|
|||||||
suite.addTest(AllUserModelTests.suite());
|
suite.addTest(AllUserModelTests.suite());
|
||||||
suite.addTest(AllRecordTests.suite());
|
suite.addTest(AllRecordTests.suite());
|
||||||
suite.addTest(AllHSSFUtilTests.suite());
|
suite.addTest(AllHSSFUtilTests.suite());
|
||||||
|
|
||||||
if (false) { // TODO - hook this test up
|
|
||||||
suite.addTest(new TestSuite(TestExcelExtractor.class));
|
suite.addTest(new TestSuite(TestExcelExtractor.class));
|
||||||
}
|
|
||||||
suite.addTest(new TestSuite(TestEventRecordFactory.class));
|
suite.addTest(new TestSuite(TestEventRecordFactory.class));
|
||||||
suite.addTest(new TestSuite(TestModelFactory.class));
|
suite.addTest(new TestSuite(TestModelFactory.class));
|
||||||
suite.addTest(AllSSFormulaTests.suite());
|
suite.addTest(AllSSFormulaTests.suite());
|
||||||
|
@ -165,7 +165,7 @@ public final class TestExcelExtractor extends TestCase {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testWithComments() throws Exception {
|
public void testWithComments() {
|
||||||
ExcelExtractor extractor = createExtractor("SimpleWithComments.xls");
|
ExcelExtractor extractor = createExtractor("SimpleWithComments.xls");
|
||||||
extractor.setIncludeSheetNames(false);
|
extractor.setIncludeSheetNames(false);
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ public final class TestExcelExtractor extends TestCase {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testWithBlank() throws Exception {
|
public void testWithBlank() {
|
||||||
ExcelExtractor extractor = createExtractor("MissingBits.xls");
|
ExcelExtractor extractor = createExtractor("MissingBits.xls");
|
||||||
String def = extractor.getText();
|
String def = extractor.getText();
|
||||||
extractor.setIncludeBlankCells(true);
|
extractor.setIncludeBlankCells(true);
|
||||||
@ -277,7 +277,7 @@ public final class TestExcelExtractor extends TestCase {
|
|||||||
/**
|
/**
|
||||||
* Test that we get text from headers and footers
|
* Test that we get text from headers and footers
|
||||||
*/
|
*/
|
||||||
public void test45538() throws Exception {
|
public void test45538() {
|
||||||
String[] files = {
|
String[] files = {
|
||||||
"45538_classic_Footer.xls", "45538_form_Footer.xls",
|
"45538_classic_Footer.xls", "45538_form_Footer.xls",
|
||||||
"45538_classic_Header.xls", "45538_form_Header.xls"
|
"45538_classic_Header.xls", "45538_form_Header.xls"
|
||||||
|
Loading…
Reference in New Issue
Block a user