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
9269c0850c
commit
40dbadc49e
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
BIN
test-data/document/parentinvguid.doc
Normal file
BIN
test-data/document/parentinvguid.doc
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user