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
f26b6efa29
commit
a57c397517
@ -57,7 +57,13 @@ public final class CHPX extends BytePropertyNode
|
|||||||
|
|
||||||
public CharacterProperties getCharacterProperties(StyleSheet ss, short istd)
|
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);
|
CharacterProperties props = CharacterSprmUncompressor.uncompressCHP(baseStyle, getGrpprl(), 0);
|
||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user