diff --git a/source/java/writer2latex/office/ListCounter.java b/source/java/writer2latex/office/ListCounter.java index 541af33..88a24ec 100644 --- a/source/java/writer2latex/office/ListCounter.java +++ b/source/java/writer2latex/office/ListCounter.java @@ -102,15 +102,16 @@ public class ListCounter { } public String getPrefix() { - if (style.isNumber(nLevel)) { - String sPrefix = style.getLevelProperty(nLevel,XMLString.STYLE_NUM_PREFIX); - return sPrefix!=null ? sPrefix : ""; - } + if (style != null && style.isNumber(nLevel)) { + String sPrefix = style.getLevelProperty(nLevel,XMLString.STYLE_NUM_PREFIX); + return sPrefix!=null ? sPrefix : ""; + } + return ""; } public String getLabelAndSuffix() { - if (style.isNumber(nLevel)) { + if (style != null && style.isNumber(nLevel)) { String sLabel=""; if (sNumFormat[nLevel]==null) return ""; int nLevels = Misc.getPosInteger(style.getLevelProperty(nLevel, @@ -126,7 +127,7 @@ public class ListCounter { if (sLabel.length()>0 && sSpace!=null) { sLabel+=sSpace; } return sLabel; } - else if (style.isBullet(nLevel)) { + else if (style != null && style.isBullet(nLevel)) { return style.getLevelProperty(nLevel,XMLString.TEXT_BULLET_CHAR); } else {