summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-09 08:52:12 +0200
committerNoel Grandin <noel@peralex.com>2015-06-09 11:34:31 +0200
commit2a0dda3dfb37f0cb69842f7d569c253d82f53713 (patch)
tree7a762c2fa22651cefb68021250a3fad8811e0f06 /qadevOOo/tests/java/mod/_xmloff
parent60f8dd78fa3f19e8bed867f7f5926fcf9a8d8e67 (diff)
remove some unnecessary exception wrapping in the Java tests
Modify createTestEnvironment so that it throws Exception. This is appropriate for unit testing. The wrapping adds no value and the calling method already has a catch(Exception) to handle anything. Change-Id: I430a414f63d2cbfc3b65ecfde0285509265e5192
Diffstat (limited to 'qadevOOo/tests/java/mod/_xmloff')
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java27
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java17
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java25
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java17
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java18
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentExporter.java45
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLExporter.java36
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLImporter.java10
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaExporter.java28
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaImporter.java9
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsExporter.java30
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesExporter.java45
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentExporter.java33
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLExporter.java34
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLImporter.java11
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaExporter.java30
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsExporter.java38
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java21
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesExporter.java42
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesImporter.java12
26 files changed, 224 insertions, 376 deletions
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java
index 09b06c08395a..7913a2b1e8e7 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java
@@ -116,7 +116,7 @@ public class XMLContentExporter extends TestCase {
* </ul>
*/
@Override
- protected synchronized TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) {
+ protected synchronized TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -125,21 +125,16 @@ public class XMLContentExporter extends TestCase {
FilterChecker filter = new FilterChecker(log);
Any arg = new Any(new Type(XDocumentHandler.class),filter);
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Chart.XMLContentExporter",
- new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xChartDoc);
-
- Object oTitle = xChartDoc.getTitle() ;
- XPropertySet xTitleProp = UnoRuntime.queryInterface
- (XPropertySet.class, oTitle) ;
- xTitleProp.setPropertyValue("String", exportStr) ;
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Chart.XMLContentExporter",
+ new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xChartDoc);
+
+ Object oTitle = xChartDoc.getTitle() ;
+ XPropertySet xTitleProp = UnoRuntime.queryInterface
+ (XPropertySet.class, oTitle) ;
+ xTitleProp.setPropertyValue("String", exportStr) ;
filter.addTag(new XMLTools.Tag("office:document-content")) ;
filter.addTagEnclosed(new XMLTools.Tag("office:body"),
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java
index 0a622cb85bf5..7df36555a65f 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java
@@ -116,7 +116,7 @@ public class XMLContentImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -129,18 +129,13 @@ public class XMLContentImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
final XPropertySet xTitleProp ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Chart.XMLContentImporter") ;
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Chart.XMLContentImporter") ;
- Object oTitle = xChartDoc.getTitle() ;
- xTitleProp = UnoRuntime.queryInterface
- (XPropertySet.class, oTitle) ;
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ Object oTitle = xChartDoc.getTitle() ;
+ xTitleProp = UnoRuntime.queryInterface
+ (XPropertySet.class, oTitle) ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java
index 3e80faee3b22..c0f6576d3624 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java
@@ -117,7 +117,7 @@ public class XMLExporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -126,20 +126,15 @@ public class XMLExporter extends TestCase {
FilterChecker filter = new FilterChecker(log);
Any arg = new Any(new Type(XDocumentHandler.class),filter);
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Chart.XMLExporter", new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xChartDoc);
-
- Object oTitle = xChartDoc.getTitle() ;
- XPropertySet xTitleProp = UnoRuntime.queryInterface
- (XPropertySet.class, oTitle) ;
- xTitleProp.setPropertyValue("String", exportStr) ;
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Chart.XMLExporter", new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xChartDoc);
+
+ Object oTitle = xChartDoc.getTitle() ;
+ XPropertySet xTitleProp = UnoRuntime.queryInterface
+ (XPropertySet.class, oTitle) ;
+ xTitleProp.setPropertyValue("String", exportStr) ;
filter.addTag(new XMLTools.Tag("office:document")) ;
filter.addTagEnclosed(new XMLTools.Tag("office:meta"),
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java
index 4415780939ee..817f00b267bf 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java
@@ -116,7 +116,7 @@ public class XMLImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -129,16 +129,11 @@ public class XMLImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
final XPropertySet xTitleProp ;
- try {
- oInt = xMSF.createInstance("com.sun.star.comp.Chart.XMLImporter") ;
-
- Object oTitle = xChartDoc.getTitle() ;
- xTitleProp = UnoRuntime.queryInterface
- (XPropertySet.class, oTitle) ;
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance("com.sun.star.comp.Chart.XMLImporter") ;
+
+ Object oTitle = xChartDoc.getTitle() ;
+ xTitleProp = UnoRuntime.queryInterface
+ (XPropertySet.class, oTitle) ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java
index 639d34760324..c3ed6bc18460 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java
@@ -113,7 +113,7 @@ public class XMLStylesExporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -121,17 +121,11 @@ public class XMLStylesExporter extends TestCase {
FilterChecker filter = new FilterChecker(log);
Any arg = new Any(new Type(XDocumentHandler.class),filter);
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Chart.XMLStylesExporter",
- new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xChartDoc);
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Chart.XMLStylesExporter",
+ new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xChartDoc);
filter.addTag(new XMLTools.Tag("office:document-styles")) ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java
index b480537c45be..e34c52ce9896 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java
@@ -111,7 +111,7 @@ public class XMLStylesImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -122,14 +122,8 @@ public class XMLStylesImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Chart.XMLStylesImporter") ;
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Chart.XMLStylesImporter") ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentExporter.java
index 54bcb39475e5..418927aff1db 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentExporter.java
@@ -115,7 +115,7 @@ public class XMLContentExporter extends TestCase {
*/
@Override
protected synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -131,30 +131,25 @@ public class XMLContentExporter extends TestCase {
filter.addTag(new XMLTools.Tag("draw:page","draw:name","NewSlide1"));
filter.addTag(new XMLTools.Tag("draw:page","draw:name","NewSlide2"));
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Draw.XMLContentExporter",
- new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
-
- XDrawPagesSupplier supp = UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc);
- XDrawPages set = supp.getDrawPages();
-
- // This is an XML-export BUG (new slide named "NewSlide2"
- // can not be exported to XML)
- set.insertNewByIndex(1);
-
- XDrawPage page1 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(0));
- XNamed NPage1 = UnoRuntime.queryInterface(XNamed.class,page1);
- NPage1.setName("NewSlide1");
- XDrawPage page2 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1));
- XNamed NPage2 = UnoRuntime.queryInterface(XNamed.class,page2);
- NPage2.setName("NewSlide2");
- xEx.setSourceDocument(xDrawDoc);
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Draw.XMLContentExporter",
+ new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+
+ XDrawPagesSupplier supp = UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc);
+ XDrawPages set = supp.getDrawPages();
+
+ // This is an XML-export BUG (new slide named "NewSlide2"
+ // can not be exported to XML)
+ set.insertNewByIndex(1);
+
+ XDrawPage page1 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(0));
+ XNamed NPage1 = UnoRuntime.queryInterface(XNamed.class,page1);
+ NPage1.setName("NewSlide1");
+ XDrawPage page2 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1));
+ XNamed NPage2 = UnoRuntime.queryInterface(XNamed.class,page2);
+ NPage2.setName("NewSlide2");
+ xEx.setSourceDocument(xDrawDoc);
// create testobject here
log.println( "creating a new environment" );
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentImporter.java
index 8ce74d0d81f4..87713b4dee5f 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentImporter.java
@@ -111,7 +111,7 @@ public class XMLContentImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) throws StatusException {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -122,14 +122,8 @@ public class XMLContentImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Draw.XMLContentImporter") ;
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Draw.XMLContentImporter") ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLExporter.java
index 51a15c9a9bd9..8a2a36fcd150 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLExporter.java
@@ -117,7 +117,7 @@ public class XMLExporter extends TestCase {
*/
@Override
protected synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -133,31 +133,25 @@ public class XMLExporter extends TestCase {
filter.addTag(new XMLTools.Tag("draw:page","draw:name","NewSlide1"));
filter.addTag(new XMLTools.Tag("draw:page","draw:name","NewSlide2"));
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Draw.XMLExporter", new Object[] {arg});
-
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Draw.XMLExporter", new Object[] {arg});
- XDrawPagesSupplier supp = UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc);
- XDrawPages set = supp.getDrawPages();
- // This is an XML-export BUG (new slide named "NewSlide2" can not be exported to XML)
- set.insertNewByIndex(1);
+ XDrawPagesSupplier supp = UnoRuntime.queryInterface(XDrawPagesSupplier.class, xDrawDoc);
+ XDrawPages set = supp.getDrawPages();
- XDrawPage page1 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(0));
- XNamed NPage1 = UnoRuntime.queryInterface(XNamed.class,page1);
- NPage1.setName("NewSlide1");
- XDrawPage page2 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1));
- XNamed NPage2 = UnoRuntime.queryInterface(XNamed.class,page2);
- NPage2.setName("NewSlide2");
+ // This is an XML-export BUG (new slide named "NewSlide2" can not be exported to XML)
+ set.insertNewByIndex(1);
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xDrawDoc);
+ XDrawPage page1 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(0));
+ XNamed NPage1 = UnoRuntime.queryInterface(XNamed.class,page1);
+ NPage1.setName("NewSlide1");
+ XDrawPage page2 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1));
+ XNamed NPage2 = UnoRuntime.queryInterface(XNamed.class,page2);
+ NPage2.setName("NewSlide2");
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xDrawDoc);
// create testobject here
log.println( "creating a new environment" );
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLImporter.java
index 0bb5da21e3ef..426218f0d6bf 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLImporter.java
@@ -111,7 +111,7 @@ public class XMLImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) throws StatusException {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -122,13 +122,7 @@ public class XMLImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance("com.sun.star.comp.Draw.XMLImporter") ;
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance("com.sun.star.comp.Draw.XMLImporter") ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaExporter.java
index 24c15d55a6c3..aebc74eb30f5 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaExporter.java
@@ -115,7 +115,7 @@ public class XMLMetaExporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) throws StatusException {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -124,22 +124,16 @@ public class XMLMetaExporter extends TestCase {
FilterChecker filter = new FilterChecker(log) ;
Any arg = new Any(new Type(XDocumentHandler.class),filter);
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Draw.XMLMetaExporter", new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class, oObj);
- xEx.setSourceDocument(xDrawDoc);
-
- //set some meta data
- XDocumentPropertiesSupplier xPropSup = UnoRuntime.queryInterface
- (XDocumentPropertiesSupplier.class, xDrawDoc);
- final XDocumentProperties xDocProps = xPropSup.getDocumentProperties();
- xDocProps.setTitle(TITLE);
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Draw.XMLMetaExporter", new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class, oObj);
+ xEx.setSourceDocument(xDrawDoc);
+
+ //set some meta data
+ XDocumentPropertiesSupplier xPropSup = UnoRuntime.queryInterface
+ (XDocumentPropertiesSupplier.class, xDrawDoc);
+ final XDocumentProperties xDocProps = xPropSup.getDocumentProperties();
+ xDocProps.setTitle(TITLE);
// Checking Head Tag existence and that property has changed
filter.addTag(new XMLTools.Tag ("office:document-meta"));
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaImporter.java
index e80f80f8e026..d16e8af201d9 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaImporter.java
@@ -110,7 +110,7 @@ public class XMLMetaImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam,PrintWriter log ) {
+ (TestParameters tParam,PrintWriter log ) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -121,12 +121,7 @@ public class XMLMetaImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance("com.sun.star.comp.Draw.XMLMetaImporter") ;
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance("com.sun.star.comp.Draw.XMLMetaImporter") ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsExporter.java
index f4bd08a90beb..a908f1f3c004 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsExporter.java
@@ -116,7 +116,7 @@ public class XMLSettingsExporter extends TestCase {
*/
@Override
protected synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -124,23 +124,17 @@ public class XMLSettingsExporter extends TestCase {
FilterChecker filter = new FilterChecker(log) ;
Any arg = new Any(new Type(XDocumentHandler.class),filter);
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Draw.XMLSettingsExporter",
- new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class, oObj);
- xEx.setSourceDocument(xDrawDoc);
-
- //set some settings
- XModel xDrawModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc);
- XController xController = xDrawModel.getCurrentController();
- XPropertySet xPropSet = UnoRuntime.queryInterface(XPropertySet.class, xController);
- xPropSet.setPropertyValue("IsLayerMode", Boolean.TRUE);
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Draw.XMLSettingsExporter",
+ new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class, oObj);
+ xEx.setSourceDocument(xDrawDoc);
+
+ //set some settings
+ XModel xDrawModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc);
+ XController xController = xDrawModel.getCurrentController();
+ XPropertySet xPropSet = UnoRuntime.queryInterface(XPropertySet.class, xController);
+ xPropSet.setPropertyValue("IsLayerMode", Boolean.TRUE);
// Checking Head Tag existence and that property has changed
filter.addTag(new XMLTools.Tag ("office:document-settings"));
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java
index 3850046792b4..9ee908c6aebf 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java
@@ -112,7 +112,7 @@ public class XMLSettingsImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) throws StatusException {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -123,14 +123,8 @@ public class XMLSettingsImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Draw.XMLSettingsImporter") ;
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Draw.XMLSettingsImporter") ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesExporter.java
index a4b5eff331b8..753c5b9de26c 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesExporter.java
@@ -118,7 +118,7 @@ public class XMLStylesExporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment(
- TestParameters tParam, PrintWriter log) throws StatusException {
+ TestParameters tParam, PrintWriter log) throws Exception {
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
XMultiServiceFactory xMSF = tParam.getMSF() ;
@@ -127,30 +127,25 @@ public class XMLStylesExporter extends TestCase {
Any arg = new Any(new Type(XDocumentHandler.class),filter);
final String STYLE_NAME = "New style" + counter++ ;
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Draw.XMLStylesExporter", new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xDrawDoc);
-
- //obtain style families
- XStyleFamiliesSupplier styleSup = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xDrawDoc);
- XNameAccess StyleFamilies = styleSup.getStyleFamilies();
- //obtain all style family names
- String[] styleFamiliesNames = StyleFamilies.getElementNames();
- String styleFamilyName = styleFamiliesNames[0];
- //obtain style family with name[0]
- Object objectStyle = StyleFamilies.getByName(styleFamilyName);
- XNameContainer xStyleFamilyName = UnoRuntime.queryInterface(XNameContainer.class, objectStyle);
- //create new style
- Object SC = SOF.createInstance(xDrawDoc, "com.sun.star.style.Style");
- XStyle Style = UnoRuntime.queryInterface(XStyle.class,SC);
- //add new style to style familiy with name[0]
- xStyleFamilyName.insertByName(STYLE_NAME,Style);
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Draw.XMLStylesExporter", new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xDrawDoc);
+
+ //obtain style families
+ XStyleFamiliesSupplier styleSup = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xDrawDoc);
+ XNameAccess StyleFamilies = styleSup.getStyleFamilies();
+ //obtain all style family names
+ String[] styleFamiliesNames = StyleFamilies.getElementNames();
+ String styleFamilyName = styleFamiliesNames[0];
+ //obtain style family with name[0]
+ Object objectStyle = StyleFamilies.getByName(styleFamilyName);
+ XNameContainer xStyleFamilyName = UnoRuntime.queryInterface(XNameContainer.class, objectStyle);
+ //create new style
+ Object SC = SOF.createInstance(xDrawDoc, "com.sun.star.style.Style");
+ XStyle Style = UnoRuntime.queryInterface(XStyle.class,SC);
+ //add new style to style familiy with name[0]
+ xStyleFamilyName.insertByName(STYLE_NAME,Style);
// Checking Head Tag existence and that property has changed
filter.addTag(new XMLTools.Tag ("office:document-styles"));
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java
index c02c61ff7941..c178a8606b13 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java
@@ -112,7 +112,7 @@ public class XMLStylesImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) throws StatusException {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -123,14 +123,8 @@ public class XMLStylesImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Draw.XMLStylesImporter") ;
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Draw.XMLStylesImporter") ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentExporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentExporter.java
index c5997f057d84..5738566cb496 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentExporter.java
@@ -116,7 +116,7 @@ public class XMLContentExporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) throws StatusException {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -125,24 +125,19 @@ public class XMLContentExporter extends TestCase {
FilterChecker filter = new FilterChecker(log);
Any arg = new Any(new Type(XDocumentHandler.class),filter);
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Impress.XMLContentExporter",
- new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xImpressDoc);
-
- // assigning a draw page a new name
- XDrawPagesSupplier xPagesSup = UnoRuntime.queryInterface
- (XDrawPagesSupplier.class, xImpressDoc) ;
- XDrawPages xPages = xPagesSup.getDrawPages() ;
- XNamed xPageName = UnoRuntime.queryInterface
- (XNamed.class, xPages.getByIndex(0)) ;
- xPageName.setName(expPageName) ;
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Impress.XMLContentExporter",
+ new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xImpressDoc);
+
+ // assigning a draw page a new name
+ XDrawPagesSupplier xPagesSup = UnoRuntime.queryInterface
+ (XDrawPagesSupplier.class, xImpressDoc) ;
+ XDrawPages xPages = xPagesSup.getDrawPages() ;
+ XNamed xPageName = UnoRuntime.queryInterface
+ (XNamed.class, xPages.getByIndex(0)) ;
+ xPageName.setName(expPageName) ;
// adding tags required to be in XML data exported.
filter.addTag(new XMLTools.Tag("office:document-content")) ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentImporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentImporter.java
index 01cd9372e387..7b816c529a32 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLContentImporter.java
@@ -111,7 +111,7 @@ public class XMLContentImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam,PrintWriter log) throws StatusException {
+ (TestParameters tParam,PrintWriter log) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -123,14 +123,8 @@ public class XMLContentImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Impress.XMLContentImporter") ;
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Impress.XMLContentImporter") ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLExporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLExporter.java
index ed9968f50012..87a4f891e4aa 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLExporter.java
@@ -117,7 +117,7 @@ public class XMLExporter extends TestCase {
*/
@Override
protected synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -127,25 +127,19 @@ public class XMLExporter extends TestCase {
final String NAME = "XMLExporter";
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Impress.XMLExporter", new Object[] {arg});
-
- //get draw pages
- XDrawPagesSupplier drawPagesSupplier = UnoRuntime.queryInterface(XDrawPagesSupplier.class, xImpressDoc);
- XDrawPages drawPages = drawPagesSupplier.getDrawPages();
- //insert new draw page
- XDrawPage newDrawPage = drawPages.insertNewByIndex(0);
- //set specific test name
- XNamed newPageNamed = UnoRuntime.queryInterface(XNamed.class, newDrawPage);
- newPageNamed.setName(NAME);
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xImpressDoc);
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Impress.XMLExporter", new Object[] {arg});
+
+ //get draw pages
+ XDrawPagesSupplier drawPagesSupplier = UnoRuntime.queryInterface(XDrawPagesSupplier.class, xImpressDoc);
+ XDrawPages drawPages = drawPagesSupplier.getDrawPages();
+ //insert new draw page
+ XDrawPage newDrawPage = drawPages.insertNewByIndex(0);
+ //set specific test name
+ XNamed newPageNamed = UnoRuntime.queryInterface(XNamed.class, newDrawPage);
+ newPageNamed.setName(NAME);
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xImpressDoc);
// adding tags which must be contained in XML output
Filter.addTag( new XMLTools.Tag("office:document") );
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLImporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLImporter.java
index 06f104445cb1..5b76b9622cef 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLImporter.java
@@ -111,7 +111,7 @@ public class XMLImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) throws StatusException {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -122,13 +122,8 @@ public class XMLImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Impress.XMLImporter") ;
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Impress.XMLImporter") ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaExporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaExporter.java
index faa13c1a45ab..9b010e69b3bd 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaExporter.java
@@ -115,7 +115,7 @@ public class XMLMetaExporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) throws StatusException {
+ (TestParameters tParam, PrintWriter log) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF() ;
XInterface oObj = null;
@@ -124,23 +124,17 @@ public class XMLMetaExporter extends TestCase {
Any arg = new Any(new Type(XDocumentHandler.class), filter);
final String NAME = "XMLMetaExporter";
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Impress.XMLMetaExporter",
- new Object[]{arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xImpressDoc);
-
- // change title name
- XDocumentPropertiesSupplier xPropSup = UnoRuntime.queryInterface
- (XDocumentPropertiesSupplier.class, xImpressDoc);
- final XDocumentProperties xDocProps = xPropSup.getDocumentProperties();
- xDocProps.setTitle(NAME);
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Impress.XMLMetaExporter",
+ new Object[]{arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xImpressDoc);
+
+ // change title name
+ XDocumentPropertiesSupplier xPropSup = UnoRuntime.queryInterface
+ (XDocumentPropertiesSupplier.class, xImpressDoc);
+ final XDocumentProperties xDocProps = xPropSup.getDocumentProperties();
+ xDocProps.setTitle(NAME);
// Checking tags existence and changed property value
filter.addTag(new XMLTools.Tag ("office:document-meta"));
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaImporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaImporter.java
index caaa7090339b..a9d840f3efd0 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLMetaImporter.java
@@ -110,7 +110,7 @@ public class XMLMetaImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam,PrintWriter log ) throws StatusException {
+ (TestParameters tParam,PrintWriter log ) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -122,14 +122,8 @@ public class XMLMetaImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Impress.XMLMetaImporter") ;
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Impress.XMLMetaImporter") ;
oObj = (XInterface) oInt ;
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsExporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsExporter.java
index a317be770c9d..bab90b342d6c 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsExporter.java
@@ -113,7 +113,7 @@ public class XMLSettingsExporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) throws StatusException {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XMultiServiceFactory xMSF = tParam.getMSF();
XInterface oObj = null;
@@ -121,27 +121,21 @@ public class XMLSettingsExporter extends TestCase {
Any arg = new Any(new Type(XDocumentHandler.class),filter);
final boolean NewDataValue;
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Impress.XMLSettingsExporter",
- new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xImpressDoc);
-
- //set some settings
- XModel xImpressModel = UnoRuntime.queryInterface(XModel.class, xImpressDoc);
- XController xController = xImpressModel.getCurrentController();
- XPropertySet xPropSet = UnoRuntime.queryInterface(XPropertySet.class, xController);
- NewDataValue = ! ((Boolean) xPropSet.getPropertyValue
- ("IsLayerMode")).booleanValue();
- xPropSet.setPropertyValue("IsLayerMode",
- Boolean.valueOf(NewDataValue));
-
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Impress.XMLSettingsExporter",
+ new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xImpressDoc);
+
+ //set some settings
+ XModel xImpressModel = UnoRuntime.queryInterface(XModel.class, xImpressDoc);
+ XController xController = xImpressModel.getCurrentController();
+ XPropertySet xPropSet = UnoRuntime.queryInterface(XPropertySet.class, xController);
+ NewDataValue = ! ((Boolean) xPropSet.getPropertyValue
+ ("IsLayerMode")).booleanValue();
+ xPropSet.setPropertyValue("IsLayerMode",
+ Boolean.valueOf(NewDataValue));
+
// Adding tags for checking existence of head tag and other tags
filter.addTagEnclosed(new XMLTools.Tag("office:settings"),
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java
index a048a1a6bcfd..e370eb1a23a3 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLSettingsImporter.java
@@ -112,7 +112,7 @@ public class XMLSettingsImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) throws StatusException {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -123,14 +123,8 @@ public class XMLSettingsImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Impress.XMLSettingsImporter") ;
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Impress.XMLSettingsImporter") ;
oObj = (XInterface) oInt ;
@@ -169,13 +163,8 @@ public class XMLSettingsImporter extends TestCase {
XModel xImpressModel = UnoRuntime.queryInterface(XModel.class, xImpressDoc);
XController xController = xImpressModel.getCurrentController();
final XPropertySet xPropSet = UnoRuntime.queryInterface(XPropertySet.class, xController);
- try {
- log.println("Property \"IsLayerMode\" before import is " +
- xPropSet.getPropertyValue("IsLayerMode"));
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log);
- throw new StatusException("Can't create component.", e);
- }
+ log.println("Property \"IsLayerMode\" before import is " +
+ xPropSet.getPropertyValue("IsLayerMode"));
final PrintWriter logF = log;
tEnv.addObjRelation("XDocumentHandler.ImportChecker",
new ifc.xml.sax._XDocumentHandler.ImportChecker() {
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesExporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesExporter.java
index 5360e5dfc50e..803c7f431ae7 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesExporter.java
@@ -118,7 +118,7 @@ public class XMLStylesExporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log) throws StatusException {
+ (TestParameters tParam, PrintWriter log) throws Exception {
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() );
XMultiServiceFactory xMSF = tParam.getMSF() ;
@@ -132,29 +132,23 @@ public class XMLStylesExporter extends TestCase {
filter.addTag(new XMLTools.Tag("office:styles"));
filter.addTag(new XMLTools.Tag("style:style","style:name", newName));
- try {
- oObj = (XInterface) xMSF.createInstanceWithArguments(
- "com.sun.star.comp.Impress.XMLStylesExporter",
- new Object[] {arg});
- XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
- xEx.setSourceDocument(xImpressDoc);
-
- // Obtaining and changing property values
- XStyleFamiliesSupplier styleSup = UnoRuntime.queryInterface
- (XStyleFamiliesSupplier.class, xImpressDoc) ;
- XNameAccess styleFamilies = styleSup.getStyleFamilies();
- String[] styleFamiliesNames = styleFamilies.getElementNames();
- XNameContainer StyleFamilyName = UnoRuntime.queryInterface(XNameContainer.class,
- styleFamilies.getByName(styleFamiliesNames[0]));
- Object SC = SOF.createInstance
- (xImpressDoc, "com.sun.star.style.Style");
- XStyle StylePage = UnoRuntime.queryInterface(XStyle.class,SC);
- StyleFamilyName.insertByName(newName, StylePage);
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oObj = (XInterface) xMSF.createInstanceWithArguments(
+ "com.sun.star.comp.Impress.XMLStylesExporter",
+ new Object[] {arg});
+ XExporter xEx = UnoRuntime.queryInterface(XExporter.class,oObj);
+ xEx.setSourceDocument(xImpressDoc);
+
+ // Obtaining and changing property values
+ XStyleFamiliesSupplier styleSup = UnoRuntime.queryInterface
+ (XStyleFamiliesSupplier.class, xImpressDoc) ;
+ XNameAccess styleFamilies = styleSup.getStyleFamilies();
+ String[] styleFamiliesNames = styleFamilies.getElementNames();
+ XNameContainer StyleFamilyName = UnoRuntime.queryInterface(XNameContainer.class,
+ styleFamilies.getByName(styleFamiliesNames[0]));
+ Object SC = SOF.createInstance
+ (xImpressDoc, "com.sun.star.style.Style");
+ XStyle StylePage = UnoRuntime.queryInterface(XStyle.class,SC);
+ StyleFamilyName.insertByName(newName, StylePage);
// create testobject here
log.println( "creating a new environment" );
diff --git a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesImporter.java b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesImporter.java
index 8cd1ff917fb1..d4f48b276a84 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Impress/XMLStylesImporter.java
@@ -111,7 +111,7 @@ public class XMLStylesImporter extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters tParam, PrintWriter log ) throws StatusException {
+ (TestParameters tParam, PrintWriter log ) throws Exception {
XInterface oObj = null;
Object oInt = null ;
@@ -123,14 +123,8 @@ public class XMLStylesImporter extends TestCase {
XMultiServiceFactory xMSF = tParam.getMSF() ;
- try {
- oInt = xMSF.createInstance
- ("com.sun.star.comp.Impress.XMLStylesImporter") ;
-
- } catch (com.sun.star.uno.Exception e) {
- e.printStackTrace(log) ;
- throw new StatusException("Can't create component.", e) ;
- }
+ oInt = xMSF.createInstance
+ ("com.sun.star.comp.Impress.XMLStylesImporter") ;
oObj = (XInterface) oInt ;