mirror of https://github.com/apache/poi.git
workaround for NPE caused by old Word format
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1142760 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
379844492d
commit
6f98350f11
|
@ -57,7 +57,13 @@ public final class CHPX extends BytePropertyNode
|
|||
|
||||
public CharacterProperties getCharacterProperties(StyleSheet ss, short istd)
|
||||
{
|
||||
CharacterProperties baseStyle = ss.getCharacterStyle(istd);
|
||||
CharacterProperties baseStyle;
|
||||
if (ss == null) {
|
||||
//old document format
|
||||
baseStyle = new CharacterProperties();
|
||||
} else {
|
||||
baseStyle = ss.getCharacterStyle(istd);
|
||||
}
|
||||
CharacterProperties props = CharacterSprmUncompressor.uncompressCHP(baseStyle, getGrpprl(), 0);
|
||||
return props;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue