poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1147127 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Field.java
Date Fri, 15 Jul 2011 12:45:45 GMT
Author: sergey
Date: Fri Jul 15 12:45:44 2011
New Revision: 1147127

URL: http://svn.apache.org/viewvc?rev=1147127&view=rev
Log:
prevent extra text in field

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

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Field.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Field.java?rev=1147127&r1=1147126&r2=1147127&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Field.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/Field.java Fri Jul 15 12:45:44
2011
@@ -41,7 +41,12 @@ public class Field
 
     public int getEndOffset()
     {
-        return endPlex.getFcEnd();
+        /*
+         * sometimes plex looks like [100, 2000), where 100 is the position of
+         * field-end character, and 2000 - some other char position, far away
+         * from field (not inside). So taking into account only start --sergey
+         */
+        return endPlex.getFcStart() + 1;
     }
 
     public boolean hasSeparator()



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


Mime
View raw message