summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-11-26 17:05:41 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-12-17 16:23:20 +0100
commit8bd8fa55b2fd04006aa43a9e638c8801d24b06ca (patch)
tree5795e2e27e5b760354555e07890608b2199e2919 /offapi
parentf21f0f0ff656880149cfdfd34b8984c9541bca24 (diff)
Make LOKClipboard available to other modules
LOKClipboard has higher level dependencies (sfx2) so it cannot be moved to the vcl where SystemClibpoard instance is created. - introduce new interface LokClipboard to differentiate from SystemClipboard so we can have vcl's and lok's implementations at the same time - publish LOKClipboard using new interface for other modules by adding component file in desktop module Thanks to that when code calls GetClipboard and we cannot get clipboard assigned to the vcl::Window* (for welded widgets) in GetSystemClipboard correct instance is returned (shared clipboard for current view) so we can access content which was copied before. Previously always a new instance was created (with empty content). test ScTiledRenderingTest::testPasteIntoWrapTextCell was broken add some content to clipboard to simulate more real case and test the content copied Change-Id: I23c0298960a710c498646493f33122b908864cba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126310 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'offapi')
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/datatransfer/clipboard/LokClipboard.idl35
2 files changed, 36 insertions, 0 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index a8844748309e..91b1afe15d0b 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -108,6 +108,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/datatransfer,\
MimeContentTypeFactory \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/datatransfer/clipboard,\
+ LokClipboard \
SystemClipboard \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/deployment,\
diff --git a/offapi/com/sun/star/datatransfer/clipboard/LokClipboard.idl b/offapi/com/sun/star/datatransfer/clipboard/LokClipboard.idl
new file mode 100644
index 000000000000..4d9d3dea0646
--- /dev/null
+++ b/offapi/com/sun/star/datatransfer/clipboard/LokClipboard.idl
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_datatransfer_clipboard_LokClipboard_idl__
+#define __com_sun_star_datatransfer_clipboard_LokClipboard_idl__
+
+#include <com/sun/star/datatransfer/clipboard/XSystemClipboard.idl>
+
+module com { module sun { module star { module datatransfer { module clipboard {
+
+/** This service provides access to the clipboard dedicated for current view
+*/
+service LokClipboard : XSystemClipboard;
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */