assure("didn't gain correct target paragraph",
atarget.getText().equals(paraTxt2.getText()) );
}
public void contents_flows_from() {
XAccessibleRelationSet set = getAccessibleRelation(para2);
boolean res = true;
short[] relationtypes = new short[2];
XAccessibleText[] atargets = new XAccessibleText[2];
if (set != null) {
log.println("Count of relations "+set.getRelationCount());
assure("didn't gain correct count of relations",
set.getRelationCount() == 2);
try {
short tmprelation = set.getRelation(0).RelationType;
if ( tmprelation == 1 )
{
Object oTmp = set.getRelation(0).TargetSet[0];
atargets[0] = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
relationtypes[0] = tmprelation;
}
else if ( tmprelation == 2 )
{
Object oTmp = set.getRelation(0).TargetSet[0];
atargets[1] = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
relationtypes[1] = tmprelation;
}
else
{
assure("didn't gain correct relation type", false);
}
tmprelation = set.getRelation(1).RelationType;
if ( tmprelation == 1 )
{
Object oTmp = set.getRelation(1).TargetSet[0];
atargets[0] = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
relationtypes[0] = tmprelation;
}
else if ( tmprelation == 2 )
{
Object oTmp = set.getRelation(1).TargetSet[0];
atargets[1] = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
relationtypes[1] = tmprelation;
}
else
{