aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java12
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java2
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java2
3 files changed, 8 insertions, 8 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;
}
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
index bb795333ed..bc1bad8abf 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
@@ -120,7 +120,7 @@ public class XSSFReader {
* returns a handy object for working with
* shared strings.
*/
- public SharedStringsTable getSharedStringsTable() throws IOException, InvalidFormatException {
+ public SharedStrings getSharedStringsTable() throws IOException, InvalidFormatException {
ArrayList<PackagePart> parts = pkg.getPartsByContentType(XSSFRelation.SHARED_STRINGS.getContentType());
return parts.size() == 0 ? null : new SharedStringsTable(parts.get(0));
}
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java
index 3e1bfa50f6..1b02f66108 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java
@@ -102,7 +102,7 @@ public final class TestXSSFReader {
XSSFReader r = new XSSFReader(pkg);
- assertEquals(11, r.getSharedStringsTable().getSharedStringItems().size());
+ assertEquals(11, r.getSharedStringsTable().getCount());
assertEquals("Test spreadsheet", r.getSharedStringsTable().getItemAt(0).toString());
}
}