summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-10 13:08:33 +0100
committerAndras Timar <andras.timar@collabora.com>2017-04-12 17:24:44 +0200
commit0cffb61df73abba1e5c810a5ba604d32476247e3 (patch)
tree57938b6f03dd8ace2028af97e3c9d9a558f554e3
parentfee019d85e2061d0a8d8a926ac6e45a38e1125c8 (diff)
Resolves: tdf#107031 writer depends on ACTION_DEFAULT
to do its standard "honor the DragDropMode setting" on drag and drop of outline headings into a document Change-Id: Ie154fb237de57ae18fa22d6f50dbf890fb9ebc77 (cherry picked from commit 55e7f73640d754bf0004a0d8a989e0a20de00351) Reviewed-on: https://gerrit.libreoffice.org/36378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 3247dce15d041d178fa2a855b53415a80df16a28)
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 550e76e8cbe4..93a3d0138c8d 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3394,6 +3394,14 @@ gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, GdkDragContext* context
aEvent.LocationX = x;
aEvent.LocationY = y;
aEvent.DropAction = GdkToVcl(gdk_drag_context_get_selected_action(context));
+ // ACTION_DEFAULT is documented as...
+ // 'This means the user did not press any key during the Drag and Drop operation
+ // and the action that was combined with ACTION_DEFAULT is the system default action'
+ // in tdf#107031 writer won't insert a link when a heading is dragged from the
+ // navigator unless this is set. Its unclear really what ACTION_DEFAULT means,
+ // there is a deprecated 'GDK_ACTION_DEFAULT Means nothing, and should not be used'
+ // possible equivalent in gtk.
+ aEvent.DropAction |= css::datatransfer::dnd::DNDConstants::ACTION_DEFAULT;
aEvent.SourceActions = GdkToVcl(gdk_drag_context_get_actions(context));
css::uno::Reference<css::datatransfer::XTransferable> xTransferable;
// For LibreOffice internal D&D we provide the Transferable without Gtk