// write to log what we try next
log.println( "test for createTextCursor()" );
oCursor = oObj.createTextCursor();
// write to log what we try next
log.println( "test for insertTextContent()" ); try {
oObj.insertTextContent(oCursor, (XTextContent)oInt, false);
} catch( com.sun.star.lang.IllegalArgumentException iaE ){ thrownew StatusException("Couldn't insert textcontent",iaE);
}
// get indexaccess to the tablecollection
XIndexAccess xIA = info.getCollection();
// this comparison works just because it has to be at least one // table at this point regardless which thread inserted it // there is although the possibility that the first threads call // failed, the second not and comparison happens after second threads // otherwise if something fails it should have thrown an exception //tRes.tested("insertTextContent()", xIA.getCount() > 0 );
if (xIA != null ) {
result = (xIA.getCount()>0);
} else {
result = true;
}
if (!result) log.println("The TextContent wasn't inserted");
// try to insert an invalid TextContent
log.println( "test for insertTextContent" ); try {
oObj.insertTextContent(oCursor, null, false);
log.println("The expected Exception doesn't occurred");
result &= false;
} catch( com.sun.star.lang.IllegalArgumentException iaE ){ // Some exception.FAILED
log.println("Expected Exception occurred");
String msg = iaE.getMessage(); if (msg.equals("")) {
log.println("But there is not detailed message");
} else {
log.println("Detailed message: "+msg);
}
// leads to a method which should be called previously
requiredMethod( "insertTextContent()" );
// write to log what we try next
log.println( "test for removeTextContent" ); try {
oObj.removeTextContent( (XTextContent)oInt );
} catch( com.sun.star.container.NoSuchElementException nseE ){ // Some exception.FAILED
log.println(nseE.toString()); return;
}
// no exception occurred so it works
tRes.tested( "removeTextContent()", true );
}
} // finish class _XText
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-09-07)
¤
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.