diff options
Diffstat (limited to 'qadevOOo/tests/java/mod/_sw/SwXFootnote.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_sw/SwXFootnote.java | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFootnote.java b/qadevOOo/tests/java/mod/_sw/SwXFootnote.java index 911fa368e684..c675eb355f31 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXFootnote.java +++ b/qadevOOo/tests/java/mod/_sw/SwXFootnote.java @@ -105,7 +105,7 @@ public class SwXFootnote extends TestCase { * </ul> */ @Override - protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) { + protected synchronized TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception { XFootnote oFootnote; log.println( "Creating a test environment" ); @@ -113,25 +113,15 @@ public class SwXFootnote extends TestCase { XMultiServiceFactory msf = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc); log.println("creating a footnote"); Object instance = null; - try { - oFootnote = UnoRuntime.queryInterface(XFootnote.class, - msf.createInstance("com.sun.star.text.Footnote")); - instance = msf.createInstance("com.sun.star.text.Footnote"); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException("Couldn't create footnote", e); - } + oFootnote = UnoRuntime.queryInterface(XFootnote.class, + msf.createInstance("com.sun.star.text.Footnote")); + instance = msf.createInstance("com.sun.star.text.Footnote"); XText oText = xTextDoc.getText(); XTextCursor oCursor = oText.createTextCursor(); log.println("inserting the footnote into text document"); - try { - oText.insertTextContent(oCursor, oFootnote, false); - } catch (com.sun.star.lang.IllegalArgumentException e) { - e.printStackTrace(log); - throw new StatusException("Couldn't insert the footnote", e); - } + oText.insertTextContent(oCursor, oFootnote, false); TestEnvironment tEnv = new TestEnvironment(oFootnote); |