summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-05 15:29:21 +0200
committerNoel Grandin <noel@peralex.com>2014-08-08 09:48:20 +0200
commit616b3ad50404f35d84708b3feeb8c66f2f23f1b1 (patch)
treefbff023a34b3cc62b2c5beb592b95e65ce28251b /qadevOOo
parentb6a83e99c8f4442c3c96198ac816dcb99419a67e (diff)
java: remove exceptions from throws clauses that are not
.. actually thrown Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/convwatch/DocumentConverter.java9
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java2
-rw-r--r--qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java2
-rw-r--r--qadevOOo/runner/helper/ConfigurationRead.java6
-rw-r--r--qadevOOo/runner/helper/PropertyHandlerImpl.java3
-rw-r--r--qadevOOo/runner/util/SOfficeFactory.java14
-rw-r--r--qadevOOo/tests/java/ifc/awt/tree/_XTreeControl.java2
-rw-r--r--qadevOOo/tests/java/ifc/registry/_XImplementationRegistration.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXBookmark.java11
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXBookmarks.java13
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXCell.java7
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXCellRange.java10
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTableCellText.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTableColumns.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTableRows.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextTable.java10
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java11
19 files changed, 33 insertions, 110 deletions
diff --git a/qadevOOo/runner/convwatch/DocumentConverter.java b/qadevOOo/runner/convwatch/DocumentConverter.java
index 17877459edb2..758037012cdb 100644
--- a/qadevOOo/runner/convwatch/DocumentConverter.java
+++ b/qadevOOo/runner/convwatch/DocumentConverter.java
@@ -234,14 +234,7 @@ public class DocumentConverter extends EnhancedComplexTestCase
}
else
{
- try
- {
- OfficePrint.convertDocument(_sInputFile, _sReferencePath, aGTA);
- }
- catch(ConvWatchCancelException e)
- {
- assure(e.getMessage(), false);
- }
+ OfficePrint.convertDocument(_sInputFile, _sReferencePath, aGTA);
}
if (aGTA.restartOffice())
diff --git a/qadevOOo/runner/convwatch/OfficePrint.java b/qadevOOo/runner/convwatch/OfficePrint.java
index 6476f44e4226..ba3e03c298e9 100644
--- a/qadevOOo/runner/convwatch/OfficePrint.java
+++ b/qadevOOo/runner/convwatch/OfficePrint.java
@@ -1064,7 +1064,7 @@ public class OfficePrint {
}
- public static void convertDocument(String _sInputFile, String _sOutputPath, GraphicalTestArguments _aGTA) throws ConvWatchCancelException
+ public static void convertDocument(String _sInputFile, String _sOutputPath, GraphicalTestArguments _aGTA)
{
XMultiServiceFactory xMSF = _aGTA.getMultiServiceFactory();
if (xMSF == null)
diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
index 75acf919b130..3df97f5f2d8d 100644
--- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
+++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java
@@ -878,7 +878,7 @@ public class OpenOfficePostscriptCreator implements IOffice
}
- public void convertDocument(String _sInputFile, String _sOutputPath, ParameterHelper _aGTA) throws OfficeException
+ public void convertDocument(String _sInputFile, String _sOutputPath, ParameterHelper _aGTA)
{
XMultiServiceFactory xMSF = _aGTA.getMultiServiceFactory();
if (xMSF == null)
diff --git a/qadevOOo/runner/helper/ConfigurationRead.java b/qadevOOo/runner/helper/ConfigurationRead.java
index a3af03c81ee3..30c8ee2d0c4b 100644
--- a/qadevOOo/runner/helper/ConfigurationRead.java
+++ b/qadevOOo/runner/helper/ConfigurationRead.java
@@ -76,11 +76,8 @@ public class ConfigurationRead {
* @param name The hierarchical name of a subnode.
* @return True, if the node exists.
*/
- public boolean hasByHieracrhicalName(String name) throws NoSuchElementException,
- com.sun.star.lang.WrappedTargetException {
-
+ public boolean hasByHieracrhicalName(String name) {
return root.hasByHierarchicalName(name);
-
}
@@ -89,7 +86,6 @@ public class ConfigurationRead {
* @return All elements of the root node.
*/
public String[] getRootNodeNames() {
-
XNameAccess xName = UnoRuntime.queryInterface(XNameAccess.class, root);
String[]names = xName.getElementNames();
return names;
diff --git a/qadevOOo/runner/helper/PropertyHandlerImpl.java b/qadevOOo/runner/helper/PropertyHandlerImpl.java
index 01223bdd1f54..873edc4782ed 100644
--- a/qadevOOo/runner/helper/PropertyHandlerImpl.java
+++ b/qadevOOo/runner/helper/PropertyHandlerImpl.java
@@ -17,7 +17,6 @@
*/
package helper;
-import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.inspection.LineDescriptor;
import com.sun.star.inspection.XPropertyControlFactory;
import com.sun.star.inspection.XPropertyHandler;
@@ -240,7 +239,7 @@ public class PropertyHandlerImpl implements XPropertyHandler{
/**
* This method currently does nothing
*/
- public void describePropertyLine(String string, LineDescriptor[] lineDescriptor, XPropertyControlFactory xPropertyControlFactory) throws UnknownPropertyException, com.sun.star.lang.NullPointerException {
+ public void describePropertyLine(String string, LineDescriptor[] lineDescriptor, XPropertyControlFactory xPropertyControlFactory) {
}
}
diff --git a/qadevOOo/runner/util/SOfficeFactory.java b/qadevOOo/runner/util/SOfficeFactory.java
index f464ea88e6c8..72ca975c540e 100644
--- a/qadevOOo/runner/util/SOfficeFactory.java
+++ b/qadevOOo/runner/util/SOfficeFactory.java
@@ -241,7 +241,7 @@ public class SOfficeFactory {
* creates a simple TextTable defaultet to 2 rows and 2 columns
*/
public static XTextTable createTextTable(XTextDocument xTextDoc)
- throws com.sun.star.uno.Exception {
+ {
TableDsc tDsc = new TableDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@@ -255,7 +255,7 @@ public class SOfficeFactory {
*/
public static XTextTable createTextTable(XTextDocument xTextDoc,
int rows, int columns)
- throws com.sun.star.uno.Exception {
+ {
TableDsc tDsc = new TableDsc(rows, columns);
InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@@ -269,7 +269,7 @@ public class SOfficeFactory {
* ... to be continued
*/
public static XTextFrame createTextFrame(XTextDocument xTextDoc)
- throws com.sun.star.uno.Exception {
+ {
FrameDsc tDsc = new FrameDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@@ -293,7 +293,7 @@ public class SOfficeFactory {
}
public static void insertString(XTextDocument xTextDoc, String cString)
- throws com.sun.star.uno.Exception {
+ {
XText xText = xTextDoc.getText();
XText oText = UnoRuntime.queryInterface(
XText.class, xText);
@@ -328,7 +328,7 @@ public class SOfficeFactory {
* the method createBookmark
*/
public static XTextContent createBookmark(XTextDocument xTextDoc)
- throws com.sun.star.uno.Exception {
+ {
BookmarkDsc tDsc = new BookmarkDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@@ -342,7 +342,7 @@ public class SOfficeFactory {
* the method createReferenceMark
*/
public static XTextContent createReferenceMark(XTextDocument xTextDoc)
- throws com.sun.star.uno.Exception {
+ {
ReferenceMarkDsc tDsc = new ReferenceMarkDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
@@ -356,7 +356,7 @@ public class SOfficeFactory {
* the method createFootnote
*/
public static XTextContent createFootnote(XTextDocument xTextDoc)
- throws com.sun.star.uno.Exception {
+ {
FootnoteDsc tDsc = new FootnoteDsc();
InstCreator instCreate = new InstCreator(xTextDoc, tDsc);
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");