allow subclassing of code to gen comments table

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886547 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-02-15 21:48:26 +00:00
parent 0ce6ceb3ea
commit 0df893124a
1 changed files with 6 additions and 1 deletions

View File

@ -353,7 +353,7 @@ public class XSSFReader {
PackageRelationship comments = commentsList.getRelationship(0);
PackagePartName commentsName = PackagingURIHelper.createPartName(comments.getTargetURI());
PackagePart commentsPart = sheetPkg.getPackage().getPart(commentsName);
return new CommentsTable(commentsPart);
return parseComments(commentsPart);
}
} catch (InvalidFormatException|IOException e) {
LOGGER.log(POILogger.WARN, e);
@ -362,6 +362,11 @@ public class XSSFReader {
return null;
}
//to allow subclassing
protected CommentsTable parseComments(PackagePart commentsPart) throws IOException {
return new CommentsTable(commentsPart);
}
/**
* Returns the shapes associated with this sheet,
* an empty list or null if there is an exception