diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-11-18 10:12:38 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-11-27 11:42:16 +0100 |
commit | 3000f3ee1ac63deff58fa5725a6f6c2f05aec9bb (patch) | |
tree | f658dc1a83b59519f555810b05899c1cf6621151 /vcl/jsdialog/executor.cxx | |
parent | f3fc16f444f84a269df9bd2f2c3d2a47cf49d057 (diff) |
jsdialog: drag and drop support for TreeView
Change-Id: I67e2eb986b48591b7f758bbb5c1d72b6a322d4d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106705
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl/jsdialog/executor.cxx')
-rw-r--r-- | vcl/jsdialog/executor.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 24e3eb1f14d3..13ffc1a33e06 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -206,6 +206,27 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat pTreeView->select(nRow); LOKTrigger::trigger_row_activated(*pTreeView); + return true; + } + else if (sAction == "dragstart") + { + OString nRowString + = OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US); + int nRow = std::atoi(nRowString.getStr()); + + pTreeView->select(nRow); + + JSTreeView* pJSTreeView = dynamic_cast<JSTreeView*>(pTreeView); + if (pJSTreeView) + pJSTreeView->drag_start(); + return true; + } + else if (sAction == "dragend") + { + JSTreeView* pJSTreeView = dynamic_cast<JSTreeView*>(pTreeView); + if (pJSTreeView) + pJSTreeView->drag_end(); + return true; } } } |