From 72e046f8cb4ed15141e89ed169d5f0627987b647 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 15 Jun 2010 17:36:43 +0200 Subject: ooo30gsl01: #i112249# add missing URL conversion --- fpicker/source/unx/kde4/KDE4FilePicker.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'fpicker/source') diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx index 31c251a31e..744e19f3ab 100644 --- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx +++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx @@ -46,6 +46,8 @@ #include #include +#include "osl/file.h" + #include "KDE4FilePicker.hxx" #include "FPServiceInfo.hxx" @@ -246,7 +248,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles() // kde file picker returns the file and directories for selectedFiles() // when a file is double clicked // make a true list of files - const QString dir = "file://" + KUrl(rawFiles[0]).directory(); + const QString dir = KUrl(rawFiles[0]).directory(); bool singleFile = true; if (rawFiles.size() > 1) @@ -262,7 +264,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles() { // if the raw file is not the base directory (see above kde bug) // we add the file to list of avail files - if ((dir + "/") != ("file://" + rawFiles[i])) + if ((dir + "/") != ( rawFiles[i])) { QString filename = KUrl(rawFiles[i]).fileName(); @@ -280,7 +282,11 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles() // add all files and leading directory to outgoing OO sequence uno::Sequence< ::rtl::OUString > seq(files.size()); for (int i = 0; i < files.size(); ++i) - seq[i] = toOUString(files[i]); + { + rtl::OUString aFile(toOUString(files[i])), aURL; + osl_getFileURLFromSystemPath(aFile.pData, &aURL.pData ); + seq[i] = aURL; + } return seq; } -- cgit v1.2.3