mirror of https://github.com/apache/poi.git
hwpf: ignore null-reference to parent stylesheet (bug#50688)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1065535 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d86df59b57
commit
fa9b2060ee
|
@ -238,6 +238,10 @@ public final class StyleSheet implements HDFType {
|
|||
|
||||
}
|
||||
|
||||
if (parentPAP == null) {
|
||||
parentPAP = new ParagraphProperties();
|
||||
}
|
||||
|
||||
pap = ParagraphSprmUncompressor.uncompressPAP(parentPAP, papx, 2);
|
||||
sd.setPAP(pap);
|
||||
}
|
||||
|
|
|
@ -38,4 +38,13 @@ public final class TestWordExtractorBugs extends TestCase {
|
|||
extractor.getParagraphText();
|
||||
extractor.getTextFromPieces();
|
||||
}
|
||||
|
||||
public void testBug50688() throws Exception {
|
||||
WordExtractor extractor =
|
||||
new WordExtractor(POIDataSamples.getDocumentInstance().openResourceAsStream("parentinvguid.doc"));
|
||||
|
||||
// Check it gives text without error
|
||||
extractor.getText();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue