/* -*- 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/. */ #ifndef INCLUDED_DESKTOP_SOURCE_LIB_LOKCLIPBOARD_HXX #define INCLUDED_DESKTOP_SOURCE_LIB_LOKCLIPBOARD_HXX #include #include #include /// A clipboard implementation for LibreOfficeKit. class LOKClipboard : public cppu::WeakImplHelper { css::uno::Reference m_xTransferable; public: css::uno::Reference SAL_CALL getContents() override; void SAL_CALL setContents(const css::uno::Reference& xTransferable, const css::uno::Reference& xClipboardOwner) override; OUString SAL_CALL getName() override; }; /// Represents the contents of LOKClipboard. class LOKTransferable : public cppu::WeakImplHelper { OString m_aMimeType; css::uno::Sequence m_aSequence; /// Provides a list of flavors, used by getTransferDataFlavors() and isDataFlavorSupported(). std::vector getTransferDataFlavorsAsVector(); public: LOKTransferable(const char* pMimeType, const char* pData, std::size_t nSize); css::uno::Any SAL_CALL getTransferData(const css::datatransfer::DataFlavor& rFlavor) override; css::uno::Sequence SAL_CALL getTransferDataFlavors() override; sal_Bool SAL_CALL isDataFlavorSupported(const css::datatransfer::DataFlavor& rFlavor) override; }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */