From f98a0aa4dfcd990bd25016164cfbb8df423eac97 Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Tue, 5 Jul 2011 14:12:16 +0000 Subject: [PATCH] ignore PAPX if they references non-existing text parts git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1143069 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/poi/hwpf/model/PAPBinTable.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java index 894210f4b3..3923a1b3a5 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java @@ -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; -- 2.39.5