mirror of https://github.com/apache/poi.git
correctly hangle out-of-boundaries cases for bookmarks and fields in Word-to-* converters
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1150622 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
369841ab90
commit
f63f2bdbc3
|
@ -318,15 +318,26 @@ public abstract class AbstractWordConverter
|
|||
|
||||
if ( previous != range.getStartOffset() )
|
||||
{
|
||||
Range subrange = new Range( previous, range.getEndOffset(), range )
|
||||
if ( previous > range.getEndOffset() )
|
||||
{
|
||||
@Override
|
||||
public String toString()
|
||||
logger.log( POILogger.WARN, "Latest structure in " + range
|
||||
+ " ended after range (" + previous + ")" );
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( previous < range.getEndOffset() )
|
||||
{
|
||||
Range subrange = new Range( previous, range.getEndOffset(),
|
||||
range )
|
||||
{
|
||||
return "AfterStructureSubrange " + super.toString();
|
||||
}
|
||||
};
|
||||
processCharacters( document, currentTableLevel, subrange, block );
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "AfterStructureSubrange " + super.toString();
|
||||
}
|
||||
};
|
||||
processCharacters( document, currentTableLevel, subrange, block );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue