mirror of https://github.com/apache/poi.git
test for TIKA-3163
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903775 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
325c7cb81c
commit
30a0a4362a
|
@ -96,7 +96,9 @@ import org.apache.poi.xssf.SXSSFITestDataProvider;
|
||||||
import org.apache.poi.xssf.XLSBUnsupportedException;
|
import org.apache.poi.xssf.XLSBUnsupportedException;
|
||||||
import org.apache.poi.xssf.XSSFITestDataProvider;
|
import org.apache.poi.xssf.XSSFITestDataProvider;
|
||||||
import org.apache.poi.xssf.XSSFTestDataSamples;
|
import org.apache.poi.xssf.XSSFTestDataSamples;
|
||||||
|
import org.apache.poi.xssf.eventusermodel.XSSFReader;
|
||||||
import org.apache.poi.xssf.model.CalculationChain;
|
import org.apache.poi.xssf.model.CalculationChain;
|
||||||
|
import org.apache.poi.xssf.model.StylesTable;
|
||||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||||
import org.apache.poi.xssf.usermodel.extensions.XSSFCellFill;
|
import org.apache.poi.xssf.usermodel.extensions.XSSFCellFill;
|
||||||
import org.apache.xmlbeans.XmlException;
|
import org.apache.xmlbeans.XmlException;
|
||||||
|
@ -3724,4 +3726,22 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testTika3163() throws Exception {
|
||||||
|
File file = XSSFTestDataSamples.getSampleFile("CVLKRA-KYC_Download_File_Structure_V3.1.xlsx");
|
||||||
|
try (
|
||||||
|
FileInputStream fis = new FileInputStream(file);
|
||||||
|
XSSFWorkbook workbook = new XSSFWorkbook(fis)
|
||||||
|
) {
|
||||||
|
assertNotNull(workbook.getStylesSource());
|
||||||
|
assertEquals(23, workbook.getStylesSource().getFonts().size());
|
||||||
|
}
|
||||||
|
try (OPCPackage pkg = OPCPackage.open(file, PackageAccess.READ)) {
|
||||||
|
XSSFReader reader = new XSSFReader(pkg);
|
||||||
|
StylesTable stylesTable = reader.getStylesTable();
|
||||||
|
assertNotNull(stylesTable);
|
||||||
|
assertEquals(23, stylesTable.getFonts().size());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Binary file not shown.
Loading…
Reference in New Issue