[Libreoffice-commits] .: odk/examples odk/source

Julien Nabet serval2412 at kemper.freedesktop.org
Tue May 3 14:03:02 PDT 2011


 odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java                   |    2 +-
 odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java |    2 +-
 odk/examples/DevelopersGuide/Text/TextDocuments.java                          |    2 +-
 odk/examples/DevelopersGuide/UCB/Helper.java                                  |    4 ++--
 odk/source/com/sun/star/lib/loader/Loader.java                                |    4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit b84bac859ec7c90b99a327685909d0fc18fd0bb5
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue May 3 23:02:44 2011 +0200

    Change <file>.toURL() to <file>.toURI().toURL()

diff --git a/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java b/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java
index 63901b9..a6ca8d3 100644
--- a/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java
@@ -100,7 +100,7 @@ public class GraphicExportDemo
                aProps[0].Value = "WMF";
             */
             java.io.File destFile = new java.io.File(args[1]);
-            java.net.URL destUrl = destFile.toURL();
+            java.net.URL destUrl = destFile.toURI().toURL();
             
             aProps[1] = new PropertyValue();
             aProps[1].Name = "URL";
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
index caed82f..29b1125 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
@@ -1025,7 +1025,7 @@ public class FunctionHelper
             // get file URL from the dialog
             try
             {
-                sFileURL = aChooser.getSelectedFile().toURL().toExternalForm();
+                sFileURL = aChooser.getSelectedFile().toURI().toURL().toExternalForm();
             }
             catch( MalformedURLException ex )
             {
diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java
index fad1be9..d226be4 100644
--- a/odk/examples/DevelopersGuide/Text/TextDocuments.java
+++ b/odk/examples/DevelopersGuide/Text/TextDocuments.java
@@ -425,7 +425,7 @@ public class TextDocuments {
         if ( xDoc != null ) {
             sourceFile = new java.io.File(sOutputDir);
             StringBuffer sStoreFileUrl = new StringBuffer();
-            sStoreFileUrl.append(sourceFile.toURL().toString());
+            sStoreFileUrl.append(sourceFile.toURI().toURL().toString());
             sStoreFileUrl.append("somepopularfileformat.doc");
 
             storeDocComponent(xDoc, sStoreFileUrl.toString() );
diff --git a/odk/examples/DevelopersGuide/UCB/Helper.java b/odk/examples/DevelopersGuide/UCB/Helper.java
index dbba915..791302b 100644
--- a/odk/examples/DevelopersGuide/UCB/Helper.java
+++ b/odk/examples/DevelopersGuide/UCB/Helper.java
@@ -179,7 +179,7 @@ public class Helper {
         try
         {
             File file = new File( systemPath );
-            String url = file.toURL().toString();
+            String url = file.toURI().toURL().toString();
             if ( url.charAt( 6 ) != '/' ) { // file:/xxx vs. file:///xxxx
                 StringBuffer buf1 = new StringBuffer( "file:///" );
                 buf1.append( url.substring( 6 ) );
@@ -217,7 +217,7 @@ public class Helper {
             buf.append( "resource-" );
             buf.append( System.currentTimeMillis() );
             File file = new File( buf.toString() );
-            String url = file.toURL().toString();
+            String url = file.toURI().toURL().toString();
             if ( url.charAt( 6 ) != '/' ) { // file:/xxx vs. file:///xxxx
                 StringBuffer buf1 = new StringBuffer( "file:///" );
                 buf1.append( url.substring( 6 ) );
diff --git a/odk/source/com/sun/star/lib/loader/Loader.java b/odk/source/com/sun/star/lib/loader/Loader.java
index c9589e2..64bc781 100644
--- a/odk/source/com/sun/star/lib/loader/Loader.java
+++ b/odk/source/com/sun/star/lib/loader/Loader.java
@@ -178,7 +178,7 @@ public final class Loader {
                 if ( fJuh.exists() ) {
                     URL[] clurls = new URL[1];
                     try {
-                        clurls[0] = fJuh.toURL();                
+                        clurls[0] = fJuh.toURI().toURL();
                         ClassLoader cl = new CustomURLClassLoader( clurls );
                         Class c = cl.loadClass(
                             "com.sun.star.comp.helper.UnoInfo" );
@@ -237,7 +237,7 @@ public final class Loader {
         StringTokenizer tokens = new StringTokenizer( data, delimiter );
         while ( tokens.hasMoreTokens() ) {
             try {
-                urls.add( new File( tokens.nextToken() ).toURL() );
+                urls.add( new File( tokens.nextToken() ).toURI().toURL() );
             } catch ( MalformedURLException e ) {
                 // don't add this class path entry to the list of class loader
                 // URLs


More information about the Libreoffice-commits mailing list