22 using namespace ::
cppu;
28 : WeakComponentImplHelper< XDragGestureRecognizer, XDropTargetDragContext, XDropTargetDropContext, XDropTarget >(GetMutex())
83 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY,
sal_Int8 sourceActions,
84 const Reference< XTransferable >& transferable )
93 OInterfaceIteratorHelper aIterator( *pContainer );
99 DropTargetDropEvent
aEvent( static_cast < XDropTarget * > (
this), 0,
100 static_cast < XDropTargetDropContext * > (
this), dropAction,
101 locationX, locationY, sourceActions, transferable );
103 while (aIterator.hasMoreElements())
106 Reference< XInterface > xElement( aIterator.next() );
111 Reference < XDropTargetListener > xListener( xElement, UNO_QUERY );
117 xListener->drop( aEvent );
120 DropTargetEvent aDTEvent( static_cast < XDropTarget * > (
this), 0 );
121 xListener->dragExit( aDTEvent );
129 pContainer->removeInterface( xElement );
140 context->rejectDrop();
160 OInterfaceIteratorHelper aIterator( *pContainer );
163 DropTargetEvent
aEvent( static_cast < XDropTarget * > (
this), 0 );
165 while (aIterator.hasMoreElements())
168 Reference< XInterface > xElement( aIterator.next() );
173 Reference < XDropTargetListener > xListener( xElement, UNO_QUERY );
177 xListener->dragExit( aEvent );
183 pContainer->removeInterface( xElement );
192 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY,
sal_Int8 sourceActions )
201 OInterfaceIteratorHelper aIterator( *pContainer );
207 DropTargetDragEvent
aEvent( static_cast < XDropTarget * > (
this), 0,
208 static_cast < XDropTargetDragContext * > (
this),
209 dropAction, locationX, locationY, sourceActions );
211 while (aIterator.hasMoreElements())
214 Reference< XInterface > xElement( aIterator.next() );
219 Reference < XDropTargetListener > xListener( xElement, UNO_QUERY );
224 xListener->dragOver( aEvent );
230 pContainer->removeInterface( xElement );
241 context->rejectDrag();
253 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY,
sal_Int8 sourceActions,
254 const Sequence< DataFlavor >& dataFlavors )
263 OInterfaceIteratorHelper aIterator( *pContainer );
269 DropTargetDragEnterEvent
aEvent( static_cast < XDropTarget * > (
this), 0,
270 static_cast < XDropTargetDragContext * > (
this),
271 dropAction, locationX, locationY, sourceActions, dataFlavors );
273 while (aIterator.hasMoreElements())
276 Reference< XInterface > xElement( aIterator.next() );
281 Reference < XDropTargetListener > xListener( xElement, UNO_QUERY );
286 xListener->dragEnter( aEvent );
292 pContainer->removeInterface( xElement );
303 context->rejectDrag();
315 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY,
sal_Int8 sourceActions )
324 OInterfaceIteratorHelper aIterator( *pContainer );
330 DropTargetDragEvent
aEvent( static_cast < XDropTarget * > (
this), 0,
331 static_cast < XDropTargetDragContext * > (
this),
332 dropAction, locationX, locationY, sourceActions );
334 while (aIterator.hasMoreElements())
337 Reference< XInterface > xElement( aIterator.next() );
342 Reference < XDropTargetListener > xListener( xElement, UNO_QUERY );
347 xListener->dropActionChanged( aEvent );
353 pContainer->removeInterface( xElement );
364 context->rejectDrag();
376 sal_Int32 dragOriginY,
const Reference< XDragSource >& dragSource,
const Any& triggerEvent )
385 OInterfaceIteratorHelper aIterator( *pContainer );
388 DragGestureEvent
aEvent( static_cast < XDragGestureRecognizer * > (
this), dragAction,
389 dragOriginX, dragOriginY, dragSource, triggerEvent );
391 while( aIterator.hasMoreElements() )
394 Reference< XInterface > xElement( aIterator.next() );
399 Reference < XDragGestureListener > xListener( xElement, UNO_QUERY );
403 xListener->dragGestureRecognized( aEvent );
409 pContainer->removeInterface( xElement );
virtual void SAL_CALL acceptDrag(sal_Int8 dragOperation) override
virtual void SAL_CALL addDragGestureListener(const css::uno::Reference< css::datatransfer::dnd::XDragGestureListener > &dgl) override
sal_Int8 m_nDefaultActions
sal_uInt32 fireDragEnterEvent(const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &context, sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, const css::uno::Sequence< css::datatransfer::DataFlavor > &dataFlavor)
virtual void SAL_CALL dropComplete(sal_Bool success) override
sal_uInt32 fireDropActionChangedEvent(const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &context, sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions)
virtual void SAL_CALL rejectDrop() override
sal_uInt32 fireDropEvent(const css::uno::Reference< css::datatransfer::dnd::XDropTargetDropContext > &context, sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, const css::uno::Reference< css::datatransfer::XTransferable > &transferable)
virtual void SAL_CALL removeDragGestureListener(const css::uno::Reference< css::datatransfer::dnd::XDragGestureListener > &dgl) override
virtual ~DNDListenerContainer() override
sal_uInt32 fireDragOverEvent(const css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > &context, sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions)
css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > m_xDropTargetDragContext
virtual void SAL_CALL setDefaultActions(sal_Int8 actions) override
sal_uInt32 fireDragExitEvent()
virtual void SAL_CALL removeDropTargetListener(const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > &dtl) override
virtual void SAL_CALL acceptDrop(sal_Int8 dropOperation) override
virtual sal_Int8 SAL_CALL getDefaultActions() override
virtual void SAL_CALL resetRecognizer() override
virtual void SAL_CALL rejectDrag() override
css::uno::Reference< css::datatransfer::dnd::XDropTargetDropContext > m_xDropTargetDropContext
sal_uInt32 fireDragGestureEvent(sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY, const css::uno::Reference< css::datatransfer::dnd::XDragSource > &dragSource, const css::uno::Any &triggerEvent)
virtual void SAL_CALL addDropTargetListener(const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > &dtl) override
virtual sal_Bool SAL_CALL isActive() override
virtual void SAL_CALL setActive(sal_Bool active) override
DNDListenerContainer(sal_Int8 nDefaultActions)