poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1142881 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
Date Tue, 05 Jul 2011 03:03:53 GMT
Author: sergey
Date: Tue Jul  5 03:03:53 2011
New Revision: 1142881

URL: http://svn.apache.org/viewvc?rev=1142881&view=rev
Log:
sometimes there is a lag between text pieces; for example
[0; 2), [2; 4), [6,8)
previous implementation correctly calculates next(2)=>2, but incorrectly next(4)=>4
(need to be 6).

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java?rev=1142881&r1=1142880&r2=1142881&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java Tue Jul  5
03:03:53 2011
@@ -240,7 +240,7 @@ public class TextPieceTable implements C
         for(TextPiece tp : _textPiecesFCOrder) {
 			int pieceStart = tp.getPieceDescriptor().getFilePosition();
 
-            if (bytePos > pieceStart + tp.bytesLength()) {
+            if (bytePos >= pieceStart + tp.bytesLength()) {
                 continue;
             }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message