summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2011-05-03 23:02:44 +0200
committerJulien Nabet <serval2412@yahoo.fr>2011-05-03 23:02:44 +0200
commit3b8b6cef107bdf209e6258c5bb4d51e880f6ecf6 (patch)
tree1bdf5d3cc9366d865d42423194a7eda224a13515 /odk
parentb945adac81c3b38d32ccc7d60f3d99fedd86a30f (diff)
Change <file>.toURL() to <file>.toURI().toURL()
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java2
-rw-r--r--odk/examples/DevelopersGuide/Text/TextDocuments.java2
-rw-r--r--odk/examples/DevelopersGuide/UCB/Helper.java4
-rw-r--r--odk/source/com/sun/star/lib/loader/Loader.java4
5 files changed, 7 insertions, 7 deletions
diff --git a/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java b/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java
index 65c9ecf99b4f..c470c7cb6f1b 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 8b6de7bad121..a7cd1ce0eb46 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 4696b41ffe59..40940fda3866 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 ea5f5536365b..ccab5c0feb1e 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 c4ef7fee6e81..cc2242a9fe31 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