]> source.dussan.org Git - poi.git/commitdiff
sort CHPX / PAPX / SEPX tables for Word95 files as well
authorSergey Vladimirov <sergey@apache.org>
Sat, 9 Jul 2011 14:42:37 +0000 (14:42 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sat, 9 Jul 2011 14:42:37 +0000 (14:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144680 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/model/OldCHPBinTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/OldPAPBinTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/OldSectionTable.java

index 1431cff0321cb04326e08d00042caac10a90e383..089207dfb216b532a93af78a14875e1ca245c698 100644 (file)
@@ -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 );
   }
 }
index 37ec57557d52acd4260603bc645dd0a4655a1675..b8b0fc3c23a76478a725b8215179e54f82da9937 100644 (file)
@@ -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 );
   }
 }
 
index 8cc0c5b3032bf51b23dc63e0374a467838ae86c2..db84825e08a8db9def2139960953304d4636a819 100644 (file)
@@ -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 {