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
This commit is contained in:
parent
a5407bd08f
commit
ba0be2ca2d
@ -74,18 +74,13 @@ public final class OldSectionTable extends SectionTable
|
|||||||
sepx = new SEPX(sed, startAt, endAt, charConv, buf);
|
sepx = new SEPX(sed, startAt, endAt, charConv, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( tpt.isIndexInTable( sepx.getStartBytes(), sepx.getEndBytes() ) )
|
/*
|
||||||
{
|
* section descriptor in old Word files seems to refer to char
|
||||||
|
* indexes, not bytes positions. Check Word6.doc for example. -
|
||||||
|
* sergey
|
||||||
|
*/
|
||||||
_sections.add( sepx );
|
_sections.add( sepx );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
logger.log( POILogger.WARN, "Section [", sepx.getStartBytes(),
|
|
||||||
"; ", sepx.getEndBytes(),
|
|
||||||
") (bytes) doesn't have corresponding text pieces "
|
|
||||||
+ "and will be skipped" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Collections.sort( _sections, PropertyNode.StartComparator.instance );
|
Collections.sort( _sections, PropertyNode.StartComparator.instance );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user