ignore PAPX references zero-length text pieces
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1145281 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8371f13c4d
commit
984c180ade
@ -82,20 +82,32 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage {
|
|||||||
{
|
{
|
||||||
int startAt = getStart( x );
|
int startAt = getStart( x );
|
||||||
int endAt = getEnd( x );
|
int endAt = getEnd( x );
|
||||||
if ( !ignorePapxWithoutTextPieces
|
|
||||||
|| tpt.isIndexInTable( startAt, endAt ) )
|
if ( ignorePapxWithoutTextPieces
|
||||||
_papxList.add( new PAPX( startAt, endAt, tpt, getGrpprl( x ),
|
&& !tpt.isIndexInTable( startAt, endAt ) )
|
||||||
getParagraphHeight( x ), dataStream ) );
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
logger.log( POILogger.WARN, "PAPX [",
|
logger.log( POILogger.WARN, "PAPX [",
|
||||||
Integer.valueOf( startAt ), "; ",
|
Integer.valueOf( startAt ), "; ",
|
||||||
Integer.valueOf( endAt ),
|
Integer.valueOf( endAt ),
|
||||||
") (bytes) doesn't have corresponding text pieces "
|
") (bytes) doesn't have corresponding text pieces "
|
||||||
+ "and will be skipped" );
|
+ "and will be skipped" );
|
||||||
|
|
||||||
_papxList.add( null );
|
_papxList.add( null );
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PAPX papx = new PAPX( startAt, endAt, tpt, getGrpprl( x ),
|
||||||
|
getParagraphHeight( x ), dataStream );
|
||||||
|
|
||||||
|
if ( ignorePapxWithoutTextPieces
|
||||||
|
&& papx.getStart() == papx.getEnd() )
|
||||||
|
{
|
||||||
|
logger.log( POILogger.WARN, papx
|
||||||
|
+ " references zero-length range and will be skipped" );
|
||||||
|
_papxList.add( null );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
_papxList.add( papx );
|
||||||
}
|
}
|
||||||
_fkp = null;
|
_fkp = null;
|
||||||
_dataStream = dataStream;
|
_dataStream = dataStream;
|
||||||
|
Loading…
Reference in New Issue
Block a user