log.println("try to get value from property...");
UnoRuntime.queryInterface(XResultSet.class,oObj.getPropertyValue(propName));
log.println("try to get value from object relation...");
XResultSet newValue = UnoRuntime.queryInterface(XResultSet.class,tEnv.getObjRelation("MailMerge.XResultSet"));
log.println("set property to a new value...");
oObj.setPropertyValue(propName, newValue);
log.println("get the new value...");
XResultSet getValue = UnoRuntime.queryInterface(XResultSet.class,oObj.getPropertyValue(propName));
tRes.tested(propName, this.compare(newValue, getValue));
} catch (com.sun.star.beans.PropertyVetoException e){
log.println("could not set property '"+ propName +"' to a new value!");
tRes.tested(propName, false);
} catch (com.sun.star.lang.IllegalArgumentException e){
log.println("could not set property '"+ propName +"' to a new value!");
tRes.tested(propName, false);
} catch (com.sun.star.beans.UnknownPropertyException e){ if (this.isOptional(propName)){ // skipping optional property test
log.println("Property '" + propName
+ "' is optional and not supported");
tRes.tested(propName,true);
} else {
log.println("could not get property '"+ propName +"' from XPropertySet!");
tRes.tested(propName, false);
}
} catch (com.sun.star.lang.WrappedTargetException e){
log.println("could not get property '"+ propName +"' from XPropertySet!");
tRes.tested(propName, false);
}
}
log.println("try to get value from property...");
UnoRuntime.queryInterface(XConnection.class,oObj.getPropertyValue(propName));
log.println("try to get value from object relation...");
XConnection newValue = UnoRuntime.queryInterface(XConnection.class,tEnv.getObjRelation("MailMerge.XConnection"));
log.println("set property to a new value...");
oObj.setPropertyValue(propName, newValue);
log.println("get the new value...");
XConnection getValue = UnoRuntime.queryInterface(XConnection.class,oObj.getPropertyValue(propName));
tRes.tested(propName, this.compare(newValue, getValue));
} catch (com.sun.star.beans.PropertyVetoException e){
log.println("could not set property '"+ propName +"' to a new value! " + e.toString());
tRes.tested(propName, false);
} catch (com.sun.star.lang.IllegalArgumentException e){
log.println("could not set property '"+ propName +"' to a new value! " + e.toString());
tRes.tested(propName, false);
} catch (com.sun.star.beans.UnknownPropertyException e){ if (this.isOptional(propName)){ // skipping optional property test
log.println("Property '" + propName
+ "' is optional and not supported");
tRes.tested(propName,true);
} else {
log.println("could not get property '"+ propName +"' from XPropertySet!");
tRes.tested(propName, false);
}
} catch (com.sun.star.lang.WrappedTargetException e){
log.println("could not get property '"+ propName +"' from XPropertySet!");
tRes.tested(propName, false);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.