Document mDocument = ((Document) ((OdfFileDom) mElement
.getOwnerDocument()).getDocument());
if (typeValue == OfficeValueTypeAttribute.Value.FLOAT) {
String name = getDataDisplayStyleName();
OdfNumberStyle style = drawingShape.getOdfElement()
.getAutomaticStyles().getNumberStyle(name);
if (style == null) {
style = ((OdfSchemaDocument) mDocument).getDocumentStyles()
.getNumberStyle(name);
}
if (style != null) {
return style.getFormat();
}
} else if (typeValue == OfficeValueTypeAttribute.Value.DATE) {
String name = getDataDisplayStyleName();
OdfNumberDateStyle style = drawingShape.getOdfElement()
.getAutomaticStyles().getDateStyle(name);
if (style == null) {
style = ((OdfSchemaDocument) mDocument).getDocumentStyles()
.getDateStyle(name);
}
if (style != null) {
return style.getFormat();
}
} else if (typeValue == OfficeValueTypeAttribute.Value.TIME) {
String name = getDataDisplayStyleName();
OdfNumberDateStyle style = drawingShape.getOdfElement()
.getAutomaticStyles().getDateStyle(name);
if (style == null) {
style = ((OdfSchemaDocument) mDocument).getDocumentStyles()
.getDateStyle(name);
}
if (style != null) {
return style.getFormat();
}
} else if (typeValue == OfficeValueTypeAttribute.Value.PERCENTAGE) {
String name = getDataDisplayStyleName();
OdfNumberPercentageStyle style = drawingShape.getOdfElement()
.getAutomaticStyles().getPercentageStyle(name);
if (style == null) {
style = ((OdfSchemaDocument) mDocument).getDocumentStyles()
.getPercentageStyle(name);
}
if (style != null) {
return style.getFormat();
}
}
return null;
}