Fix for corrupted list styles
This commit is contained in:
parent
512850e280
commit
079afa9b7a
1 changed files with 7 additions and 6 deletions
|
@ -102,15 +102,16 @@ public class ListCounter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPrefix() {
|
public String getPrefix() {
|
||||||
if (style.isNumber(nLevel)) {
|
if (style != null && style.isNumber(nLevel)) {
|
||||||
String sPrefix = style.getLevelProperty(nLevel,XMLString.STYLE_NUM_PREFIX);
|
String sPrefix = style.getLevelProperty(nLevel,XMLString.STYLE_NUM_PREFIX);
|
||||||
return sPrefix!=null ? sPrefix : "";
|
return sPrefix!=null ? sPrefix : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLabelAndSuffix() {
|
public String getLabelAndSuffix() {
|
||||||
if (style.isNumber(nLevel)) {
|
if (style != null && style.isNumber(nLevel)) {
|
||||||
String sLabel="";
|
String sLabel="";
|
||||||
if (sNumFormat[nLevel]==null) return "";
|
if (sNumFormat[nLevel]==null) return "";
|
||||||
int nLevels = Misc.getPosInteger(style.getLevelProperty(nLevel,
|
int nLevels = Misc.getPosInteger(style.getLevelProperty(nLevel,
|
||||||
|
@ -126,7 +127,7 @@ public class ListCounter {
|
||||||
if (sLabel.length()>0 && sSpace!=null) { sLabel+=sSpace; }
|
if (sLabel.length()>0 && sSpace!=null) { sLabel+=sSpace; }
|
||||||
return sLabel;
|
return sLabel;
|
||||||
}
|
}
|
||||||
else if (style.isBullet(nLevel)) {
|
else if (style != null && style.isBullet(nLevel)) {
|
||||||
return style.getLevelProperty(nLevel,XMLString.TEXT_BULLET_CHAR);
|
return style.getLevelProperty(nLevel,XMLString.TEXT_BULLET_CHAR);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue