summaryrefslogtreecommitdiff
path: root/qadevOOo/runner
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-03-29 10:53:36 +0000
committerRüdiger Timm <rt@openoffice.org>2005-03-29 10:53:36 +0000
commit0f15045de74ec60afcee1c0a13aa904129f86511 (patch)
treef9a41ab5ec65e2804f520aacac1ed3a89d57f5cd /qadevOOo/runner
parentb2a737a543411bf219664f4da411f1c09dbe0813 (diff)
INTEGRATION: CWS qadev22 (1.5.2); FILE MERGED
2005/03/18 14:47:31 cn 1.5.2.1: #i45386# reRegisterDB(): get XStorable from XDocumentDataSource
Diffstat (limited to 'qadevOOo/runner')
-rw-r--r--qadevOOo/runner/util/DBTools.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/qadevOOo/runner/util/DBTools.java b/qadevOOo/runner/util/DBTools.java
index 5cf43e8e3678..781ec86aea53 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -2,9 +2,9 @@
*
* $RCSfile: DBTools.java,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change:$Date: 2005-02-24 17:22:47 $
+ * last change:$Date: 2005-03-29 11:53:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,8 +70,6 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
-
-import com.sun.star.sdbc.SQLException ;
import com.sun.star.sdbc.XConnection ;
import com.sun.star.sdbc.XResultSet ;
import com.sun.star.sdbc.XResultSetUpdate ;
@@ -88,6 +86,7 @@ import com.sun.star.io.XTextInputStream ;
import com.sun.star.io.XDataInputStream ;
import com.sun.star.container.XNameAccess ;
import com.sun.star.frame.XStorable;
+import com.sun.star.sdb.XDocumentDataSource;
import com.sun.star.sdbc.XCloseable ;
import java.sql.Statement;
import java.sql.Connection;
@@ -373,8 +372,10 @@ public class DBTools {
revokeDB(name) ;
} catch (com.sun.star.uno.Exception e) {}
- XStorable store =
- (XStorable) UnoRuntime.queryInterface(XStorable.class, dataSource);
+ XDocumentDataSource xDDS = (XDocumentDataSource)
+ UnoRuntime.queryInterface(XDocumentDataSource.class, dataSource);
+ XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class,
+ xDDS.getDatabaseDocument());
String aFile = utils.getOfficeTemp(xMSF) + name + ".odb";
store.storeAsURL(aFile, new PropertyValue[] { });