]> source.dussan.org Git - poi.git/commitdiff
additional check and workaround for wrong order (fix TestWordExtractorBugs.testBug50688)
authorSergey Vladimirov <sergey@apache.org>
Fri, 8 Jul 2011 15:41:40 +0000 (15:41 +0000)
committerSergey Vladimirov <sergey@apache.org>
Fri, 8 Jul 2011 15:41:40 +0000 (15:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144361 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/model/FieldsTables.java

index b6812f550f3acca20b74a071a1bb7854837662cd..3af6e0adec26ed8895398c6452806514e69e56af 100644 (file)
@@ -182,6 +182,13 @@ public class FieldsTables
                 GenericPropertyNode endNode = nodes[endNodePositionInArray];
                 PlexOfField endPlexOfField = new PlexOfField( endNode );
 
+                if ( endPlexOfField.getFld().getBoundaryType() != FieldDescriptor.FIELD_END_MARK )
+                {
+                    /* Not and ending mark */
+                    next++;
+                    continue;
+                }
+
                 Field field = new Field( startPlexOfField,
                         separatorPlexOfField, endPlexOfField );
                 result.add( field );