diff options
Diffstat (limited to 'dtrans/source/win32/dnd/target.cxx')
-rw-r--r-- | dtrans/source/win32/dnd/target.cxx | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index 14b79b809e39..bdc0b05a51b2 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -19,7 +19,7 @@ #include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> #include <com/sun/star/datatransfer/XTransferable.hpp> - +#include <cppuhelper/supportsservice.hxx> #include <stdio.h> #include "target.hxx" #include "idroptarget.hxx" @@ -27,6 +27,7 @@ #include "targetdropcontext.hxx" #include "targetdragcontext.hxx" #include <rtl/ustring.h> + using namespace cppu; using namespace osl; using namespace com::sun::star::datatransfer; @@ -238,9 +239,6 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams) return 0; } - - - // XServiceInfo OUString SAL_CALL DropTarget::getImplementationName( ) throw (RuntimeException) { @@ -249,9 +247,7 @@ OUString SAL_CALL DropTarget::getImplementationName( ) throw (RuntimeException) // XServiceInfo sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - if( ServiceName == DNDTARGET_SERVICE_NAME ) - return sal_True; - return sal_False; + return cppu::supportsService(this, ServiceName); } Sequence< OUString > SAL_CALL DropTarget::getSupportedServiceNames( ) throw (RuntimeException) @@ -260,8 +256,7 @@ Sequence< OUString > SAL_CALL DropTarget::getSupportedServiceNames( ) throw (Ru return Sequence<OUString>(names, 1); } - -// XDropTarget ---------------------------------------------------------------- +// XDropTarget void SAL_CALL DropTarget::addDropTargetListener( const Reference< XDropTargetListener >& dtl ) throw(RuntimeException) { @@ -286,7 +281,6 @@ void SAL_CALL DropTarget::setActive( sal_Bool _b ) throw(RuntimeException) m_bActive= _b; } - sal_Int8 SAL_CALL DropTarget::getDefaultActions( ) throw(RuntimeException) { return m_nDefaultActions; @@ -298,7 +292,6 @@ void SAL_CALL DropTarget::setDefaultActions( sal_Int8 actions ) throw(RuntimeExc m_nDefaultActions= actions; } - HRESULT DropTarget::DragEnter( IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, @@ -490,8 +483,6 @@ HRESULT DropTarget::Drop( IDataObject * /*pDataObj*/, return S_OK; } - - void DropTarget::fire_drop( const DropTargetDropEvent& dte) { OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) ); @@ -563,7 +554,7 @@ void DropTarget::fire_dropActionChanged( const DropTargetDragEvent& dtde ) } } -// Non - interface functions ============================================================ +// Non - interface functions // DropTarget fires events to XDropTargetListeners. The event object contains an // XDropTargetDropContext implementaion. When the listener calls on that interface // then the calls are delegated from DropContext (XDropTargetDropContext) to these @@ -597,7 +588,7 @@ void DropTarget::_dropComplete(sal_Bool success, const Reference<XDropTargetDrop m_bDropComplete= success; } } -// -------------------------------------------------------------------------------------- + // DropTarget fires events to XDropTargetListeners. The event object can contains an // XDropTargetDragContext implementaion. When the listener calls on that interface // then the calls are delegated from DragContext (XDropTargetDragContext) to these @@ -620,10 +611,6 @@ void DropTarget::_rejectDrag( const Reference<XDropTargetDragContext>& context) } } - -//-------------------------------------------------------------------------------------- - - // This function determines the action dependend on the pressed // key modifiers ( CTRL, SHIFT, ALT, Right Mouse Button). The result // is then checked against the allowed actions which can be set through |