Kaydet (Commit) d4189165 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

INTEGRATION: CWS insight01 (1.3.66); FILE MERGED

2004/07/27 12:42:10 oj 1.3.66.3: oob in odb
2004/07/27 08:49:17 oj 1.3.66.2: file extension changed
2004/06/16 07:18:13 cn 1.3.66.1: #i29289# changes for storing dababase structure in sxb files
üst cae2c30d
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: ODatabaseContext.java,v $ * $RCSfile: ODatabaseContext.java,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change:$Date: 2003-09-08 11:42:11 $ * last change:$Date: 2004-08-02 17:56:24 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
package mod._dbaccess; package mod._dbaccess;
import com.sun.star.beans.PropertyValue;
import java.io.PrintWriter; import java.io.PrintWriter;
import lib.Status; import lib.Status;
...@@ -74,6 +75,8 @@ import com.sun.star.lang.XMultiServiceFactory; ...@@ -74,6 +75,8 @@ import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface; import com.sun.star.uno.XInterface;
import com.sun.star.uno.XNamingService; import com.sun.star.uno.XNamingService;
import com.sun.star.frame.XStorable;
import util.utils;
/** /**
* Test for object which is represented by service * Test for object which is represented by service
...@@ -151,6 +154,10 @@ public class ODatabaseContext extends TestCase { ...@@ -151,6 +154,10 @@ public class ODatabaseContext extends TestCase {
xDSProps.setPropertyValue("URL", "sdbc:dbase:file:///.") ; xDSProps.setPropertyValue("URL", "sdbc:dbase:file:///.") ;
XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class, oInterface);
String aFile = utils.getOfficeTemp ((XMultiServiceFactory) Param.getMSF ())+"DatabaseContext.odb";
store.storeAsURL(aFile,new PropertyValue[]{});
tEnv.addObjRelation("XNamingService.RegisterObject", oInterface) ; tEnv.addObjRelation("XNamingService.RegisterObject", oInterface) ;
tEnv.addObjRelation("INSTANCE", oInterface); tEnv.addObjRelation("INSTANCE", oInterface);
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: ODatabaseSource.java,v $ * $RCSfile: ODatabaseSource.java,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change:$Date: 2003-09-08 11:42:22 $ * last change:$Date: 2004-08-02 17:56:37 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
package mod._dbaccess; package mod._dbaccess;
import com.sun.star.beans.PropertyValue;
import java.io.PrintWriter; import java.io.PrintWriter;
import lib.StatusException; import lib.StatusException;
...@@ -75,6 +76,7 @@ import com.sun.star.task.XInteractionHandler; ...@@ -75,6 +76,7 @@ import com.sun.star.task.XInteractionHandler;
import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface; import com.sun.star.uno.XInterface;
import com.sun.star.uno.XNamingService; import com.sun.star.uno.XNamingService;
import com.sun.star.frame.XStorable;
/** /**
* Test for object which is represented by service * Test for object which is represented by service
...@@ -175,12 +177,15 @@ public class ODatabaseSource extends TestCase { ...@@ -175,12 +177,15 @@ public class ODatabaseSource extends TestCase {
} }
// registering source in DatabaseContext // registering source in DatabaseContext
XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class, newSource);
String aFile = utils.getOfficeTemp ((XMultiServiceFactory) Param.getMSF ())+"DataSource.odb";
store.storeAsURL(aFile,new PropertyValue[]{});
xDBContextNameServ.registerObject(databaseName, newSource) ; xDBContextNameServ.registerObject(databaseName, newSource) ;
oInterface = newSource ; oInterface = newSource ;
} }
catch( com.sun.star.uno.Exception e ) { catch( com.sun.star.uno.Exception e ) {
log.println("Service not available" ); log.println("Service not available" );
e.printStackTrace ();
throw new StatusException("Service not available", e) ; throw new StatusException("Service not available", e) ;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment