diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java index 1431cff03..089207dfb 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java @@ -17,6 +17,8 @@ package org.apache.poi.hwpf.model; +import java.util.Collections; + import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.LittleEndian; @@ -62,5 +64,6 @@ public final class OldCHPBinTable extends CHPBinTable _textRuns.add(cfkp.getCHPX(y)); } } + Collections.sort( _textRuns, PropertyNode.StartComparator.instance ); } } diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/OldPAPBinTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/OldPAPBinTable.java index 37ec57557..b8b0fc3c2 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/OldPAPBinTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/OldPAPBinTable.java @@ -17,6 +17,8 @@ package org.apache.poi.hwpf.model; +import java.util.Collections; + import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.LittleEndian; @@ -54,6 +56,7 @@ public final class OldPAPBinTable extends PAPBinTable _paragraphs.add(papx); } } + Collections.sort( _paragraphs, PropertyNode.StartComparator.instance ); } } diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java index 8cc0c5b30..db84825e0 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java @@ -17,6 +17,8 @@ package org.apache.poi.hwpf.model; +import java.util.Collections; + import org.apache.poi.util.LittleEndian; /** @@ -66,6 +68,7 @@ public final class OldSectionTable extends SectionTable _sections.add(new SEPX(sed, startAt, endAt, charConv, buf)); } } + Collections.sort( _sections, PropertyNode.StartComparator.instance ); } private static class CharIsBytes implements CharIndexTranslator {