diff options
-rw-r--r-- | vcl/unx/kde4/KDE4FilePicker.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx index 9758253840c7..048018927c40 100644 --- a/vcl/unx/kde4/KDE4FilePicker.cxx +++ b/vcl/unx/kde4/KDE4FilePicker.cxx @@ -333,15 +333,9 @@ uno::Sequence< OUString > SAL_CALL KDE4FilePicker::getFiles() SalYieldMutexReleaser release; return Q_EMIT getFilesSignal(); } - - KUrl::List urls = _dialog->selectedUrls(); - uno::Sequence< OUString > seq( urls.size()); - // multiselection doesn't really work - // so just retrieve the first url + uno::Sequence< OUString > seq = getSelectedFiles(); if (seq.getLength() > 1) seq.realloc(1); - if (seq.getLength() == 1) - seq[0] = toOUString(urls.front().url()); return seq; } @@ -352,8 +346,12 @@ uno::Sequence< OUString > SAL_CALL KDE4FilePicker::getSelectedFiles() SalYieldMutexReleaser release; return Q_EMIT getSelectedFilesSignal(); } - - return getFiles(); + KUrl::List urls = _dialog->selectedUrls(); + uno::Sequence< OUString > seq( urls.size()); + int i = 0; + foreach( const KUrl& url, urls ) + seq[ i++ ]= toOUString( url.url()); + return seq; } void SAL_CALL KDE4FilePicker::appendFilter( const OUString &title, const OUString &filter ) |