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,15 +318,26 @@ public abstract class AbstractWordConverter
|
|||||||
|
|
||||||
if ( previous != range.getStartOffset() )
|
if ( previous != range.getStartOffset() )
|
||||||
{
|
{
|
||||||
Range subrange = new Range( previous, range.getEndOffset(), range )
|
if ( previous > range.getEndOffset() )
|
||||||
{
|
{
|
||||||
@Override
|
logger.log( POILogger.WARN, "Latest structure in " + range
|
||||||
public String toString()
|
+ " ended after range (" + previous + ")" );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( previous < range.getEndOffset() )
|
||||||
|
{
|
||||||
|
Range subrange = new Range( previous, range.getEndOffset(),
|
||||||
|
range )
|
||||||
{
|
{
|
||||||
return "AfterStructureSubrange " + super.toString();
|
@Override
|
||||||
}
|
public String toString()
|
||||||
};
|
{
|
||||||
processCharacters( document, currentTableLevel, subrange, block );
|
return "AfterStructureSubrange " + super.toString();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
processCharacters( document, currentTableLevel, subrange, block );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user