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);
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)
{
_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);