diff options
Diffstat (limited to 'vcl/qa/cppunit/dndtest.cxx')
-rw-r--r-- | vcl/qa/cppunit/dndtest.cxx | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/vcl/qa/cppunit/dndtest.cxx b/vcl/qa/cppunit/dndtest.cxx index e0f9d92cfa3f..8e85894c78ec 100644 --- a/vcl/qa/cppunit/dndtest.cxx +++ b/vcl/qa/cppunit/dndtest.cxx @@ -46,8 +46,6 @@ using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::datatransfer::clipboard; using namespace ::com::sun::star::datatransfer::dnd; - - class MyWin : public WorkWindow { public: @@ -62,8 +60,6 @@ public: void Resize(); }; - - class MyDragAndDropListener: public ::cppu::WeakImplHelper3 < XDropTargetListener, XDragGestureListener, XDragSourceListener > { Window * m_pWindow; @@ -86,8 +82,6 @@ public: virtual void SAL_CALL disposing( const EventObject& eo ) throw(RuntimeException); }; - - class MyInfoBox : public InfoBox { @@ -96,8 +90,6 @@ public: MyInfoBox( Window* pParent ); }; - - class MyListBox : public ListBox { @@ -106,8 +98,6 @@ public: MyListBox( Window* pParent ); }; - - class StringTransferable : public ::cppu::WeakImplHelper1< XTransferable > { const OUString m_aData; @@ -129,9 +119,6 @@ public: virtual bool SAL_CALL isDataFlavorSupported( const DataFlavor& aFlavor ) throw(RuntimeException); }; - - - class VclDnDTest : public test::BootstrapFixture { public: @@ -145,8 +132,6 @@ public: CPPUNIT_TEST_SUITE_END(); }; - - void VclDnDTest::testDnD() { MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); @@ -167,8 +152,6 @@ void VclDnDTest::testDnD() aListBox.Show(); } - - MyWin::MyWin( Window* pParent, WinBits nWinStyle ) : WorkWindow( pParent, nWinStyle ) { @@ -186,135 +169,95 @@ MyWin::MyWin( Window* pParent, WinBits nWinStyle ) : xRecognizer->addDragGestureListener( Reference< XDragGestureListener > ( xListener, UNO_QUERY ) ); } - - void MyWin::MouseMove( const MouseEvent& rMEvt ) { WorkWindow::MouseMove( rMEvt ); } - - void MyWin::MouseButtonDown( const MouseEvent& rMEvt ) { WorkWindow::MouseButtonDown( rMEvt ); } - - void MyWin::MouseButtonUp( const MouseEvent& rMEvt ) { WorkWindow::MouseButtonUp( rMEvt ); } - - void MyWin::KeyInput( const KeyEvent& rKEvt ) { WorkWindow::KeyInput( rKEvt ); } - - void MyWin::KeyUp( const KeyEvent& rKEvt ) { WorkWindow::KeyUp( rKEvt ); } - - void MyWin::Paint( const Rectangle& rRect ) { WorkWindow::Paint( rRect ); } - - void MyWin::Resize() { WorkWindow::Resize(); } - - void SAL_CALL MyDragAndDropListener::dragGestureRecognized( const DragGestureEvent& dge ) throw(RuntimeException) { Reference< XDragSource > xDragSource( dge.DragSource, UNO_QUERY ); xDragSource->startDrag( dge, -1, 0, 0, new StringTransferable( OUString("TestString") ), this ); } - - void SAL_CALL MyDragAndDropListener::drop( const DropTargetDropEvent& dtde ) throw(RuntimeException) { dtde.Context->dropComplete( true ); } - - void SAL_CALL MyDragAndDropListener::dragEnter( const DropTargetDragEnterEvent& dtdee ) throw(RuntimeException) { dtdee.Context->acceptDrag( dtdee.DropAction ); } - - void SAL_CALL MyDragAndDropListener::dragExit( const DropTargetEvent& ) throw(RuntimeException) { } - - void SAL_CALL MyDragAndDropListener::dragOver( const DropTargetDragEvent& dtde ) throw(RuntimeException) { dtde.Context->acceptDrag( dtde.DropAction ); } - - void SAL_CALL MyDragAndDropListener::dropActionChanged( const DropTargetDragEvent& dtde ) throw(RuntimeException) { dtde.Context->acceptDrag( dtde.DropAction ); } - - void SAL_CALL MyDragAndDropListener::dragDropEnd( const DragSourceDropEvent& ) throw(RuntimeException) { } - - void SAL_CALL MyDragAndDropListener::dragEnter( const DragSourceDragEvent& ) throw(RuntimeException) { } - - void SAL_CALL MyDragAndDropListener::dragExit( const DragSourceEvent& ) throw(RuntimeException) { } - - void SAL_CALL MyDragAndDropListener::dragOver( const DragSourceDragEvent& ) throw(RuntimeException) { } - - void SAL_CALL MyDragAndDropListener::dropActionChanged( const DragSourceDragEvent& ) throw(RuntimeException) { } - - void SAL_CALL MyDragAndDropListener::disposing( const EventObject& ) throw(RuntimeException) { } - - MyInfoBox::MyInfoBox( Window* pParent ) : InfoBox( pParent, OUString("dragging over this box should result in another window id in the drag log.") ) { @@ -332,8 +275,6 @@ MyInfoBox::MyInfoBox( Window* pParent ) : InfoBox( pParent, xRecognizer->addDragGestureListener( Reference< XDragGestureListener > ( xListener, UNO_QUERY ) ); }; - - MyListBox::MyListBox( Window* pParent ) : ListBox( pParent ) { Reference< XDropTargetListener > xListener = new MyDragAndDropListener( this ); @@ -350,24 +291,18 @@ MyListBox::MyListBox( Window* pParent ) : ListBox( pParent ) xRecognizer->addDragGestureListener( Reference< XDragGestureListener > ( xListener, UNO_QUERY ) ); }; - - Any SAL_CALL StringTransferable::getTransferData( const DataFlavor& ) throw(UnsupportedFlavorException, IOException, RuntimeException) { return makeAny( m_aData ); } - - Sequence< DataFlavor > SAL_CALL StringTransferable::getTransferDataFlavors( ) throw(RuntimeException) { return m_aFlavorList; } - - bool SAL_CALL StringTransferable::isDataFlavorSupported( const DataFlavor& ) throw(RuntimeException) { |