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