diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-12-22 03:51:51 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-12-22 03:51:51 +0000 |
commit | fe4a3b7596cae53b3cd69885c58ccce20b491b4e (patch) | |
tree | c0f5aae30d08a73e69138cea95baa947c3a82c10 /poi-examples | |
parent | 0b871a08c5031f9953f7e9a6e8dabfecb2f5cb70 (diff) | |
download | poi-fe4a3b7596cae53b3cd69885c58ccce20b491b4e.tar.gz poi-fe4a3b7596cae53b3cd69885c58ccce20b491b4e.zip |
small refactor of XSSFReader
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896259 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples')
-rw-r--r-- | poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java index 9a40e23f40..60246e07a3 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java @@ -27,7 +27,7 @@ import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackageAccess; import org.apache.poi.util.XMLHelper; import org.apache.poi.xssf.eventusermodel.XSSFReader; -import org.apache.poi.xssf.model.SharedStringsTable; +import org.apache.poi.xssf.model.SharedStrings; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; @@ -45,7 +45,7 @@ public class FromHowTo { public void processFirstSheet(String filename) throws Exception { try (OPCPackage pkg = OPCPackage.open(filename, PackageAccess.READ)) { XSSFReader r = new XSSFReader(pkg); - SharedStringsTable sst = r.getSharedStringsTable(); + SharedStrings sst = r.getSharedStringsTable(); XMLReader parser = fetchSheetParser(sst); @@ -60,7 +60,7 @@ public class FromHowTo { public void processAllSheets(String filename) throws Exception { try (OPCPackage pkg = OPCPackage.open(filename, PackageAccess.READ)) { XSSFReader r = new XSSFReader(pkg); - SharedStringsTable sst = r.getSharedStringsTable(); + SharedStrings sst = r.getSharedStringsTable(); XMLReader parser = fetchSheetParser(sst); @@ -76,7 +76,7 @@ public class FromHowTo { } } - public XMLReader fetchSheetParser(SharedStringsTable sst) throws SAXException, ParserConfigurationException { + public XMLReader fetchSheetParser(SharedStrings sst) throws SAXException, ParserConfigurationException { XMLReader parser = XMLHelper.newXMLReader(); ContentHandler handler = new SheetHandler(sst); parser.setContentHandler(handler); @@ -87,7 +87,7 @@ public class FromHowTo { * See org.xml.sax.helpers.DefaultHandler javadocs */ private static class SheetHandler extends DefaultHandler { - private final SharedStringsTable sst; + private final SharedStrings sst; private String lastContents; private boolean nextIsString; private boolean inlineStr; @@ -107,7 +107,7 @@ public class FromHowTo { } } - private SheetHandler(SharedStringsTable sst) { + private SheetHandler(SharedStrings sst) { this.sst = sst; } |