summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-02-24 16:23:20 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-02-24 16:23:20 +0000
commit11efe49f23298934437024ba56fb89c854486d5c (patch)
tree2c09755a7f0a6334c8dc547632757da8b28e962e /qadevOOo
parentdbd19fe5b28f7696035591d78f0d045be5181fe6 (diff)
INTEGRATION: CWS qadev21 (1.8.4); FILE MERGED
2005/01/11 16:39:07 cn 1.8.4.1: bugfix in getFullURL()
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/util/utils.java26
1 files changed, 12 insertions, 14 deletions
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index dab781e22de0..8145bde87fcc 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -2,9 +2,9 @@
*
* $RCSfile: utils.java,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change:$Date: 2005-02-02 14:00:36 $
+ * last change:$Date: 2005-02-24 17:23:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -167,25 +167,23 @@ public class utils {
public static String getFullURL( String sDocName ) {
String fullDocPath = sDocName;
-// System.out.println("##### getFullURL (in): "+sDocName);
+ fullDocPath = fullDocPath.replace('\\','/');
+
if (fullDocPath.startsWith("http:")) {
return fullDocPath;
}
- if (fullDocPath.startsWith("file:")) {
- return fullDocPath;
- }
if (fullDocPath.startsWith("ftp:")) {
return fullDocPath;
}
- fullDocPath = fullDocPath.replace('\\','/');
String prefix = "";
- if (fullDocPath.startsWith("//")) {
- prefix="file:";
- } else {
- if (fullDocPath.startsWith("/")) prefix="file://";
- else prefix="file:///";
+ if (! fullDocPath.startsWith("file:///")){
+ if (fullDocPath.startsWith("//")) {
+ prefix="file:";
+ } else {
+ if (fullDocPath.startsWith("/")) prefix="file://";
+ else prefix="file:///";
+ }
}
-
if (!fullDocPath.endsWith("/")) {
File aFile = new File(fullDocPath);
if (aFile.isDirectory()) {
@@ -193,7 +191,7 @@ public class utils {
}
}
String fulldocURL = prefix+fullDocPath;
-// System.out.println("##### getFullURL (out): "+fulldocURL);
+
return fulldocURL;
}