summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_sw/SwXTextSections.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/mod/_sw/SwXTextSections.java')
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextSections.java30
1 files changed, 9 insertions, 21 deletions
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextSections.java b/qadevOOo/tests/java/mod/_sw/SwXTextSections.java
index a5c47c00e91b..f55b5b686066 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextSections.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextSections.java
@@ -70,7 +70,7 @@ public class SwXTextSections extends TestCase {
*/
@Override
public synchronized TestEnvironment createTestEnvironment
- (TestParameters Param, PrintWriter log ) throws StatusException {
+ (TestParameters Param, PrintWriter log ) throws Exception {
XInterface oObj = null;
XInterface oTS = null;
@@ -92,28 +92,16 @@ public class SwXTextSections extends TestCase {
XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
// First TextSection
- try {
- oTS = (XInterface) oDocMSF.createInstance
- ("com.sun.star.text.TextSection");
- XTextContent oTSC = UnoRuntime.queryInterface(XTextContent.class, oTS);
- oText.insertTextContent(oCursor, oTSC, false);
- }
- catch(Exception e){
- e.printStackTrace( log );
- throw new StatusException( "Couldn't create document", e );
- }
+ oTS = (XInterface) oDocMSF.createInstance
+ ("com.sun.star.text.TextSection");
+ XTextContent oTSC = UnoRuntime.queryInterface(XTextContent.class, oTS);
+ oText.insertTextContent(oCursor, oTSC, false);
// Second TextSection
- try {
- oTS = (XInterface) oDocMSF.createInstance
- ("com.sun.star.text.TextSection");
- XTextContent oTSC = UnoRuntime.queryInterface(XTextContent.class, oTS);
- oText.insertTextContent(oCursor, oTSC, false);
- }
- catch(Exception e){
- e.printStackTrace( log );
- throw new StatusException( "Couldn't create document", e );
- }
+ oTS = (XInterface) oDocMSF.createInstance
+ ("com.sun.star.text.TextSection");
+ XTextContent oTSC2 = UnoRuntime.queryInterface(XTextContent.class, oTS);
+ oText.insertTextContent(oCursor, oTSC2, false);
log.println( "try to get a TextSection with the XTextSectionSupplier()" );