poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r1305810 - in /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf: converter/AbstractWordUtils.java usermodel/Paragraph.java
Date Tue, 27 Mar 2012 11:14:47 GMT
Author: maxcom
Date: Tue Mar 27 11:14:47 2012
New Revision: 1305810

URL: http://svn.apache.org/viewvc?rev=1305810&view=rev
Log:
HWPF: fix NPE when reading paragraph properties

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java?rev=1305810&r1=1305809&r2=1305810&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java Tue
Mar 27 11:14:47 2012
@@ -232,7 +232,7 @@ public class AbstractWordUtils
         final ListLevel listLevel = listTables.getLevel( listId,
                 paragraph.getIlvl() );
 
-        if ( listLevel.getNumberText() == null )
+        if ( listLevel==null || listLevel.getNumberText() == null )
             return EMPTY;
 
         StringBuffer bulletBuffer = new StringBuffer();

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java?rev=1305810&r1=1305809&r2=1305810&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java Tue Mar 27 11:14:47
2012
@@ -110,7 +110,7 @@ public class Paragraph extends Range imp
             final ListLevel listLevel = listTables.getLevel(
                     listFormatOverride.getLsid(), properties.getIlvl() );
 
-            if ( listLevel.getGrpprlPapx() != null )
+            if ( listLevel!=null && listLevel.getGrpprlPapx() != null )
             {
                 properties = ParagraphSprmUncompressor.uncompressPAP(
                         properties, listLevel.getGrpprlPapx(), 0 );



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message