import java.io.UnsupportedEncodingException;
import java.util.Iterator;
import java.util.Arrays;
+import java.util.ArrayList;
import org.apache.poi.POIOLE2TextExtractor;
import org.apache.poi.hwpf.HWPFDocument;
ret.append(getHeaderText());
- String[] text = getParagraphText();
- for(int i=0; i<text.length; i++) {
- ret.append(text[i]);
+ ArrayList<String> text = new ArrayList<String>();
+ text.addAll(Arrays.asList(getParagraphText()));
+ text.addAll(Arrays.asList(getFootnoteText()));
+ text.addAll(Arrays.asList(getEndnoteText()));
+
+ for(String p : text) {
+ ret.append(p);
}
ret.append(getFooterText());
node = (PropertyNode)rpl.get(x);
}
+ if (node.getEnd() <= start) {
+ return new int[] {rpl.size(), rpl.size()};
+ }
+
int y = x;
node = (PropertyNode)rpl.get(y);
while(node.getEnd() < end && y < rpl.size()-1)