summaryrefslogtreecommitdiff
path: root/dtrans/source/win32/dnd
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2001-02-12 10:11:59 +0000
committerJoachim Lingner <jl@openoffice.org>2001-02-12 10:11:59 +0000
commitb1008047743e01eff06edd12c4d347bff06b1347 (patch)
tree33528a80a681ea775515f962bcc67add7f901bc6 /dtrans/source/win32/dnd
parent2f64c6847744f1f6e412fc6c2c8b0314a7456c5b (diff)
interface changes
Diffstat (limited to 'dtrans/source/win32/dnd')
-rw-r--r--dtrans/source/win32/dnd/makefile.mk26
-rw-r--r--dtrans/source/win32/dnd/source.cxx8
-rw-r--r--dtrans/source/win32/dnd/source.hxx9
-rw-r--r--dtrans/source/win32/dnd/target.cxx49
-rw-r--r--dtrans/source/win32/dnd/target.hxx30
-rw-r--r--dtrans/source/win32/dnd/targetdragcontext.cxx14
-rw-r--r--dtrans/source/win32/dnd/targetdragcontext.hxx16
-rw-r--r--dtrans/source/win32/dnd/targetdropcontext.cxx21
-rw-r--r--dtrans/source/win32/dnd/targetdropcontext.hxx25
9 files changed, 100 insertions, 98 deletions
diff --git a/dtrans/source/win32/dnd/makefile.mk b/dtrans/source/win32/dnd/makefile.mk
index 7358919b4f71..ed3f2a5d294f 100644
--- a/dtrans/source/win32/dnd/makefile.mk
+++ b/dtrans/source/win32/dnd/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.3 $
+# $Revision: 1.4 $
#
-# last change: $Author: jl $ $Date: 2001-02-09 07:51:22 $
+# last change: $Author: jl $ $Date: 2001-02-12 11:11:59 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -90,18 +90,18 @@ stoponerror=tr
#DBG_CLIPBOARD_DATA: To provide DoDragDrop with an data object we call OleGetClipboard
#CFLAGS+= -DDBG_CONSOLE_OUT
-SLOFILES= $(OBJ)$/dndentry.obj \
- $(OBJ)$/target.obj \
- $(OBJ)$/source.obj \
- $(OBJ)$/globals.obj \
- $(OBJ)$/targetdropcontext.obj \
- $(OBJ)$/targetdragcontext.obj \
- $(OBJ)$/sourcecontext.obj \
+SLOFILES= $(SLO)$/dndentry.obj \
+ $(SLO)$/target.obj \
+ $(SLO)$/source.obj \
+ $(SLO)$/globals.obj \
+ $(SLO)$/targetdropcontext.obj \
+ $(SLO)$/targetdragcontext.obj \
+ $(SLO)$/sourcecontext.obj \
+ $(SLO)$/TransferableWrapper.obj \
+ $(SLO)$/TxtConvertHelper.obj \
$(SLO)$/DataObjectWrapper.obj \
- $(OBJ)$/ImplHelper.obj \
- $(OBJ)$/DTransHelper.obj \
- $(OBJ)$/TransferableWrapper.obj \
- $(OBJ)$/TxtConvertHelper.obj
+ $(SLO)$/ImplHelper.obj \
+ $(SLO)$/DTransHelper.obj \
# DataObjectWrapper.obj, ImplHelper.obj, DTransHelper.obj, TransferableWrapper.obj have to be removed when Transferables are available as service
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index d20412a6b501..50031735c594 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: source.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jl $ $Date: 2001-02-08 17:12:55 $
+ * last change: $Author: jl $ $Date: 2001-02-12 11:11:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -135,13 +135,13 @@ sal_Int32 SAL_CALL DragSource::getDefaultCursor( sal_Int8 dragAction )
}
// Notifies the XDragSourceListener by calling dragDropEnd
-void SAL_CALL DragSource::executeDrag( const DragGestureEvent& trigger,
+void SAL_CALL DragSource::startDrag( const DragGestureEvent& trigger,
sal_Int8 sourceActions,
sal_Int32 cursor,
sal_Int32 image,
const Reference<XTransferable >& trans,
const Reference<XDragSourceListener >& listener )
- throw( InvalidDNDOperationException, RuntimeException)
+ throw( RuntimeException)
{
// The actions supported by the drag source
m_sourceActions= sourceActions;
diff --git a/dtrans/source/win32/dnd/source.hxx b/dtrans/source/win32/dnd/source.hxx
index 0c6c4b5b6bac..68bafe282ce8 100644
--- a/dtrans/source/win32/dnd/source.hxx
+++ b/dtrans/source/win32/dnd/source.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: source.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jl $ $Date: 2001-02-08 14:30:48 $
+ * last change: $Author: jl $ $Date: 2001-02-12 11:11:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -143,17 +143,18 @@ public:
virtual void SAL_CALL initialize( const Sequence< Any >& aArguments )
throw(Exception, RuntimeException);
+
// XDragSource
virtual sal_Bool SAL_CALL isDragImageSupported( ) throw(RuntimeException);
virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction )
throw( IllegalArgumentException, RuntimeException);
- virtual void SAL_CALL executeDrag( const DragGestureEvent& trigger,
+ virtual void SAL_CALL startDrag( const DragGestureEvent& trigger,
sal_Int8 sourceActions,
sal_Int32 cursor,
sal_Int32 image,
const Reference<XTransferable >& trans,
const Reference<XDragSourceListener >& listener )
- throw( InvalidDNDOperationException, RuntimeException);
+ throw( RuntimeException);
diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx
index 05b00076f003..826b771e6264 100644
--- a/dtrans/source/win32/dnd/target.cxx
+++ b/dtrans/source/win32/dnd/target.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: target.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jl $ $Date: 2001-02-08 14:30:48 $
+ * last change: $Author: jl $ $Date: 2001-02-12 11:11:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,6 +65,7 @@
#ifndef _COM_SUN_STAR_DATATRANSFER_XTRANSFERABLE_HPP_
#include <com/sun/star/datatransfer/XTransferable.hpp>
#endif
+
#include <stdio.h>
#include "target.hxx"
#include "globals.hxx"
@@ -234,7 +235,9 @@ STDMETHODIMP DropTarget::DragEnter( IDataObject __RPC_FAR *pDataObj,
m_userAction= m_nListenerDropAction;
if( m_nListenerDropAction != ACTION_NONE)
{
- DropTargetDragEvent e;
+ m_currentData= static_cast<XTransferable*>( new DNDTransferable( pDataObj) );
+ DropTargetDragEnterEvent e;
+ e.SupportedDataFlavors= m_currentData->getTransferDataFlavors();
e.DropAction= m_nListenerDropAction;
e.Source= Reference<XInterface>( static_cast<XDropTarget*>(this),UNO_QUERY);
e.Context= static_cast<XDropTargetDragContext*>( new TargetDragContext( static_cast<DropTarget*>(this),
@@ -245,7 +248,6 @@ STDMETHODIMP DropTarget::DragEnter( IDataObject __RPC_FAR *pDataObj,
e.Location.Y= point.y;
e.SourceActions= dndOleDropEffectsToActions( *pdwEffect);
- m_currentData= static_cast<XTransferable*>( new DNDTransferable( pDataObj) );
// The Event contains a XDropTargetDragContext Implementation. A listener is only allowd to call
// on it in the same thread and in event handler where it receives that event.
@@ -403,7 +405,7 @@ void DropTarget::fire_drop( const DropTargetDropEvent& dte)
}
}
-void DropTarget::fire_dragEnter( const DropTargetDragEvent& dtde )
+void DropTarget::fire_dragEnter( const DropTargetDragEnterEvent& e )
{
OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
if( pContainer)
@@ -412,7 +414,7 @@ void DropTarget::fire_dragEnter( const DropTargetDragEvent& dtde )
while( iter.hasMoreElements())
{
Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
- listener->dragEnter( dtde);
+ listener->dragEnter( e);
}
}
}
@@ -472,36 +474,33 @@ void DropTarget::fire_dropActionChanged( const DropTargetDragEvent& dtde )
// return sal_False results in throwing a InvalidDNDOperationException in the caller.
void DropTarget::_acceptDrop(sal_Int8 dropOperation, sal_uInt32 id)
- throw(InvalidDNDOperationException)
{
if( m_currentEventId == id)
{
m_nListenerDropAction= dropOperation;
}
- else
- throw InvalidDNDOperationException();
+// else
+// throw InvalidDNDOperationException();
}
void DropTarget::_rejectDrop(sal_uInt32 id)
- throw(InvalidDNDOperationException)
{
if( m_currentEventId == id)
{
m_nListenerDropAction= ACTION_NONE;
}
- else
- throw InvalidDNDOperationException();
+// else
+// throw InvalidDNDOperationException();
}
void DropTarget::_dropComplete(sal_Bool success, sal_uInt32 id)
- throw(InvalidDNDOperationException)
{
if( m_currentEventId == id)
{
m_bDropComplete= success;
}
- else
- throw InvalidDNDOperationException();
+// else
+// throw InvalidDNDOperationException();
}
// --------------------------------------------------------------------------------------
// DropTarget fires events to XDropTargetListeners. The event object can contains an
@@ -511,29 +510,26 @@ void DropTarget::_dropComplete(sal_Bool success, sal_uInt32 id)
// Only one listener which visible area is affected is allowed to call on
// XDropTargetDragContext
void DropTarget::_acceptDrag( sal_Int8 dragOperation, sal_uInt32 id)
- throw(InvalidDNDOperationException)
{
if( m_currentEventId == id)
{
m_nListenerDropAction= dragOperation;
}
- else
- throw InvalidDNDOperationException();
+// else
+// throw InvalidDNDOperationException();
}
void DropTarget::_rejectDrag( sal_uInt32 id)
- throw(InvalidDNDOperationException)
{
if( m_currentEventId == id)
{
m_nListenerDropAction= ACTION_NONE;
}
- else
- throw InvalidDNDOperationException();
+// else
+// throw InvalidDNDOperationException();
}
Sequence<DataFlavor> DropTarget::_getCurrentDataFlavors( sal_uInt32 id)
- throw( InvalidDNDOperationException)
{
Sequence<DataFlavor> retVal;
if( m_currentEventId == id)
@@ -541,13 +537,12 @@ Sequence<DataFlavor> DropTarget::_getCurrentDataFlavors( sal_uInt32 id)
if( m_currentData.is())
retVal= m_currentData->getTransferDataFlavors();
}
- else
- throw InvalidDNDOperationException();
+// else
+// throw InvalidDNDOperationException();
return retVal;
}
sal_Bool DropTarget::_isDataFlavorSupported( const DataFlavor& df, sal_uInt32 id)
- throw(InvalidDNDOperationException)
{
sal_Bool ret= sal_False;
if( m_currentEventId == id)
@@ -555,8 +550,8 @@ sal_Bool DropTarget::_isDataFlavorSupported( const DataFlavor& df, sal_uInt32 id
if( m_currentData.is())
ret= m_currentData->isDataFlavorSupported( df);
}
- else
- throw InvalidDNDOperationException();
+// else
+// throw InvalidDNDOperationException();
return ret;
}
//--------------------------------------------------------------------------------------
diff --git a/dtrans/source/win32/dnd/target.hxx b/dtrans/source/win32/dnd/target.hxx
index 4c3370ab38ce..e5a044b197a9 100644
--- a/dtrans/source/win32/dnd/target.hxx
+++ b/dtrans/source/win32/dnd/target.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: target.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jl $ $Date: 2001-02-08 14:30:48 $
+ * last change: $Author: jl $ $Date: 2001-02-12 11:11:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,6 +67,10 @@
#ifndef _COM_SUN_STAR_DATATRANSFER_DND_XDROPTARGET_HPP_
#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
#endif
+#ifndef _COM_SUN_STAR_DATATRANSFER_DND_DROPTARGETDRAGENTEREVENT_HPP_
+#include <com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hpp>
+#endif
+
#ifndef _CPPUHELPER_COMPBASE2_HXX_
#include <cppuhelper/compbase2.hxx>
#endif
@@ -181,25 +185,19 @@ public:
// XDropTargetDropContext delegated from DropContext
// return false signifies the caller to throw a InvalidDNDOperationException
- void _acceptDrop( sal_Int8 dropOperation, sal_uInt32 id)
- throw (InvalidDNDOperationException);
+ void _acceptDrop( sal_Int8 dropOperation, sal_uInt32 id);
// return false signifies the caller to throw a InvalidDNDOperationException
- void _rejectDrop( sal_uInt32 id)
- throw (InvalidDNDOperationException);
+ void _rejectDrop( sal_uInt32 id);
// return false signifies the caller to throw a InvalidDNDOperationException
- void _dropComplete( sal_Bool success, sal_uInt32)
- throw (InvalidDNDOperationException);
+ void _dropComplete( sal_Bool success, sal_uInt32);
// XDropTargetDragContext delegated from DragContext
// return false signifies the caller to throw a InvalidDNDOperationException
- void _acceptDrag( sal_Int8 dragOperation, sal_uInt32)
- throw (InvalidDNDOperationException);
+ void _acceptDrag( sal_Int8 dragOperation, sal_uInt32);
// return false signifies the caller to throw a InvalidDNDOperationException
- void _rejectDrag( sal_uInt32)throw (InvalidDNDOperationException);
- Sequence<DataFlavor> _getCurrentDataFlavors( sal_uInt32 id)
- throw (InvalidDNDOperationException);
- sal_Bool _isDataFlavorSupported( const DataFlavor& df, sal_uInt32 id)
- throw (InvalidDNDOperationException);
+ void _rejectDrag( sal_uInt32);
+ Sequence<DataFlavor> _getCurrentDataFlavors( sal_uInt32 id);
+ sal_Bool _isDataFlavorSupported( const DataFlavor& df, sal_uInt32 id);
protected:
@@ -213,7 +211,7 @@ protected:
void fire_drop( const DropTargetDropEvent& dte);
- void fire_dragEnter( const DropTargetDragEvent& dtde );
+ void fire_dragEnter( const DropTargetDragEnterEvent& dtde );
void fire_dragExit( const DropTargetEvent& dte );
void fire_dragOver( const DropTargetDragEvent& dtde );
void fire_dropActionChanged( const DropTargetDragEvent& dtde );
diff --git a/dtrans/source/win32/dnd/targetdragcontext.cxx b/dtrans/source/win32/dnd/targetdragcontext.cxx
index da37560b11fb..f079ef73025e 100644
--- a/dtrans/source/win32/dnd/targetdragcontext.cxx
+++ b/dtrans/source/win32/dnd/targetdragcontext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: targetdragcontext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jl $ $Date: 2001-02-08 14:30:48 $
+ * last change: $Author: jl $ $Date: 2001-02-12 11:11:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,18 +74,19 @@ TargetDragContext::~TargetDragContext()
m_pDropTarget->release();
}
-void SAL_CALL TargetDragContext::accept( sal_Int8 dragOperation )
- throw(InvalidDNDOperationException, RuntimeException)
+void SAL_CALL TargetDragContext::acceptDrag( sal_Int8 dragOperation )
+ throw( RuntimeException)
{
m_pDropTarget->_acceptDrag( dragOperation, m_id);
}
-void SAL_CALL TargetDragContext::reject( )
- throw(InvalidDNDOperationException, RuntimeException)
+void SAL_CALL TargetDragContext::rejectDrag( )
+ throw( RuntimeException)
{
m_pDropTarget->_rejectDrag( m_id);
}
+/*
Sequence< DataFlavor > SAL_CALL TargetDragContext::getCurrentDataFlavors( )
throw(RuntimeException)
{
@@ -97,3 +98,4 @@ sal_Bool SAL_CALL TargetDragContext::isDataFlavorSupported( const DataFlavor& df
{
return m_pDropTarget->_isDataFlavorSupported( df, m_id);
}
+*/ \ No newline at end of file
diff --git a/dtrans/source/win32/dnd/targetdragcontext.hxx b/dtrans/source/win32/dnd/targetdragcontext.hxx
index 0f3dbcf8a46d..b8e77d4a3503 100644
--- a/dtrans/source/win32/dnd/targetdragcontext.hxx
+++ b/dtrans/source/win32/dnd/targetdragcontext.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: targetdragcontext.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jl $ $Date: 2001-02-08 14:30:48 $
+ * last change: $Author: jl $ $Date: 2001-02-12 11:11:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,14 +94,16 @@ public:
TargetDragContext( DropTarget* pTarget, sal_uInt32 id);
~TargetDragContext();
- virtual void SAL_CALL accept( sal_Int8 dragOperation )
- throw(InvalidDNDOperationException, RuntimeException);
- virtual void SAL_CALL reject( )
- throw(InvalidDNDOperationException, RuntimeException);
- virtual Sequence< DataFlavor > SAL_CALL getCurrentDataFlavors( )
+
+ virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation )
+ throw( RuntimeException);
+ virtual void SAL_CALL rejectDrag( )
+ throw( RuntimeException);
+/* virtual Sequence< DataFlavor > SAL_CALL getCurrentDataFlavors( )
throw(RuntimeException);
virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& df )
throw(RuntimeException);
+*/
};
#endif \ No newline at end of file
diff --git a/dtrans/source/win32/dnd/targetdropcontext.cxx b/dtrans/source/win32/dnd/targetdropcontext.cxx
index 4f4017c2f87a..95587a99cd4a 100644
--- a/dtrans/source/win32/dnd/targetdropcontext.cxx
+++ b/dtrans/source/win32/dnd/targetdropcontext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: targetdropcontext.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jl $ $Date: 2001-02-08 14:30:48 $
+ * last change: $Author: jl $ $Date: 2001-02-12 11:11:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,33 +77,34 @@ TargetDropContext::~TargetDropContext()
m_pDropTarget->release();
}
-void SAL_CALL TargetDropContext::accept( sal_Int8 dropOperation )
- throw(InvalidDNDOperationException, RuntimeException)
+void SAL_CALL TargetDropContext::acceptDrop( sal_Int8 dropOperation )
+ throw( RuntimeException)
{
m_pDropTarget->_acceptDrop( dropOperation, m_id);
}
//
-void SAL_CALL TargetDropContext::reject( )
- throw(InvalidDNDOperationException, RuntimeException)
+void SAL_CALL TargetDropContext::rejectDrop( )
+ throw( RuntimeException)
{
m_pDropTarget->_rejectDrop( m_id);
}
+/*
Sequence< DataFlavor > SAL_CALL TargetDropContext::getCurrentDataFlavors( )
- throw(RuntimeException)
+ throw( RuntimeException)
{
return m_pDropTarget->_getCurrentDataFlavors( m_id);
}
sal_Bool SAL_CALL TargetDropContext::isDataFlavorSupported( const DataFlavor& df )
- throw(RuntimeException)
+ throw( RuntimeException)
{
return m_pDropTarget->_isDataFlavorSupported( df, m_id);
}
-
+*/
void SAL_CALL TargetDropContext::dropComplete( sal_Bool success )
- throw(InvalidDNDOperationException, RuntimeException)
+ throw( RuntimeException)
{
m_pDropTarget->_dropComplete( success, m_id);
}
diff --git a/dtrans/source/win32/dnd/targetdropcontext.hxx b/dtrans/source/win32/dnd/targetdropcontext.hxx
index 07ea552aa523..628dbf456273 100644
--- a/dtrans/source/win32/dnd/targetdropcontext.hxx
+++ b/dtrans/source/win32/dnd/targetdropcontext.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: targetdropcontext.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jl $ $Date: 2001-02-08 14:30:48 $
+ * last change: $Author: jl $ $Date: 2001-02-12 11:11:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -90,19 +90,22 @@ public:
TargetDropContext( DropTarget* pTarget, sal_uInt32 id);
~TargetDropContext();
+
// XDropTargetDragContext
- virtual void SAL_CALL accept( sal_Int8 dropOperation )
- throw(InvalidDNDOperationException, RuntimeException);
- virtual void SAL_CALL reject( )
- throw(InvalidDNDOperationException, RuntimeException);
- virtual Sequence< DataFlavor > SAL_CALL getCurrentDataFlavors( )
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& df )
- throw(RuntimeException);
+ virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation )
+ throw( RuntimeException);
+ virtual void SAL_CALL rejectDrop( )
+ throw( RuntimeException);
+/* virtual Sequence< DataFlavor > SAL_CALL getCurrentDataFlavors( )
+ throw( RuntimeException);
+ virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& df )
+ throw( RuntimeException);
+*/
+
// XDropTargetDropContext (inherits XDropTargetDragContext)
virtual void SAL_CALL dropComplete( sal_Bool success )
- throw(InvalidDNDOperationException, RuntimeException);
+ throw( RuntimeException);
};
#endif \ No newline at end of file