From kde-commits Sun Nov 20 17:41:54 2016 From: Nick Shaforostoff Date: Sun, 20 Nov 2016 17:41:54 +0000 To: kde-commits Subject: [lokalize/Applications/16.12] /: CCBUG: 368842 Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=147966372207627 Git commit bf393c36847f0198668953da97831872433ab04a by Nick Shaforostoff. Committed on 20/11/2016 at 17:41. Pushed by shaforo into branch 'Applications/16.12'. CCBUG: 368842 pass also the filename to file save dialog M +2 -2 scripts/xliff2odf-standalone.py M +1 -1 src/editortab.cpp http://commits.kde.org/lokalize/bf393c36847f0198668953da97831872433ab04a 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 =3D establish_connection() except: continue break - print ("file://"+odfpathname) + print (uno.systemPathToFileUrl(odfpathname)) = desktop =3D ctx.ServiceManager.createInstanceWithContext( "com.sun.sta= r.frame.Desktop",ctx) - model =3D desktop.loadComponentFromURL( "file://"+odfpathname,"_defaul= t", 0, () ) + model =3D desktop.loadComponentFromURL( uno.systemPathToFileUrl(odfpat= hname),"_default", 0, () ) = dispatcher =3D ctx.ServiceManager.createInstanceWithContext( "com.sun.= star.frame.DispatchHelper",ctx) dispatcher.executeDispatch(model.getCurrentController().getFrame(),".u= no: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 sugg= estedDirPath, bool silent bool EditorTab::saveFileAs() { QString filePath=3DQFileDialog::getSaveFileName(this, i18nc("@title:wi= ndow", "Save File As"), - QFileInfo(m_catalog->url()).a= bsolutePath(), m_catalog->fileType()); + QFileInfo(m_catalog->url()).a= bsoluteFilePath(), m_catalog->fileType()); if (filePath.isEmpty()) return false; if (!Catalog::extIsSupported(filePath)&&m_catalog->url().contains('.')) filePath+=3Dm_catalog->url().midRef(m_catalog->url().lastIndexOf('= .'));