[Libreoffice-commits] core.git: sc/source
Tamas Bunth
tamas.bunth at collabora.co.uk
Wed Jul 19 12:10:52 UTC 2017
sc/source/ui/vba/vbafiledialog.cxx | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
New commits:
commit 831153d465b7091f2021f94bb10e725e0c48c684
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
Date: Wed Jul 19 11:01:47 2017 +0000
vbaapi: File dialog produces path
instead of file url
Change-Id: I6f4cab23edd1fabe93290a26adc5fb77f2a55e8b
Reviewed-on: https://gerrit.libreoffice.org/40170
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96 at gmail.com>
diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx
index 1129953dff02..f9a95cebdb87 100644
--- a/sc/source/ui/vba/vbafiledialog.cxx
+++ b/sc/source/ui/vba/vbafiledialog.cxx
@@ -19,6 +19,8 @@
#include "vbafiledialog.hxx"
+#include <osl/file.hxx>
+
#include <ooo/vba/office/MsoFileDialogType.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -84,8 +86,11 @@ sal_Int32 ScVbaFileDialog::Show()
break;
}
- for( auto& sPath : xFilePicker->getSelectedFiles() )
+ for( auto& sURL : xFilePicker->getSelectedFiles() )
{
+ OUString sPath;
+ osl::FileBase::getSystemPathFromFileURL(sURL, sPath);
+
sSelectedPaths.push_back(sPath);
}
}
@@ -103,10 +108,15 @@ sal_Int32 ScVbaFileDialog::Show()
break;
}
- OUString sPath = xFolderPicker->getDirectory();
+ OUString sURL = xFolderPicker->getDirectory();
+
+ if(!sURL.isEmpty())
+ {
+ OUString sPath;
+ osl::FileBase::getSystemPathFromFileURL(sURL, sPath);
- if(!sPath.isEmpty())
sSelectedPaths.push_back(sPath);
+ }
}
break;
More information about the Libreoffice-commits
mailing list