sort CHPX / PAPX / SEPX tables for Word95 files as well

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1144680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sergey Vladimirov 2011-07-09 14:42:37 +00:00
parent c2d4b6babe
commit 1272107604
3 changed files with 9 additions and 0 deletions

View 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 );
}
}

View 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 );
}
}

View 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 {