aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/poi/POIOLE2TextExtractor.java14
-rw-r--r--src/java/org/apache/poi/POITextExtractor.java18
-rw-r--r--src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java5
-rw-r--r--src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java3
4 files changed, 18 insertions, 22 deletions
diff --git a/src/java/org/apache/poi/POIOLE2TextExtractor.java b/src/java/org/apache/poi/POIOLE2TextExtractor.java
index 7679136c89..5dd1d755e3 100644
--- a/src/java/org/apache/poi/POIOLE2TextExtractor.java
+++ b/src/java/org/apache/poi/POIOLE2TextExtractor.java
@@ -33,16 +33,28 @@ import org.apache.poi.poifs.filesystem.DirectoryEntry;
* @see org.apache.poi.hwpf.extractor.WordExtractor
*/
public abstract class POIOLE2TextExtractor extends POITextExtractor {
+ /** The POIDocument that's open */
+ protected POIDocument document;
+
/**
* Creates a new text extractor for the given document
*
* @param document The POIDocument to use in this extractor.
*/
public POIOLE2TextExtractor(POIDocument document) {
- super(document);
+ this.document = document;
}
/**
+ * Creates a new text extractor, using the same
+ * document as another text extractor. Normally
+ * only used by properties extractors.
+ */
+ protected POIOLE2TextExtractor(POIOLE2TextExtractor otherExtractor) {
+ this.document = otherExtractor.document;
+ }
+
+ /**
* Returns the document information metadata for the document
*
* @return The Document Summary Information or null
diff --git a/src/java/org/apache/poi/POITextExtractor.java b/src/java/org/apache/poi/POITextExtractor.java
index e18078b461..6514ad5d18 100644
--- a/src/java/org/apache/poi/POITextExtractor.java
+++ b/src/java/org/apache/poi/POITextExtractor.java
@@ -31,24 +31,6 @@ import java.io.IOException;
* @see org.apache.poi.hwpf.extractor.WordExtractor
*/
public abstract class POITextExtractor implements Closeable {
- /** The POIDocument that's open */
- protected POIDocument document;
-
- /**
- * Creates a new text extractor for the given document
- */
- public POITextExtractor(POIDocument document) {
- this.document = document;
- }
- /**
- * Creates a new text extractor, using the same
- * document as another text extractor. Normally
- * only used by properties extractors.
- */
- protected POITextExtractor(POITextExtractor otherExtractor) {
- this.document = otherExtractor.document;
- }
-
/**
* Retrieves all the text from the document.
* How cells, paragraphs etc are separated in the text
diff --git a/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java b/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java
index 1a0db03897..b7967f333c 100644
--- a/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java
+++ b/src/java/org/apache/poi/hpsf/extractor/HPSFPropertiesExtractor.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import java.util.Iterator;
import org.apache.poi.POIDocument;
+import org.apache.poi.POIOLE2TextExtractor;
import org.apache.poi.POITextExtractor;
import org.apache.poi.hpsf.CustomProperties;
import org.apache.poi.hpsf.DocumentSummaryInformation;
@@ -39,10 +40,10 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
* build in and custom, returning them in
* textual form.
*/
-public class HPSFPropertiesExtractor extends POITextExtractor {
+public class HPSFPropertiesExtractor extends POIOLE2TextExtractor {
private Closeable toClose;
- public HPSFPropertiesExtractor(POITextExtractor mainExtractor) {
+ public HPSFPropertiesExtractor(POIOLE2TextExtractor mainExtractor) {
super(mainExtractor);
}
public HPSFPropertiesExtractor(POIDocument doc) {
diff --git a/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java b/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
index 889de20b4c..debeee92c4 100644
--- a/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
+++ b/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import org.apache.poi.POIDocument;
import org.apache.poi.POIOLE2TextExtractor;
import org.apache.poi.hpsf.DocumentSummaryInformation;
import org.apache.poi.hpsf.SummaryInformation;
@@ -75,7 +76,7 @@ public class EventBasedExcelExtractor extends POIOLE2TextExtractor implements or
public EventBasedExcelExtractor( DirectoryNode dir )
{
- super( null );
+ super( (POIDocument)null );
_dir = dir;
}