summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-07-20 11:07:56 +0100
committerMichael Meeks <michael.meeks@collabora.com>2019-08-02 11:41:49 -0400
commitbd304791005f6006487941272dfac525509434ea (patch)
tree2b32b0d7571bde9d1689b2ba30931ca54a3789bf /desktop
parentb7b091ed71557213e9ce9123dfed727393e86b4b (diff)
Set clipboard for a window when created
This allows to paste in dialogs input using tunneled context menu. Change-Id: Ie6cc6f1a6cd453734c8f6084b0bd50d1d7ab6c09
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index af4f531e89ba..96ba15ace3fd 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1529,6 +1529,18 @@ bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData)
}
return false;
});
+
+ VclPtr<Window> pWindow = vcl::Window::FindLOKWindow(nLOKWindowId);
+ if (!pWindow)
+ {
+ gImpl->maLastExceptionMsg = "Document doesn't support dialog rendering, or window not found.";
+ return false;
+ }
+
+ auto xClip = forceSetClipboardForCurrentView(m_pDocument);
+
+ uno::Reference<datatransfer::clipboard::XClipboard> xClipboard(xClip.get());
+ pWindow->SetClipboard(xClipboard);
}
else if (aAction == "size_changed")
{