]> source.dussan.org Git - poi.git/commitdiff
ignore PAPX if they references non-existing text parts
authorSergey Vladimirov <sergey@apache.org>
Tue, 5 Jul 2011 14:12:16 +0000 (14:12 +0000)
committerSergey Vladimirov <sergey@apache.org>
Tue, 5 Jul 2011 14:12:16 +0000 (14:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143069 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java

index 894210f4b3a1231a9de3be8633000654456ed50a..3923a1b3a5d1f51591e08c71fa4257da9055087f 100644 (file)
@@ -68,7 +68,10 @@ public class PAPBinTable
       for (int y = 0; y < fkpSize; y++)
       {
        PAPX papx = pfkp.getPAPX(y);
-        _paragraphs.add(papx);
+
+       //we don't need PAPX if they are references nowhere
+       if (tpt.isIndexInTable( papx.getStartBytes() ))
+           _paragraphs.add(papx);
       }
     }
     _dataStream = dataStream;