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:
Sergey Vladimirov 2011-07-25 10:40:02 +00:00
parent 8eb1775b90
commit 89012851da

View File

@ -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;
}