From: Nick Burch Date: Sun, 3 May 2015 07:59:18 +0000 (+0000) Subject: Ensure consistent ordering when writing out formats following changes in r1677368 X-Git-Tag: REL_3_12_FINAL~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6a0cc1587b756876e6e52af5ec6f8be286a72cc8;p=poi.git Ensure consistent ordering when writing out formats following changes in r1677368 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1677370 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java b/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java index 80b3a9ea93..3937e3eeab 100644 --- a/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java +++ b/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java @@ -378,10 +378,12 @@ public class StylesTable extends POIXMLDocumentPart { // Formats CTNumFmts formats = CTNumFmts.Factory.newInstance(); formats.setCount(numberFormats.size()); - for (Entry fmt : numberFormats.entrySet()) { - CTNumFmt ctFmt = formats.addNewNumFmt(); - ctFmt.setNumFmtId(fmt.getKey()); - ctFmt.setFormatCode(fmt.getValue()); + for (int fmtId=0; fmtId