diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-02-15 21:48:26 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-02-15 21:48:26 +0000 |
commit | 0df893124a48144b8e02fc71cf2b06af9ea339a9 (patch) | |
tree | fc0d2b62af79ae67e53821ebf904a0b1124ceb22 | |
parent | 0ce6ceb3ea48a1e89ad164652097f6453e196186 (diff) | |
download | poi-0df893124a48144b8e02fc71cf2b06af9ea339a9.tar.gz poi-0df893124a48144b8e02fc71cf2b06af9ea339a9.zip |
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
-rw-r--r-- | src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java index 3a13bfb07e..58dc00a5b0 100644 --- a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java +++ b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java @@ -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 |