Index: src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java =================================================================== --- src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java (revision 996443) +++ src/scratchpad/src/org/apache/poi/hwpf/usermodel/Paragraph.java (working copy) @@ -435,15 +435,20 @@ } public int getIlfo() - { - return _props.getIlfo(); - } + { + return _props.getIlfo(); + } - public int getIlvl() - { - return _props.getIlvl(); - } + public int getIlvl() + { + return _props.getIlvl(); + } + public int getLvl() + { + return _props.getLvl(); + } + void setTableRowEnd(TableProperties props) { setTableRowEnd((byte)1); Index: src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java =================================================================== --- src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java (revision 996443) +++ src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java (working copy) @@ -35,7 +35,7 @@ this.field_17_fWidowControl = 1; this.field_21_lspd.setMultiLinespace((short)1); this.field_21_lspd.setDyaLine((short)240); - this.field_12_ilvl = (byte)9; + this.field_58_lvl = (byte)9; this.field_66_rgdxaTab = new int[0]; this.field_67_rgtbd = new byte[0]; this.field_63_dttmPropRMark = new DateAndTime(); Index: src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java =================================================================== --- src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java (revision 996443) +++ src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java (working copy) @@ -336,11 +336,11 @@ } break; case 0x40: - - //newPAP._lvl = param; - if (newPAP.getIstd () >= 1 && newPAP.getIstd () <= 9) + // this condition commented out, as Word seems to set outline levels even for paragraph with other styles than + // Heading 1..9, even though specification does not say so. See bug 49820 for discussion. + //if (newPAP.getIstd () < 1 && newPAP.getIstd () > 9) { - newPAP.setIlvl ((byte) sprm.getOperand()); + newPAP.setLvl ((byte) sprm.getOperand()); } break; case 0x41: