summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-11-26 17:05:41 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2023-02-07 12:14:10 +0000
commit644513afa28aa6eee7bee40a1182b4a114aac53a (patch)
tree123ad21f0605944ba25d5ae17eb144b98d0d3680 /offapi
parentf30a8f6cb9a755d3ac73c2aafc2f71a0bb0d0369 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131644 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135198 Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146577
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 4913d17747c6..6bd7f932831c 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -107,6 +107,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: */