Kaydet (Commit) 98b7cf19 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Thorsten Behrens

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: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
(cherry picked from commit b8ac898e)
Reviewed-on: https://gerrit.libreoffice.org/67442Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 18a451e4
...@@ -44,9 +44,18 @@ css::uno::Any Qt5DnDTransferable::getTransferData(const css::datatransfer::DataF ...@@ -44,9 +44,18 @@ css::uno::Any Qt5DnDTransferable::getTransferData(const css::datatransfer::DataF
if (urlList.size() > 0) if (urlList.size() > 0)
{ {
//FIXME: multiple URLs, here we take only 1st one std::string aStr;
QString url = urlList.at(0).path();
std::string aStr = url.toStdString(); // 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()); Sequence<sal_Int8> aSeq(reinterpret_cast<const sal_Int8*>(aStr.c_str()), aStr.length());
aAny <<= aSeq; aAny <<= aSeq;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment