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:
Maxim Valyanskiy 2011-01-31 09:27:44 +00:00
parent d86df59b57
commit fa9b2060ee
3 changed files with 13 additions and 0 deletions

View File

@ -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);
}

View File

@ -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.