typeValue = OfficeValueTypeAttribute.Value.enumValueOf(type);
}
if (typeValue == OfficeValueTypeAttribute.Value.FLOAT) {
String name = getDataDisplayStyleName();
OdfNumberStyle style = mCellElement.getAutomaticStyles().getNumberStyle(name);
if (style == null) {
style = mDocument.getDocumentStyles().getNumberStyle(name);
}
if (style != null) {
return style.getFormat();
}
} else if (typeValue == OfficeValueTypeAttribute.Value.DATE) {
String name = getDataDisplayStyleName();
OdfNumberDateStyle style = mCellElement.getAutomaticStyles().getDateStyle(name);
if (style == null) {
style = mDocument.getDocumentStyles().getDateStyle(name);
}
if (style != null) {
return style.getFormat();
}
} else if (typeValue == OfficeValueTypeAttribute.Value.TIME) {
String name = getDataDisplayStyleName();
OdfNumberDateStyle style = mCellElement.getAutomaticStyles().getDateStyle(name);
if (style == null) {
style = mDocument.getDocumentStyles().getDateStyle(name);
}
if (style != null) {
return style.getFormat();
}
} else if (typeValue == OfficeValueTypeAttribute.Value.CURRENCY) {
String name = getCurrencyDisplayStyleName();
OdfNumberCurrencyStyle dataStyle = mCellElement.getAutomaticStyles().getCurrencyStyle(name);
if (dataStyle == null) {
dataStyle = mDocument.getDocumentStyles().getCurrencyStyle(name);
}
if (dataStyle != null) {
return dataStyle.getFormat();
}
} else if (typeValue == OfficeValueTypeAttribute.Value.PERCENTAGE) {
String name = getDataDisplayStyleName();
OdfNumberPercentageStyle style = mCellElement.getAutomaticStyles().getPercentageStyle(name);
if (style == null) {
style = mDocument.getDocumentStyles().getPercentageStyle(name);
}
if (style != null) {
return style.getFormat();
}
}
return null;
}