135360
From 2ff05dd30cb865b4a44d988370eb554acdca522a Mon Sep 17 00:00:00 2001
135360
From: Miklos Vajna <vmiklos@collabora.co.uk>
135360
Date: Thu, 22 Oct 2015 09:41:29 +0200
135360
Subject: [PATCH 232/398] vcl: add Window::SetClipboard()
135360
135360
Change-Id: I385f64b7d5015c9a34f34a436b0ee2ce6b3a83d3
135360
(cherry picked from commit 98cdb563c1c63e93b4722721354d86848d2cd2c2)
135360
---
135360
 include/vcl/window.hxx       | 2 ++
135360
 vcl/source/window/window.cxx | 6 ++++++
135360
 2 files changed, 8 insertions(+)
135360
135360
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
135360
index ae2894001974..eb8cf4bc1df1 100644
135360
--- a/include/vcl/window.hxx
135360
+++ b/include/vcl/window.hxx
135360
@@ -1298,6 +1298,8 @@ public:
135360
 
135360
     // Clipboard/Selection interfaces
135360
     ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetClipboard();
135360
+    /// Sets a custom clipboard for the window's frame, instead of creating it on-demand using css::datatransfer::clipboard::SystemClipboard.
135360
+    void SetClipboard(css::uno::Reference<css::datatransfer::clipboard::XClipboard> xClipboard);
135360
     ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > GetPrimarySelection();
135360
 
135360
     /*
135360
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
135360
index e8d2b9615d92..0a01a14f4530 100644
135360
--- a/vcl/source/window/window.cxx
135360
+++ b/vcl/source/window/window.cxx
135360
@@ -3355,6 +3355,12 @@ void Window::ImplCallActivateListeners( vcl::Window *pOld )
135360
     }
135360
 }
135360
 
135360
+void Window::SetClipboard(Reference<XClipboard> xClipboard)
135360
+{
135360
+    if (mpWindowImpl->mpFrameData)
135360
+        mpWindowImpl->mpFrameData->mxClipboard = xClipboard;
135360
+}
135360
+
135360
 Reference< XClipboard > Window::GetClipboard()
135360
 {
135360
 
135360
-- 
135360
2.12.0
135360