protected void setFormProperty(String formPropertyName,
String officeValueType, String officeStringValue,
Boolean officeBooleanValue, String officeDateValue,
String officeTimeValue, Double officeValue, String officeCurrency) {
FormPropertiesElement parentEle = getFormPropertiesElementForWrite();
// find the existing property with the appointed form property name
NodeList properties = parentEle.getChildNodes();
FormPropertyElement formProperty = null;
for (int i = 0; i < properties.getLength(); i++) {
FormPropertyElement property = (FormPropertyElement) properties
.item(i);
if (property.getFormPropertyNameAttribute()
.equals(formPropertyName)) {
formProperty = (FormPropertyElement) properties.item(i);
break;
}
}
// create a new property
if (formProperty == null) {
org.w3c.dom.Document ownerDocument = parentEle.getOwnerDocument();
formProperty = ((OdfFileDom) ownerDocument)
.newOdfElement(FormPropertyElement.class);
formProperty.setFormPropertyNameAttribute(formPropertyName);
formProperty.setOfficeValueTypeAttribute(officeValueType);
}