Author: nick
Date: Thu Jul 31 15:41:58 2014
New Revision: 1614926
URL: http://svn.apache.org/r1614926
Log:
Fix bug 54725 - HWPF where no parent style CHP exists, use an empty
set when processing the style to avoid a NPE
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java?rev=1614926&r1=1614925&r2=1614926&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java Thu
Jul 31 15:41:58 2014
@@ -278,14 +278,15 @@ public final class StyleSheet implements
CharacterProperties parentCHP = new CharacterProperties();
if(baseIndex != NIL_STYLE)
{
-
parentCHP = _styleDescriptions[baseIndex].getCHP();
if(parentCHP == null)
{
createChp(baseIndex);
parentCHP = _styleDescriptions[baseIndex].getCHP();
}
-
+ if(parentCHP == null) {
+ parentCHP = new CharacterProperties();
+ }
}
chp = CharacterSprmUncompressor.uncompressCHP(parentCHP, chpx, 0);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]