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

This commit is contained in:
Julien Nabet
2011-05-03 22:55:31 +02:00
parent c770841621
commit 2be3b8bd88
4 changed files with 5 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ public class HelpWindow
File aFile = new File (sFilename);
try
{
loadURL (aFile.toURL());
loadURL (aFile.toURI().toURL());
}
catch (MalformedURLException e)
{

View File

@@ -53,7 +53,7 @@ public class OOoViewer extends Applet {
System.setProperty("sun.awt.xembedserver", "true");
File f = new File(s);
URL url = f.toURL();
URL url = f.toURI().toURL();
String officeURL = url.toString();
URL[] arURL = new URL[] {
new URL(officeURL + "/program/classes/officebean.jar"),
@@ -65,7 +65,7 @@ public class OOoViewer extends Applet {
};
m_loader = new CustomURLClassLoader(arURL);
File fileProg = new File(s + "/program");
m_loader.addResourcePath(fileProg.toURL());
m_loader.addResourcePath(fileProg.toURI().toURL());
}
} catch (MalformedURLException e) {
e.printStackTrace();

View File

@@ -271,7 +271,7 @@ public class ListSelection extends integration.forms.TestCase
{
XStorable storable = (XStorable)m_document.query( XStorable.class );
java.io.File testFile = java.io.File.createTempFile( getTestObjectName(),".ods");
storable.storeAsURL( testFile.getAbsoluteFile().toURL().toString(), new com.sun.star.beans.PropertyValue[]{} );
storable.storeAsURL( testFile.getAbsoluteFile().toURI().toURL().toString(), new com.sun.star.beans.PropertyValue[]{} );
testFile.deleteOnExit();
}
catch( java.lang.Throwable e )

View File

@@ -112,7 +112,7 @@ public class XMLFormSettings extends complexlib.ComplexTestCase
// store the document
File tempFile = File.createTempFile( "xmlforms", ".odt" );
tempFile.deleteOnExit();
String fileURL = tempFile.toURL().toExternalForm();
String fileURL = tempFile.toURI().toURL().toExternalForm();
XStorable store = (XStorable)UnoRuntime.queryInterface( XStorable.class,
m_document.getDocument() );
store.storeAsURL( fileURL, new PropertyValue[] {} );