Blame SOURCES/0341-sw-lok-comments-implement-clipboard-copy.patch

135360
From 7bcb6ab4daf9e166cbc8677dd7aa370253203d0f Mon Sep 17 00:00:00 2001
135360
From: Miklos Vajna <vmiklos@collabora.co.uk>
135360
Date: Tue, 17 Nov 2015 18:28:57 +0100
135360
Subject: [PATCH 341/398] sw lok comments: implement clipboard copy
135360
135360
Change-Id: I0f45b1a6ab198a8403073eea05497e76f758250c
135360
(cherry picked from commit 7b69161302bd12bf383671749e67b7d04ac4f41e)
135360
---
135360
 sw/source/uibase/uno/unotxdoc.cxx | 12 ++++++++++++
135360
 1 file changed, 12 insertions(+)
135360
135360
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
135360
index 53bb2506928b..7f94eb037861 100644
135360
--- a/sw/source/uibase/uno/unotxdoc.cxx
135360
+++ b/sw/source/uibase/uno/unotxdoc.cxx
135360
@@ -134,6 +134,8 @@
135360
 #include <srcview.hxx>
135360
 #include <edtwin.hxx>
135360
 #include <swdtflvr.hxx>
135360
+#include <SidebarWin.hxx>
135360
+#include <PostItMgr.hxx>
135360
 
135360
 #include <svtools/langtab.hxx>
135360
 #include <svtools/miscopt.hxx>
135360
@@ -3382,6 +3384,16 @@ OString SwXTextDocument::getTextSelection(const char* pMimeType, OString& rUsedM
135360
         }
135360
     }
135360
 
135360
+    if (SwPostItMgr* pPostItMgr = pDocShell->GetView()->GetPostItMgr())
135360
+    {
135360
+        if (sw::sidebarwindows::SwSidebarWin* pWin = pPostItMgr->GetActiveSidebarWin())
135360
+        {
135360
+            // Editing postit text.
135360
+            EditView& rEditView = pWin->GetOutlinerView()->GetEditView();
135360
+            xTransferable = rEditView.GetEditEngine()->CreateTransferable(rEditView.GetSelection());
135360
+        }
135360
+    }
135360
+
135360
     if (!xTransferable.is())
135360
         xTransferable = new SwTransferable(*pWrtShell);
135360
 
135360
-- 
135360
2.12.0
135360