]> saetta.ns0.it Git - solipa/libsolipa/commitdiff
OOO formato url non valido.
authorAndrea Zagli <azagli@libero.it>
Wed, 4 Jul 2018 14:23:13 +0000 (16:23 +0200)
committerAndrea Zagli <azagli@libero.it>
Wed, 4 Jul 2018 14:23:13 +0000 (16:23 +0200)
src/ooo.c

index d98f02ea6b1c838a34f38cc9c8bc442420b1bf3e..0fc290ce7ad4ac38c3679c9d1074da4ff31f3f82 100644 (file)
--- a/src/ooo.c
+++ b/src/ooo.c
@@ -533,7 +533,9 @@ gchar
        gchar *_filename;
 
        _filename = g_strjoinv ("/", g_strsplit (filename, "\\", -1));
-       ret = g_strdup_printf ("document = desktop.loadComponentFromURL(\"file:///%s\", \"_default\", 0, ())\n", _filename);
+       ret = g_strdup_printf ("document = desktop.loadComponentFromURL(\"file://%s%s\", \"_default\", 0, ())\n",
+                              _filename[0] == '/' ? "" : "/",
+                              _filename);
 
        g_free (_filename);
 
@@ -1048,7 +1050,9 @@ gchar
        else
                {
                        _filename = g_strjoinv ("/", g_strsplit (_filename, "\\", -1));
-                       ret = g_strdup_printf ("document.storeAsURL(\"file:///%s\", ())\n", _filename);
+                       ret = g_strdup_printf ("document.storeAsURL(\"file://%s%s\", ())\n",
+                                              _filename[0] == '/' ? "" : "/",
+                                              _filename);
                }
        if (_filename != NULL)
                {
@@ -1092,7 +1096,8 @@ gchar
 
        _filename = g_strjoinv ("/", g_strsplit (_filename, "\\", -1));
        ret = g_strdup_printf ("property = (PropertyValue (\"FilterName\", 0, \"writer_pdf_Export\", 0), )\n"
-                              "document.storeToURL(\"file:///%s\", property)\n",
+                              "document.storeToURL(\"file://%s%s\", property)\n",
+                              _filename[0] == '/' ? "" : "/",
                               _filename);
        g_free (_filename);