From 6b8c16a1f716031b6d5d7d7b2bb333fbaef42842 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 24 Feb 2010 11:08:28 +0100 Subject: sb118: cleanup --- qadevOOo/runner/base/java_fat.java | 8 +++----- qadevOOo/runner/util/AccessibilityTools.java | 13 +------------ 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'qadevOOo/runner') diff --git a/qadevOOo/runner/base/java_fat.java b/qadevOOo/runner/base/java_fat.java index f764c61af26e..2a8c17937d9c 100644 --- a/qadevOOo/runner/base/java_fat.java +++ b/qadevOOo/runner/base/java_fat.java @@ -445,17 +445,16 @@ public class java_fat implements TestBase log.initialize(entry, logging); tCase.setLogWriter((PrintWriter) log); - TestEnvironment tEnv = null; - try { tCase.initializeTestCase(param); - tEnv = tCase.getTestEnvironment(param); + return tCase.getTestEnvironment(param); } catch (com.sun.star.lang.DisposedException de) { System.out.println("Office disposed"); closeExistingOffice(); + throw de; } catch (lib.StatusException e) { @@ -465,9 +464,8 @@ public class java_fat implements TestBase entry.ErrorMsg = e.getMessage(); entry.hasErrorMsg = true; + throw e; } - - return tEnv; } private void closeExistingOffice() diff --git a/qadevOOo/runner/util/AccessibilityTools.java b/qadevOOo/runner/util/AccessibilityTools.java index 16d3386633d4..d1fefcdf72be 100644 --- a/qadevOOo/runner/util/AccessibilityTools.java +++ b/qadevOOo/runner/util/AccessibilityTools.java @@ -54,18 +54,7 @@ public class AccessibilityTools { } public static XAccessible getAccessibleObject(XInterface xObject) { - XAccessible xAccessible = null; - - try { - xAccessible = (XAccessible) UnoRuntime.queryInterface( - XAccessible.class, xObject); - } catch (Exception e) { - System.out.println( - "caught exception while getting accessible object" + e); - e.printStackTrace(); - } - - return xAccessible; + return UnoRuntime.queryInterface(XAccessible.class, xObject); } public static XWindow getCurrentContainerWindow(XMultiServiceFactory msf, -- cgit