if (frames.getCount() > 1) {
try {
if (activeIdx != 0)
try {
sFrame = (XFrame) AnyConverter.toObject(
new Type(XFrame.class),frames.getByIndex(0));
} catch (com.sun.star.lang.IllegalArgumentException iae) {
log.println("Can't convert any");
}
else
try {
sFrame = (XFrame) AnyConverter.toObject(
new Type(XFrame.class),frames.getByIndex(1));
} catch (com.sun.star.lang.IllegalArgumentException iae) {
log.println("Can't convert any");
}
} catch (com.sun.star.lang.WrappedTargetException e) {
log.println("Exception occured while calling getByIndex() method :") ;