Double value = getDoubleValue();
if (value != null) {
setDisplayTextContent((new DecimalFormat(formatStr)).format(value.doubleValue()), null);
}
} else if (typeValue == OfficeValueTypeAttribute.Value.DATE) {
OdfNumberDateStyle dateStyle = new OdfNumberDateStyle((OdfFileDom) mCellElement.getOwnerDocument(),
formatStr, getUniqueDateStyleName(), null);
mCellElement.getAutomaticStyles().appendChild(dateStyle);
setDataDisplayStyleName(dateStyle.getStyleNameAttribute());
String dateStr = mCellElement.getOfficeDateValueAttribute();
if (dateStr != null) {
Calendar date = getDateValue();
setDisplayTextContent((new SimpleDateFormat(formatStr)).format(date.getTime()), null);
}
} else if (typeValue == OfficeValueTypeAttribute.Value.TIME) {
OdfNumberTimeStyle timeStyle = new OdfNumberTimeStyle((OdfFileDom) mCellElement.getOwnerDocument(),
formatStr, getUniqueDateStyleName());
mCellElement.getAutomaticStyles().appendChild(timeStyle);
setDataDisplayStyleName(timeStyle.getStyleNameAttribute());
String timeStr = mCellElement.getOfficeTimeValueAttribute();
if (timeStr != null) {
Calendar time = getTimeValue();
setDisplayTextContent((new SimpleDateFormat(formatStr)).format(time.getTime()), null);
}
} else if (typeValue == OfficeValueTypeAttribute.Value.PERCENTAGE) {
OdfNumberPercentageStyle dateStyle = new OdfNumberPercentageStyle((OdfFileDom) mCellElement
.getOwnerDocument(), formatStr, getUniquePercentageStyleName());
mCellElement.getAutomaticStyles().appendChild(dateStyle);
setDataDisplayStyleName(dateStyle.getStyleNameAttribute());
Double value = getPercentageValue();
if (value != null) {
setDisplayTextContent((new DecimalFormat(formatStr)).format(value.doubleValue()), null);
}
} else {