1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_FORMS_SOURCE_RICHTEXT_CLIPBOARDDISPATCHER_HXX
21 #define INCLUDED_FORMS_SOURCE_RICHTEXT_CLIPBOARDDISPATCHER_HXX
23 #include "featuredispatcher.hxx"
24 #include <tools/link.hxx>
26 class TransferableClipboardListener
;
27 class TransferableDataHelper
;
32 class OClipboardDispatcher
: public ORichTextFeatureDispatcher
43 ClipboardFunc m_eFunc
;
44 bool m_bLastKnownEnabled
;
47 OClipboardDispatcher( EditView
& _rView
, ClipboardFunc _eFunc
);
51 virtual void SAL_CALL
dispatch( const css::util::URL
& URL
, const css::uno::Sequence
< css::beans::PropertyValue
>& Arguments
) throw (css::uno::RuntimeException
, std::exception
) override
;
53 // ORichTextFeatureDispatcher
54 virtual void invalidateFeatureState_Broadcast() override
;
55 virtual css::frame::FeatureStateEvent
56 buildStatusEvent() const override
;
59 /** determines whether our functionality is currently available
60 to be overridden for ePaste
62 virtual bool implIsEnabled( ) const;
65 class OPasteClipboardDispatcher
: public OClipboardDispatcher
68 TransferableClipboardListener
* m_pClipListener
;
69 bool m_bPastePossible
;
72 explicit OPasteClipboardDispatcher( EditView
& _rView
);
75 virtual ~OPasteClipboardDispatcher();
77 // OClipboardDispatcher
78 virtual bool implIsEnabled( ) const override
;
80 // ORichTextFeatureDispatcher
81 virtual void disposing( ::osl::ClearableMutexGuard
& _rClearBeforeNotify
) override
;
84 DECL_LINK_TYPED( OnClipboardChanged
, TransferableDataHelper
*, void );
91 #endif // INCLUDED_FORMS_SOURCE_RICHTEXT_CLIPBOARDDISPATCHER_HXX
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */