[Libreoffice-commits] core.git: vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Feb 2 13:21:59 UTC 2019
vcl/qt5/Qt5DragAndDrop.cxx | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
New commits:
commit b8ac898eb0e1ce9f068e5b4e0c4b04a729a394cb
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Sat Feb 2 10:07:21 2019 +0100
Commit: Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Sat Feb 2 14:21:39 2019 +0100
tdf#120772: DnD of multiple URLs from file manager -> LibO
Change-Id: I8d6fc446eff46fd6ab1152a3af836df891dde52a
Reviewed-on: https://gerrit.libreoffice.org/67277
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx
index 9352eea1cc47..fcd65fe39049 100644
--- a/vcl/qt5/Qt5DragAndDrop.cxx
+++ b/vcl/qt5/Qt5DragAndDrop.cxx
@@ -44,9 +44,18 @@ css::uno::Any Qt5DnDTransferable::getTransferData(const css::datatransfer::DataF
if (urlList.size() > 0)
{
- //FIXME: multiple URLs, here we take only 1st one
- QString url = urlList.at(0).path();
- std::string aStr = url.toStdString();
+ std::string aStr;
+
+ // transfer data is list of URLs
+ for (int i = 0; i < urlList.size(); ++i)
+ {
+ QString url = urlList.at(i).path();
+ aStr += url.toStdString();
+ // separated by newline if more than 1
+ if (i < urlList.size() - 1)
+ aStr += "\n";
+ }
+
Sequence<sal_Int8> aSeq(reinterpret_cast<const sal_Int8*>(aStr.c_str()), aStr.length());
aAny <<= aSeq;
}
More information about the Libreoffice-commits
mailing list