diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-05 15:29:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-08 09:48:20 +0200 |
commit | 616b3ad50404f35d84708b3feeb8c66f2f23f1b1 (patch) | |
tree | fbff023a34b3cc62b2c5beb592b95e65ce28251b /qadevOOo/tests | |
parent | b6a83e99c8f4442c3c96198ac816dcb99419a67e (diff) |
java: remove exceptions from throws clauses that are not
.. actually thrown
Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
Diffstat (limited to 'qadevOOo/tests')
13 files changed, 21 insertions, 86 deletions
diff --git a/qadevOOo/tests/java/ifc/awt/tree/_XTreeControl.java b/qadevOOo/tests/java/ifc/awt/tree/_XTreeControl.java index ba8de5e930f4..0a939d78287b 100644 --- a/qadevOOo/tests/java/ifc/awt/tree/_XTreeControl.java +++ b/qadevOOo/tests/java/ifc/awt/tree/_XTreeControl.java @@ -210,7 +210,7 @@ public class _XTreeControl extends MultiMethodTest { } } - public void _isNodeExpanded() throws ExpandVetoException{ + public void _isNodeExpanded() { boolean bOK = true; diff --git a/qadevOOo/tests/java/ifc/registry/_XImplementationRegistration.java b/qadevOOo/tests/java/ifc/registry/_XImplementationRegistration.java index eae1c88d5a93..d2ab01f456cb 100644 --- a/qadevOOo/tests/java/ifc/registry/_XImplementationRegistration.java +++ b/qadevOOo/tests/java/ifc/registry/_XImplementationRegistration.java @@ -18,7 +18,6 @@ package ifc.registry; -import com.sun.star.registry.CannotRegisterImplementationException; import com.sun.star.registry.XImplementationRegistration; import com.sun.star.registry.XSimpleRegistry; import com.sun.star.uno.RuntimeException; @@ -62,7 +61,7 @@ public class _XImplementationRegistration extends MultiMethodTest { * */ public void _registerImplementation() - throws CannotRegisterImplementationException, RuntimeException + throws RuntimeException { url = util.utils.getFullTestURL("qadevlibs/MyPersistObjectImpl.jar"); loader = "com.sun.star.loader.Java2"; diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java index 41cfbbe74abb..ffd2d9239ed8 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java @@ -69,13 +69,7 @@ public class SwAccessibleTableCellView extends TestCase { SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF()); - try { - oTable = SOfficeFactory.createTextTable(xTextDoc); - } catch (com.sun.star.uno.Exception e) { - e.printStackTrace(log); - throw new StatusException("Couldn't create TextTable : " + - e.getMessage(), e); - } + oTable = SOfficeFactory.createTextTable(xTextDoc); try { SOfficeFactory.insertTextContent(xTextDoc, oTable); diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java index 0f776b5700a8..c6a8d23739f0 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java @@ -71,13 +71,7 @@ public class SwAccessibleTableView extends TestCase { XTextTable oTable = null; SOfficeFactory SOF = SOfficeFactory.getFactory(Param.getMSF()); - try { - oTable = SOfficeFactory.createTextTable( xTextDoc ); - } catch ( com.sun.star.uno.Exception e ) { - e.printStackTrace( log ); - throw new StatusException("Couldn't create TextTable : " + - e.getMessage(), e); - } + oTable = SOfficeFactory.createTextTable( xTextDoc ); try { SOfficeFactory.insertTextContent(xTextDoc, oTable ); diff --git a/qadevOOo/tests/java/mod/_sw/SwXBookmark.java b/qadevOOo/tests/java/mod/_sw/SwXBookmark.java index d15058ae2908..c351e76d454a 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXBookmark.java +++ b/qadevOOo/tests/java/mod/_sw/SwXBookmark.java @@ -87,14 +87,9 @@ public class SwXBookmark extends TestCase { XInterface oObj = null; Object instance = null; log.println( "creating a test environment" ); - try { - oObj = SOfficeFactory.createBookmark( xTextDoc ); - SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj ); - instance = SOF.createInstance(xTextDoc,"com.sun.star.text.Bookmark"); - } catch ( com.sun.star.uno.Exception e ) { - e.printStackTrace( log ); - throw new StatusException( "Couldn't create Bookmark", e ); - } + oObj = SOfficeFactory.createBookmark( xTextDoc ); + SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj ); + instance = SOF.createInstance(xTextDoc,"com.sun.star.text.Bookmark"); log.println( "creating a new environment for bodytext object" ); TestEnvironment tEnv = new TestEnvironment( oObj ); diff --git a/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java b/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java index af67c95200e9..6cbc6053630b 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java +++ b/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java @@ -85,15 +85,10 @@ public class SwXBookmarks extends TestCase { XInterface oObj = null; log.println( "creating a test environment" ); - try { - oObj = SOfficeFactory.createBookmark( xTextDoc ); - SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj ); - oObj = SOfficeFactory.createBookmark( xTextDoc ); - SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj ); - } catch( com.sun.star.uno.Exception e ) { - e.printStackTrace( log ); - throw new StatusException( "Couldn't create Bookmark", e ); - } + oObj = SOfficeFactory.createBookmark( xTextDoc ); + SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj ); + oObj = SOfficeFactory.createBookmark( xTextDoc ); + SOfficeFactory.insertTextContent( xTextDoc, (XTextContent) oObj ); XBookmarksSupplier oBSupp = UnoRuntime.queryInterface(XBookmarksSupplier.class, xTextDoc); XNameAccess oBookNA = oBSupp.getBookmarks(); diff --git a/qadevOOo/tests/java/mod/_sw/SwXCell.java b/qadevOOo/tests/java/mod/_sw/SwXCell.java index b4a0a827e059..5ed1172b3e3c 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXCell.java +++ b/qadevOOo/tests/java/mod/_sw/SwXCell.java @@ -91,12 +91,7 @@ public class SwXCell extends TestCase { SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); log.println( "creating a test environment" ); - try { - oTable = SOfficeFactory.createTextTable(xTextDoc, 3, 4); - } catch ( com.sun.star.uno.Exception e ) { - log.println("Unable to create TextTable..."); - e.printStackTrace(log); - } + oTable = SOfficeFactory.createTextTable(xTextDoc, 3, 4); try { SOfficeFactory.insertTextContent( xTextDoc, oTable ); } catch ( com.sun.star.lang.IllegalArgumentException e ) { diff --git a/qadevOOo/tests/java/mod/_sw/SwXCellRange.java b/qadevOOo/tests/java/mod/_sw/SwXCellRange.java index b566c1342f47..2069fd9fb65b 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXCellRange.java +++ b/qadevOOo/tests/java/mod/_sw/SwXCellRange.java @@ -92,14 +92,8 @@ public class SwXCellRange extends TestCase { XTextTable the_table = null; XInterface oObj = null; - try { - the_table = SOfficeFactory.createTextTable( xTextDoc ); - the_table.initialize(5, 5); - } catch ( com.sun.star.uno.Exception e ) { - e.printStackTrace( log ); - throw new StatusException("Couldn't create testobj: " - +e.getMessage(),e); - } + the_table = SOfficeFactory.createTextTable( xTextDoc ); + the_table.initialize(5, 5); if( SOfficeFactory.getTableCollection( xTextDoc ).getCount() == 0 ) { try { diff --git a/qadevOOo/tests/java/mod/_sw/SwXTableCellText.java b/qadevOOo/tests/java/mod/_sw/SwXTableCellText.java index a216e471b70b..191cc4c29828 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXTableCellText.java +++ b/qadevOOo/tests/java/mod/_sw/SwXTableCellText.java @@ -117,13 +117,7 @@ public class SwXTableCellText extends TestCase { XTextTable oTable = null; log.println( "Creating a test environment" ); - try { - oTable = SOfficeFactory.createTextTable( xTextDoc ); - } catch ( com.sun.star.uno.Exception e ) { - e.printStackTrace( log ); - throw new StatusException("Couldn't create TextTable : " - +e.getMessage(),e); - } + oTable = SOfficeFactory.createTextTable( xTextDoc ); try { SOfficeFactory.insertTextContent(xTextDoc, oTable ); diff --git a/qadevOOo/tests/java/mod/_sw/SwXTableColumns.java b/qadevOOo/tests/java/mod/_sw/SwXTableColumns.java index bdb78ca07573..69a79797e2cb 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXTableColumns.java +++ b/qadevOOo/tests/java/mod/_sw/SwXTableColumns.java @@ -92,13 +92,7 @@ public class SwXTableColumns extends TestCase { log.println( "creating a test environment" ); - try { - oTable = SOfficeFactory.createTextTable( xTextDoc ); - } catch ( com.sun.star.uno.Exception e ) { - e.printStackTrace( log ); - throw new StatusException("Couldn't create TextTable: " - +e.getMessage(),e); - } + oTable = SOfficeFactory.createTextTable( xTextDoc ); try { SOfficeFactory.insertTextContent(xTextDoc, oTable ); diff --git a/qadevOOo/tests/java/mod/_sw/SwXTableRows.java b/qadevOOo/tests/java/mod/_sw/SwXTableRows.java index 3996058a453c..88b935ced48f 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXTableRows.java +++ b/qadevOOo/tests/java/mod/_sw/SwXTableRows.java @@ -87,13 +87,7 @@ public class SwXTableRows extends TestCase { log.println( "creating a test environment" ); SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); - try { - oTable = SOfficeFactory.createTextTable( xTextDoc ); - } catch ( com.sun.star.uno.Exception e ) { - e.printStackTrace( log ); - throw new StatusException("Couldn't create TextTable: " - +e.getMessage(),e); - } + oTable = SOfficeFactory.createTextTable( xTextDoc ); try { SOfficeFactory.insertTextContent(xTextDoc, oTable ); diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTable.java b/qadevOOo/tests/java/mod/_sw/SwXTextTable.java index 0f0e9b03f03e..ef0546a441b2 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXTextTable.java +++ b/qadevOOo/tests/java/mod/_sw/SwXTextTable.java @@ -84,14 +84,8 @@ public class SwXTextTable extends TestCase { TestEnvironment tEnv = null; Object instance = null; - try { - oObj = SOfficeFactory.createTextTable(xTextDoc); - instance = SOfficeFactory.createTextTable(xTextDoc); - } catch (com.sun.star.uno.Exception uE) { - uE.printStackTrace(log); - throw new StatusException("Couldn't create testobj : " + - uE.getMessage(), uE); - } + oObj = SOfficeFactory.createTextTable(xTextDoc); + instance = SOfficeFactory.createTextTable(xTextDoc); int nRow = 6; int nCol = 2; diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java b/qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java index 5339829ab4c8..68bb47a3f041 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java +++ b/qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java @@ -86,15 +86,8 @@ public class SwXTextTableCursor extends TestCase { // create testobject here XTextTable oTable = null; - try { - oTable = SOfficeFactory.createTextTable( xTextDoc ); - SOfficeFactory.insertTextContent(xTextDoc, oTable ); - } - catch( com.sun.star.uno.Exception uE ) { - uE.printStackTrace( log ); - throw new StatusException("Couldn't create TextTable : " - + uE.getMessage(), uE); - } + oTable = SOfficeFactory.createTextTable( xTextDoc ); + SOfficeFactory.insertTextContent(xTextDoc, oTable ); oObj = oTable.createCursorByCellName("A1"); |