From: Sergey Vladimirov Date: Sun, 10 Jul 2011 13:08:11 +0000 (+0000) Subject: fix Word6/95 test cases: in old format boundaries in SEPX refers to chars, not to... X-Git-Tag: REL_3_8_BETA4~224 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f9644a18f447f13a87f46251e9ee8380f8a316af;p=poi.git fix Word6/95 test cases: in old format boundaries in SEPX refers to chars, not to bytes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144857 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java index 95ea86a630..348cb03504 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java @@ -74,17 +74,12 @@ public final class OldSectionTable extends SectionTable sepx = new SEPX(sed, startAt, endAt, charConv, buf); } - if ( tpt.isIndexInTable( sepx.getStartBytes(), sepx.getEndBytes() ) ) - { - _sections.add( sepx ); - } - else - { - logger.log( POILogger.WARN, "Section [", sepx.getStartBytes(), - "; ", sepx.getEndBytes(), - ") (bytes) doesn't have corresponding text pieces " - + "and will be skipped" ); - } + /* + * section descriptor in old Word files seems to refer to char + * indexes, not bytes positions. Check Word6.doc for example. - + * sergey + */ + _sections.add( sepx ); } Collections.sort( _sections, PropertyNode.StartComparator.instance ); }