]> source.dussan.org Git - poi.git/commitdiff
fix Word6/95 test cases: in old format boundaries in SEPX refers to chars, not to...
authorSergey Vladimirov <sergey@apache.org>
Sun, 10 Jul 2011 13:08:11 +0000 (13:08 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sun, 10 Jul 2011 13:08:11 +0000 (13:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144857 13f79535-47bb-0310-9956-ffa450edef68

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

index 95ea86a630fdda86114fcbfdd3b42c1bcf477893..348cb0350476cb86e6a6442caa5831510309d107 100644 (file)
@@ -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 );
   }