* @param format
* the number format to be set.
*/
public void setNumberFormat(String format) {
if (getOwnerList().getType() == ListType.NUMBER) {
TextNumberElement textNumberElement = null;
Node child = listItemElement.getFirstChild();
if (child == null) {
textNumberElement = listItemElement.newTextNumberElement();
} else {
if (child instanceof TextNumberElement) {
textNumberElement = (TextNumberElement) child;
} else {
textNumberElement = ((OdfFileDom) listItemElement.getOwnerDocument())
.newOdfElement(TextNumberElement.class);
listItemElement.insertBefore(textNumberElement, child);
}
}
textNumberElement.setTextContent(format);
}
}