summaryrefslogtreecommitdiff
path: root/dbaccess/qa/complex
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-11-08 16:01:31 +0100
committerVladimir Glazunov <vg@openoffice.org>2010-11-08 16:01:31 +0100
commit614211fadf725f5d51f8c21392e0aea35be10c8b (patch)
tree1ace11ffc933630fb347178969317249d96a859e /dbaccess/qa/complex
parentd99b499c29cf9103f30fc639374c062b43b59d36 (diff)
parent15b943381c01954ae9ed7290c455f91aea22edb2 (diff)
CWS-TOOLING: integrate CWS dba34a
Notes
Notes: split repo tag: base_ooo/DEV300_m93 split repo tag: base_ooo/DEV300_m94 split repo tag: base_ooo/DEV300_m95
Diffstat (limited to 'dbaccess/qa/complex')
-rw-r--r--dbaccess/qa/complex/dbaccess/DataSource.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/dbaccess/qa/complex/dbaccess/DataSource.java b/dbaccess/qa/complex/dbaccess/DataSource.java
index ce1e6db28e99..e8f8f7a41d77 100644
--- a/dbaccess/qa/complex/dbaccess/DataSource.java
+++ b/dbaccess/qa/complex/dbaccess/DataSource.java
@@ -26,6 +26,7 @@
************************************************************************/
package complex.dbaccess;
+import com.sun.star.container.XNameAccess;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.Exception;
import com.sun.star.uno.UnoRuntime;
@@ -110,6 +111,9 @@ public class DataSource extends TestCase
dataSourceName = "someDataSource";
final XNamingService dataSourceRegistrations = (XNamingService) UnoRuntime.queryInterface(
XNamingService.class, getMSF().createInstance("com.sun.star.sdb.DatabaseContext"));
+ final XNameAccess existenceCheck = UnoRuntime.queryInterface( XNameAccess.class, dataSourceRegistrations );
+ if ( existenceCheck.hasByName( "someDataSource" ) )
+ dataSourceRegistrations.revokeObject( "someDataSource" );
dataSourceRegistrations.registerObject("someDataSource", m_dataSource.getXDataSource());
assertEquals("registration name of a newly registered data source is wrong", dataSourceName, m_dataSource.getName());
}