From 1ea8230d720e166f2e42da047d8fd333935a02ac Mon Sep 17 00:00:00 2001 From: Tomas O'Connor Date: Tue, 25 Feb 2003 15:22:08 +0000 Subject: Update tests according to Steffen Grunds suggestions --- scripting/workben/mod/_scripting/Dispatch.java | 8 ++++---- scripting/workben/mod/_scripting/Function.java | 8 ++++---- scripting/workben/mod/_scripting/ScriptInfo.java | 7 +++---- scripting/workben/mod/_scripting/ScriptStorage.java | 7 +++---- 4 files changed, 14 insertions(+), 16 deletions(-) (limited to 'scripting/workben/mod') diff --git a/scripting/workben/mod/_scripting/Dispatch.java b/scripting/workben/mod/_scripting/Dispatch.java index 7871c583f1ee..bed97a790f77 100644 --- a/scripting/workben/mod/_scripting/Dispatch.java +++ b/scripting/workben/mod/_scripting/Dispatch.java @@ -2,9 +2,9 @@ * * $RCSfile: Dispatch.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change:$Date: 2002-11-20 14:32:06 $ + * last change:$Date: 2003-02-25 16:22:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -104,8 +104,8 @@ public class Dispatch extends TestCase { XMultiServiceFactory xMSF = tParam.getMSF(); SOfficeFactory SOF = null; SOF = SOfficeFactory.getFactory( xMSF ); - String docPath = util.utils.getFullTestDocName( "ExampleSpreadSheetLatest.sxc" ); - XComponent doc = SOF.loadDocument("file://" + docPath ); + String docPath = util.utils.getFullTestURL( "ExampleSpreadSheetLatest.sxc" ); + XComponent doc = SOF.loadDocument( docPath ); XModel model = ( XModel ) UnoRuntime.queryInterface( XModel.class, doc ); XFrame frame = model.getCurrentController().getFrame(); diff --git a/scripting/workben/mod/_scripting/Function.java b/scripting/workben/mod/_scripting/Function.java index a57cff774952..604baa0a3ee5 100644 --- a/scripting/workben/mod/_scripting/Function.java +++ b/scripting/workben/mod/_scripting/Function.java @@ -2,9 +2,9 @@ * * $RCSfile: Function.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change:$Date: 2002-12-10 14:12:41 $ + * last change:$Date: 2003-02-25 16:22:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -97,8 +97,8 @@ public class Function extends TestCase { XMultiServiceFactory xMSF = tParam.getMSF(); SOfficeFactory SOF = null; SOF = SOfficeFactory.getFactory( xMSF ); - String docPath = util.utils.getFullTestDocName( "ExampleSpreadSheetLatest.sxc" ); - XComponent doc = SOF.loadDocument("file://" + docPath ); + String docPath = util.utils.getFullTestURL( "ExampleSpreadSheetLatest.sxc" ); + XComponent doc = SOF.loadDocument( docPath ); XModel model = ( XModel ) UnoRuntime.queryInterface( XModel.class, doc ); oObj = diff --git a/scripting/workben/mod/_scripting/ScriptInfo.java b/scripting/workben/mod/_scripting/ScriptInfo.java index 1d4e3b3653a6..bfd692033f54 100644 --- a/scripting/workben/mod/_scripting/ScriptInfo.java +++ b/scripting/workben/mod/_scripting/ScriptInfo.java @@ -2,9 +2,9 @@ * * $RCSfile: ScriptInfo.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change:$Date: 2002-12-10 14:12:41 $ + * last change:$Date: 2003-02-25 16:22:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,13 +83,12 @@ public class ScriptInfo extends TestCase { // Get path to test documents String rootDocPath = ( String )tParam.get( "DOCPTH" ); System.out.println( "DOCPTH is " + rootDocPath ); - rootDocPath = util.utils.getFullTestDocName( "ExampleSpreadSheetLatest.sxc" ); + rootDocPath = util.utils.getFullTestURL( "ExampleSpreadSheetLatest.sxc" ); if ( rootDocPath != null && rootDocPath.length() > 1 ){ // convert all "\\" to "/", necessary for UCB if ( rootDocPath.indexOf( "\\" ) > 0 ){ rootDocPath = rootDocPath.replace( '\\','/' ); } - rootDocPath = "file://" + rootDocPath; System.out.println("After processing the path is " + rootDocPath); // encode the ulr (for UCB) String encodedPath = URLEncoder.encode( rootDocPath ); diff --git a/scripting/workben/mod/_scripting/ScriptStorage.java b/scripting/workben/mod/_scripting/ScriptStorage.java index eee3e9ac5090..e8dfc22caf01 100644 --- a/scripting/workben/mod/_scripting/ScriptStorage.java +++ b/scripting/workben/mod/_scripting/ScriptStorage.java @@ -2,9 +2,9 @@ * * $RCSfile: ScriptStorage.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change:$Date: 2002-12-10 14:12:41 $ + * last change:$Date: 2003-02-25 16:22:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -80,13 +80,12 @@ public class ScriptStorage extends TestCase { // Get path to test documents String rootDocPath = ( String )tParam.get( "DOCPTH" ); System.out.println( "DOCPTH is " + rootDocPath ); - rootDocPath = util.utils.getFullTestDocName( "ExampleSpreadSheetLatest.sxc" ); + rootDocPath = util.utils.getFullTestURL( "ExampleSpreadSheetLatest.sxc" ); if ( rootDocPath != null && rootDocPath.length() > 1 ){ // convert all "\\" to "/", necessary for UCB if ( rootDocPath.indexOf( "\\" ) > 0 ){ rootDocPath = rootDocPath.replace( '\\','/' ); } - rootDocPath = "file://" + rootDocPath; System.out.println("After processing the path is " + rootDocPath); // encode the ulr (for UCB) String encodedPath = URLEncoder.encode( rootDocPath ); -- cgit