summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Shaforostoff <shafff@ukr.net>2016-11-20 17:39:31 (GMT)
committerNick Shaforostoff <shafff@ukr.net>2016-11-20 17:41:31 (GMT)
commitbf393c36847f0198668953da97831872433ab04a (patch)
treea458c762ec938775f16d33022c306308cba23c96
parent7e21336df2540539fc245c692e39b5a44129fe28 (diff)
CCBUG: 368842v16.12.0v16.11.90
pass also the filename to file save dialog
-rw-r--r--scripts/xliff2odf-standalone.py4
-rw-r--r--src/editortab.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/xliff2odf-standalone.py b/scripts/xliff2odf-standalone.py
index 88cb61c..8ce2a4f 100644
--- a/scripts/xliff2odf-standalone.py
+++ b/scripts/xliff2odf-standalone.py
@@ -26,10 +26,10 @@ def show_in_ooo(odfpathname,entryid):
try:ctx = establish_connection()
except: continue
break
- print ("file://"+odfpathname)
+ print (uno.systemPathToFileUrl(odfpathname))
desktop = ctx.ServiceManager.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)
- model = desktop.loadComponentFromURL( "file://"+odfpathname,"_default", 0, () )
+ model = desktop.loadComponentFromURL( uno.systemPathToFileUrl(odfpathname),"_default", 0, () )
dispatcher = ctx.ServiceManager.createInstanceWithContext( "com.sun.star.frame.DispatchHelper",ctx)
dispatcher.executeDispatch(model.getCurrentController().getFrame(),".uno:Reload","",0,())
diff --git a/src/editortab.cpp b/src/editortab.cpp
index 4ab252c..4573b8c 100644
--- a/src/editortab.cpp
+++ b/src/editortab.cpp
@@ -938,7 +938,7 @@ bool EditorTab::fileOpen(QString filePath, QString suggestedDirPath, bool silent
bool EditorTab::saveFileAs()
{
QString filePath=QFileDialog::getSaveFileName(this, i18nc("@title:window", "Save File As"),
- QFileInfo(m_catalog->url()).absolutePath(), m_catalog->fileType());
+ QFileInfo(m_catalog->url()).absoluteFilePath(), m_catalog->fileType());
if (filePath.isEmpty()) return false;
if (!Catalog::extIsSupported(filePath)&&m_catalog->url().contains('.'))
filePath+=m_catalog->url().midRef(m_catalog->url().lastIndexOf('.'));