_istd = papx.getIstd();
}
+ protected Paragraph(PAPX papx, Range parent, int start)
+ {
+ super(Math.max(parent._start, start), Math.min(parent._end, papx.getEnd()), parent);
+ _props = papx.getParagraphProperties(_doc.getStyleSheet());
+ _papx = papx.getSprmBuf();
+ _istd = papx.getIstd();
+ }
+
public short getStyleIndex()
{
return _istd;
if (props.getIlfo() > 0) {
pap = new ListEntry(papx, this, _doc.getListTables());
} else {
- pap = new Paragraph(papx, this);
+ if (((index + _parStart)==0) && papx.getStart()>0) {
+ pap = new Paragraph(papx, this, 0);
+ } else {
+ pap = new Paragraph(papx, this);
+ }
}
return pap;
assertTrue(text.contains("\u0425\u0425\u0425\u0425\u0425"));
assertTrue(text.contains("\u0423\u0423\u0423\u0423\u0423"));
}
+
+ public void testFirstParagraphFix() throws Exception {
+ extractor = new WordExtractor(
+ POIDataSamples.getDocumentInstance().openResourceAsStream("MBD001D0B89.doc")
+ );
+
+ String text = extractor.getText();
+
+ assertTrue(text.startsWith("\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435"));
+ }
}