diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-11-08 16:01:31 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-11-08 16:01:31 +0100 |
commit | 9cc7580d9089500356ab3a47840f0c733b17169b (patch) | |
tree | 93908215d9c789b7d747079c494d1ec5c87579e8 /qadevOOo | |
parent | af2a356a99ba10b0d48fc70d7f12921eb50111ba (diff) | |
parent | 691a40981626fa378a3eb6f031754be2beedd1fa (diff) |
CWS-TOOLING: integrate CWS dba34a
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/stats/Summarizer.java | 2 | ||||
-rw-r--r-- | qadevOOo/tests/java/mod/_forms/GenericModelTest.java | 28 |
2 files changed, 16 insertions, 14 deletions
diff --git a/qadevOOo/runner/stats/Summarizer.java b/qadevOOo/runner/stats/Summarizer.java index b1fe5fe61dd3..5f4a58cc31f8 100644 --- a/qadevOOo/runner/stats/Summarizer.java +++ b/qadevOOo/runner/stats/Summarizer.java @@ -78,7 +78,7 @@ public class Summarizer { if (states.elementAt(j).equals("not part of the job")) { - state = "Not possible since not all Interfaces/Services have been checked"; + state = "PASSED(some interfaces/services not tested).OK"; } else { diff --git a/qadevOOo/tests/java/mod/_forms/GenericModelTest.java b/qadevOOo/tests/java/mod/_forms/GenericModelTest.java index dce88234885f..5ac071c38eb5 100644 --- a/qadevOOo/tests/java/mod/_forms/GenericModelTest.java +++ b/qadevOOo/tests/java/mod/_forms/GenericModelTest.java @@ -27,6 +27,7 @@ package mod._forms; import com.sun.star.beans.NamedValue; import com.sun.star.beans.PropertyValue; +import com.sun.star.container.XIndexAccess; import java.io.PrintWriter; import lib.StatusException; @@ -251,11 +252,10 @@ public class GenericModelTest extends TestCase { if (m_ConnectionColsed) return; try { + XIndexAccess forms = UnoRuntime.queryInterface( XIndexAccess.class, + FormTools.getForms( WriterTools.getDrawPage( m_xTextDoc ) ) ); XForm myForm = (XForm) AnyConverter.toObject(new Type(XForm.class), - (FormTools.getForms( - WriterTools.getDrawPage( - m_xTextDoc))) - .getByName("Standard")); + forms.getByIndex(0)); if (debug){ if (myForm == null){ @@ -269,18 +269,20 @@ public class GenericModelTest extends TestCase { } - XPropertySet xSetProp = (XPropertySet) UnoRuntime.queryInterface( - XPropertySet.class, myForm); - XConnection connection = (XConnection) AnyConverter.toObject( - new Type(XConnection.class), - xSetProp.getPropertyValue("ActiveConnection")); - if (debug && connection == null){ - log.println("ERROR: could not get property 'ActiveConnection' from the XForm"); + XPropertySet xSetProp = UnoRuntime.queryInterface( XPropertySet.class, myForm ); + XConnection connection = UnoRuntime.queryInterface( XConnection.class, xSetProp.getPropertyValue( "ActiveConnection" ) ); + if ( connection == null ) + { + if ( debug ) + log.println("ERROR: could not get property 'ActiveConnection' from the XForm"); + } + else + { + connection.close(); } - - connection.close(); } catch (Exception e) { log.println("ERROR: Can't close the connection: " + e.toString()); + e.printStackTrace( log ); } log.println("closing data source..."); |