}
}
TextUserFieldDeclsElement userVariableElements = OdfElement.findFirstChildNode(TextUserFieldDeclsElement.class,
containerElement);
if (userVariableElements != null) {
TextUserFieldDeclElement userVariableElement = (TextUserFieldDeclElement) userVariableElements
.getFirstChild();
while (userVariableElement != null) {
if (name.equals(userVariableElement.getTextNameAttribute())) {
String type = userVariableElement.getOfficeValueTypeAttribute();
if(type.equalsIgnoreCase("string")){
String stringValue = userVariableElement.getOfficeStringValueAttribute();
return Fields.createUserVariableField(this, name, stringValue);
}
Double DoubleValue = userVariableElement.getOfficeValueAttribute();
DoubleValue.toString();
return Fields.createUserVariableField(this, name, DoubleValue.toString());
} else {
userVariableElement = (TextUserFieldDeclElement) userVariableElement.getNextSibling();
}
}
}
return null;
}