try {
XCell cell = oObj.getCellByPosition(0,0);
result = cell != null ;
log.println("Getting cell by position with a valid position ... OK");
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("Exception occurred while getting cell by position with a valid position");
e.printStackTrace(log);
result = false;
}
try {
oObj.getCellByPosition(-1,1);
log.println("No Exception occurred while getting cell by position with invalid position");
result &= false;
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("Getting cell by position with an invalid position ... OK");
result &= true;
}
String valid = (String) tEnv.getObjRelation("ValidRange"); if (valid == null ) valid = "A1:A1";
XCellRange range = oObj.getCellRangeByName(valid);
result = range != null ;
log.println("Getting cellrange by name with a valid name ... OK");
try {
XCellRange range = oObj.getCellRangeByPosition(0,0,0,0);
result = range != null;
log.println("Getting cellrange by Position with a valid position ... OK");
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("Exception occurred while getting cellrange by position with a valid position");
e.printStackTrace(log);
result = false;
}
try {
oObj.getCellRangeByPosition(-1,0,-1,1);
log.println("No Exception occurred while getting cellrange by position with invalid position");
result &= false;
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
log.println("Getting cellrange by position with an invalid position ... OK");
result &= true;
}
tRes.tested( "getCellRangeByPosition()", result );
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.