13#include <com/sun/star/lang/XServiceInfo.hpp>
14#include <com/sun/star/datatransfer/XTransferable.hpp>
15#include <com/sun/star/datatransfer/clipboard/XSystemClipboard.hpp>
16#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
17#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
18#include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp>
21#include <QtGui/QClipboard>
32 public cppu::WeakComponentImplHelper<css::datatransfer::clipboard::XSystemClipboard,
33 css::datatransfer::clipboard::XFlushableClipboard,
34 css::lang::XServiceInfo>
48 css::uno::Reference<css::datatransfer::XTransferable>
m_aContents;
50 css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>
m_aOwner;
51 std::vector<css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>>
m_aListeners;
53 static bool isOwner(
const QClipboard::Mode aMode);
56 explicit QtClipboard(OUString aModeString,
const QClipboard::Mode aMode);
67 static css::uno::Reference<css::uno::XInterface>
create(
const OUString& aModeString);
75 virtual css::uno::Reference<css::datatransfer::XTransferable> SAL_CALL
getContents()
override;
77 const css::uno::Reference<css::datatransfer::XTransferable>& xTrans,
78 const css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>& xClipboardOwner)
80 virtual OUString SAL_CALL
getName()
override;
90 const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
93 const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
This implementation has two main functions, which handle the clipboard content: the XClipboard::setCo...
virtual OUString SAL_CALL getName() override
void handleChanged(QClipboard::Mode mode)
virtual OUString SAL_CALL getImplementationName() override
void handleClearClipboard()
css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner > m_aOwner
virtual void SAL_CALL flushClipboard() override
static css::uno::Reference< css::uno::XInterface > create(const OUString &aModeString)
static bool isSupported(const QClipboard::Mode aMode)
virtual void SAL_CALL removeClipboardListener(const css::uno::Reference< css::datatransfer::clipboard::XClipboardListener > &listener) override
virtual void SAL_CALL addClipboardListener(const css::uno::Reference< css::datatransfer::clipboard::XClipboardListener > &listener) override
QtClipboard(OUString aModeString, const QClipboard::Mode aMode)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
const OUString m_aClipboardName
virtual void SAL_CALL setContents(const css::uno::Reference< css::datatransfer::XTransferable > &xTrans, const css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner > &xClipboardOwner) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
bool m_bOwnClipboardChange
const QClipboard::Mode m_aClipboardMode
css::uno::Reference< css::datatransfer::XTransferable > m_aContents
std::vector< css::uno::Reference< css::datatransfer::clipboard::XClipboardListener > > m_aListeners
virtual css::uno::Reference< css::datatransfer::XTransferable > SAL_CALL getContents() override
static bool isOwner(const QClipboard::Mode aMode)
virtual sal_Int8 SAL_CALL getRenderingCapabilities() override