17#include <com/sun/star/lang/XServiceInfo.hpp>
18#include <com/sun/star/lang/XSingleServiceFactory.hpp>
19#include <com/sun/star/datatransfer/clipboard/XSystemClipboard.hpp>
21using namespace css::uno;
25 :
public cppu::WeakComponentImplHelper<css::datatransfer::clipboard::XSystemClipboard,
26 css::lang::XServiceInfo>
30 css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>
m_aOwner;
31 std::vector<css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>>
m_aListeners;
37 css::uno::Reference<css::uno::XInterface>
getXI()
49 css::uno::Reference<css::datatransfer::XTransferable> SAL_CALL
getContents()
override;
51 const css::uno::Reference<css::datatransfer::XTransferable>& xTransferable,
52 const css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>& xClipboardOwner)
54 OUString SAL_CALL
getName()
override {
return "CLIPBOARD"; }
61 const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
64 const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
69class LOKTransferable :
public cppu::WeakImplHelper<css::datatransfer::XTransferable>
71 css::uno::Sequence<css::datatransfer::DataFlavor>
m_aFlavors;
74 static void initFlavourFromMime(css::datatransfer::DataFlavor& rFlavor, OUString aMimeType);
78 LOKTransferable(
size_t nInCount,
const char** pInMimeTypes,
const size_t* pInSizes,
79 const char** pInStreams);
80 LOKTransferable(
const OUString& sMimeType,
const css::uno::Sequence<sal_Int8>& aSequence);
82 css::uno::Any SAL_CALL
getTransferData(
const css::datatransfer::DataFlavor& rFlavor)
override;
96 :
cppu::WeakComponentImplHelper<css::
lang::XSingleServiceFactory>(
gMutex)
104 css::uno::Reference<css::uno::XInterface> SAL_CALL
Theoretically to hook into the (horrible) vcl dtranscomp.cxx code.
static rtl::Reference< LOKClipboard > getClipboardForCurView()
Fetch clipboard from the global pool.
static void releaseClipboardForView(int nViewId)
Release a clipboard before its document dies, nViewId of -1 clears all.
css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const css::uno::Sequence< css::uno::Any > &) override
css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance() override
A clipboard implementation for LibreOfficeKit.
OUString SAL_CALL getImplementationName() override
static Sequence< OUString > getSupportedServiceNames_static()
css::uno::Reference< css::uno::XInterface > getXI()
get an XInterface easily.
void SAL_CALL setContents(const css::uno::Reference< css::datatransfer::XTransferable > &xTransferable, const css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner > &xClipboardOwner) override
std::vector< css::uno::Reference< css::datatransfer::clipboard::XClipboardListener > > m_aListeners
OUString SAL_CALL getName() override
sal_Int8 SAL_CALL getRenderingCapabilities() override
void SAL_CALL addClipboardListener(const css::uno::Reference< css::datatransfer::clipboard::XClipboardListener > &listener) override
void SAL_CALL removeClipboardListener(const css::uno::Reference< css::datatransfer::clipboard::XClipboardListener > &listener) override
css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner > m_aOwner
css::uno::Reference< css::datatransfer::XTransferable > SAL_CALL getContents() override
Sequence< OUString > SAL_CALL getSupportedServiceNames() override
sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
css::uno::Reference< css::datatransfer::XTransferable > m_xTransferable
Represents the contents of LOKClipboard.
LOKTransferable()
Use to ensure we have some dummy content on the clipboard to allow a 1st 'paste'.
css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors() override
sal_Bool SAL_CALL isDataFlavorSupported(const css::datatransfer::DataFlavor &rFlavor) override
static void initFlavourFromMime(css::datatransfer::DataFlavor &rFlavor, OUString aMimeType)
css::uno::Any SAL_CALL getTransferData(const css::datatransfer::DataFlavor &rFlavor) override
css::uno::Sequence< css::datatransfer::DataFlavor > m_aFlavors
std::vector< css::uno::Any > m_aContent