text.append(((CTText) o).getStringValue());
}
}
+
if (o instanceof CTPTab) {
text.append("\t");
}
+ if (o instanceof CTBr) {
+ text.append("\n");
+ }
if (o instanceof CTEmpty) {
// Some inline text elements get returned not as
// themselves, but as CTEmpty, owing to some odd
// definitions around line 5642 of the XSDs
+ // This bit works around it, and replicates the above
+ // rules for that case
String tagName = o.getDomNode().getNodeName();
if ("w:tab".equals(tagName)) {
text.append("\t");
ps++;
}
}
- assertEquals(103, ps);
+ assertEquals(134, ps);
}
public void testGetWithHyperlinks() {
"\n" +
"More on page one\n" +
"\n\n" +
- "End of page 1\n\n" +
+ "End of page 1\n\n\n" +
"This is page two. It also has a three column heading, and a three column footer.\n" +
"Footer Left\tFooter Middle\tFooter Right\n",
extractor.getText()
"\n" +
"More on page one\n" +
"\n\n" +
- "End of page 1\n\n" +
+ "End of page 1\n\n\n" +
"This is page two. It also has a three column heading, and a three column footer.\n" +
"The footer of the first page\n" +
"Footer Left\tFooter Middle\tFooter Right\n",