XSSFReader extensibility

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894513 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-10-23 14:23:19 +00:00
parent 9f6f11023a
commit c1ae6ef0e9
2 changed files with 8 additions and 8 deletions

View File

@ -127,12 +127,12 @@ public class XSSFBReader extends XSSFReader {
}
@Override
Set<String> getSheetRelationships() {
protected Set<String> getSheetRelationships() {
return WORKSHEET_RELS;
}
@Override
Iterator<XSSFSheetRef> createSheetIteratorFromWB(PackagePart wb) throws IOException {
protected Iterator<XSSFSheetRef> createSheetIteratorFromWB(PackagePart wb) throws IOException {
SheetRefLoader sheetRefLoader = new SheetRefLoader(wb.getInputStream());
sheetRefLoader.parse();
return sheetRefLoader.getSheets().iterator();

View File

@ -215,26 +215,26 @@ public class XSSFReader {
/**
* Maps relId and the corresponding PackagePart
*/
private final Map<String, PackagePart> sheetMap;
protected final Map<String, PackagePart> sheetMap;
/**
* Current sheet reference
*/
XSSFSheetRef xssfSheetRef;
protected XSSFSheetRef xssfSheetRef;
/**
* Iterator over CTSheet objects, returns sheets in {@code logical} order.
* We can't rely on the Ooxml4J's relationship iterator because it returns objects in physical order,
* i.e. as they are stored in the underlying package
*/
final Iterator<XSSFSheetRef> sheetIterator;
protected final Iterator<XSSFSheetRef> sheetIterator;
/**
* Construct a new SheetIterator
*
* @param wb package part holding workbook.xml
*/
SheetIterator(PackagePart wb) throws IOException {
protected SheetIterator(PackagePart wb) throws IOException {
/*
* The order of sheets is defined by the order of CTSheet elements in workbook.xml
@ -259,7 +259,7 @@ public class XSSFReader {
}
}
Iterator<XSSFSheetRef> createSheetIteratorFromWB(PackagePart wb) throws IOException {
protected Iterator<XSSFSheetRef> createSheetIteratorFromWB(PackagePart wb) throws IOException {
XMLSheetRefReader xmlSheetRefReader = new XMLSheetRefReader();
XMLReader xmlReader;
@ -294,7 +294,7 @@ public class XSSFReader {
*
* @return all relationships that are sheet-like
*/
Set<String> getSheetRelationships() {
protected Set<String> getSheetRelationships() {
return WORKSHEET_RELS;
}