public void contents_flows_to() {
XAccessibleRelationSet set = getAccessibleRelation(para1);
boolean res = true;
short firstrelation=-1;
XAccessibleText atarget=null;
if (set != null) {
log.println("Count of relations "+set.getRelationCount());
assure("didn't gain correct count of relations",
set.getRelationCount() == 1);
try {
firstrelation = set.getRelation(0).RelationType;
Object oTmp = set.getRelation(0).TargetSet[0];
atarget = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
} catch (IndexOutOfBoundsException e) {
log.println("Exception when getting relations "+e);
res = false;
}
}
log.println("Expected for paragraph 0 "+types[2]);
log.println("gained for paragraph 0 "+types[firstrelation]);
res = types[2].equals(types[firstrelation]);
assure("didn't gain correct relation type",res);
log.println("Text of target paragraph "+atarget.getText());
XAccessibleText paraTxt2 =
(XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para2);
assure("didn't gain correct target paragraph",
atarget.getText().equals(paraTxt2.getText()) );
}