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
8eb1775b90
commit
89012851da
@ -318,7 +318,17 @@ public abstract class AbstractWordConverter
|
||||
|
||||
if ( previous != range.getStartOffset() )
|
||||
{
|
||||
Range subrange = new Range( previous, range.getEndOffset(), range )
|
||||
if ( previous > range.getEndOffset() )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
@Override
|
||||
public String toString()
|
||||
@ -327,6 +337,7 @@ public abstract class AbstractWordConverter
|
||||
}
|
||||
};
|
||||
processCharacters( document, currentTableLevel, subrange, block );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user