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