19#ifndef INCLUDED_SVX_SOURCE_INC_FMEXCH_HXX
20#define INCLUDED_SVX_SOURCE_INC_FMEXCH_HXX
22#include <config_options.h>
29#include <com/sun/star/uno/Sequence.hxx>
30#include <com/sun/star/form/XForms.hpp>
46 bool m_bClipboardOwner : 1;
51 friend class OLocalExchangeHelper;
57 bool isDragging()
const {
return m_bDragging; }
58 bool isClipboardOwner()
const {
return m_bClipboardOwner; }
60 void setDragging(
bool bDragging);
71 virtual void SAL_CALL lostOwnership(
const css::uno::Reference< css::datatransfer::clipboard::XClipboard >& _rxClipboard,
const css::uno::Reference< css::datatransfer::XTransferable >& _rxTrans )
override;
74 virtual void DragFinished(
sal_Int8 nDropAction )
override;
75 virtual bool GetData(
const css::datatransfer::DataFlavor& rFlavor,
const OUString& rDestDoc )
override;
86 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) OLocalExchangeHelper
92 OLocalExchangeHelper();
93 virtual ~OLocalExchangeHelper();
99 bool isDragSource()
const {
return m_xTransferable.is() && m_xTransferable->isDragging(); }
100 bool isClipboardOwner()
const {
return m_xTransferable.is() && m_xTransferable->isClipboardOwner(); }
101 bool isDataExchangeActive( )
const {
return isDragSource() || isClipboardOwner(); }
102 void clear() {
if ( isDataExchangeActive() ) m_xTransferable->clear(); }
120 css::uno::Sequence< css::uno::Sequence< sal_uInt32 > >
122 css::uno::Sequence< css::uno::Reference< css::uno::XInterface > >
125 css::uno::Reference< css::form::XForms >
133 void updateFormats( );
140 const css::uno::Reference< css::datatransfer::XTransferable >& _rxTransferable
145 void addSelectedEntry(std::unique_ptr<weld::TreeIter> xEntry);
146 void setFocusEntry(
bool _bFocusEntry);
159 const css::uno::Reference< css::form::XForms >& _rxFormsRoot
160 ) { m_xFormsRoot = _rxFormsRoot; }
170 void addHiddenControlsFormat(
const css::uno::Sequence< css::uno::Reference< css::uno::XInterface > >& seqInterfaces);
176 const css::uno::Sequence< css::uno::Reference< css::uno::XInterface > >&
179 const css::uno::Reference< css::form::XForms >&
187 return m_aCurrentFormats;
202 inline static bool hasHiddenControlModelsFormat(
const DataFlavorExVector& _rFormats );
205 virtual bool GetData(
const css::datatransfer::DataFlavor& rFlavor,
const OUString& rDestDoc )
override;
206 virtual void AddSupportedFormats()
override;
224 return hasFormat( _rFormats, getFieldExchangeFormatId() );
229 return hasFormat( _rFormats, getControlPathFormatId() );
234 return hasFormat( _rFormats, getHiddenControlModelsFormatId() );
void StartDrag(vcl::Window *pWindow, sal_Int8 nDragSourceActions, const Link< sal_Int8, void > &rCallback)
::std::vector< DataFlavorEx > DataFlavorExVector
#define SVXCORE_DLLPRIVATE