[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 6 15:27:14 UTC 2019


 vcl/qt5/Qt5DragAndDrop.cxx |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 98b7cf194f012d06f569259c9379ac71f6cd565a
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Sat Feb 2 10:07:21 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Feb 6 16:26:52 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>
    (cherry picked from commit b8ac898eb0e1ce9f068e5b4e0c4b04a729a394cb)
    Reviewed-on: https://gerrit.libreoffice.org/67442
    Reviewed-by: Thorsten Behrens <Thorsten.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