summaryrefslogtreecommitdiff
path: root/dtrans/test
diff options
context:
space:
mode:
Diffstat (limited to 'dtrans/test')
-rw-r--r--dtrans/test/win32/dnd/atlwindow.cxx3
-rw-r--r--dtrans/test/win32/dnd/dndTest.cxx17
-rw-r--r--dtrans/test/win32/dnd/makefile.mk4
-rw-r--r--dtrans/test/win32/dnd/targetlistener.cxx18
4 files changed, 8 insertions, 34 deletions
diff --git a/dtrans/test/win32/dnd/atlwindow.cxx b/dtrans/test/win32/dnd/atlwindow.cxx
index 82f0b9d4f45e..2295a7ddf2e5 100644
--- a/dtrans/test/win32/dnd/atlwindow.cxx
+++ b/dtrans/test/win32/dnd/atlwindow.cxx
@@ -48,9 +48,10 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::datatransfer::dnd;
using namespace com::sun::star::datatransfer::dnd::DNDConstants;
using namespace cppu;
-using namespace rtl;
using namespace std;
+using ::rtl::OUString;
+
LRESULT APIENTRY EditSubclassProc( HWND hwnd, UINT uMsg,WPARAM wParam, LPARAM lParam) ;
diff --git a/dtrans/test/win32/dnd/dndTest.cxx b/dtrans/test/win32/dnd/dndTest.cxx
index 34080fb46efe..511a66cdf8a5 100644
--- a/dtrans/test/win32/dnd/dndTest.cxx
+++ b/dtrans/test/win32/dnd/dndTest.cxx
@@ -62,22 +62,16 @@ using namespace com::sun::star::datatransfer;
using namespace com::sun::star::uno;
using namespace com::sun::star::datatransfer::dnd;
using namespace com::sun::star::datatransfer::dnd::DNDConstants;
-using namespace rtl;
-// defined in atlwindow.hxx
-// #define WM_SOURCE_INIT WM_APP+100
-// #define WM_SOURCE_STARTDRAG WM_APP+101
+using ::rtl::OUString;
+
#define WM_CREATE_MTA_WND
HRESULT doTest();
DWORD WINAPI MTAFunc( void* threadData);
Reference< XMultiServiceFactory > MultiServiceFactory;
-//int APIENTRY WinMain(HINSTANCE hInstance,
-// HINSTANCE hPrevInstance,
-// LPSTR lpCmdLine,
-// int nCmdShow)
-//int _tmain( int argc, TCHAR *argv[ ], TCHAR *envp[ ] )
+
int main( int argc, char *argv[ ], char *envp[ ] )
{
HRESULT hr;
@@ -93,8 +87,6 @@ int main( int argc, char *argv[ ], char *envp[ ] )
if( FAILED(hr=doTest()))
{
_com_error err( hr);
- const TCHAR * errMsg= err.ErrorMessage();
-// MessageBox( NULL, errMsg, "Test failed", MB_ICONERROR);
}
@@ -160,8 +152,7 @@ DWORD WINAPI MTAFunc( void* threadData)
RECT pos={0, 406, 300, 605};
AWindow win(_T("DnD, full MTA"), GetCurrentThreadId(), pos, false, true);
-// ThreadData data= *( ThreadData*)pParams;
-// SetEvent(data.evtThreadReady);
+
while( GetMessage(&msg, (HWND)NULL, 0, 0) )
{
switch( msg.message)
diff --git a/dtrans/test/win32/dnd/makefile.mk b/dtrans/test/win32/dnd/makefile.mk
index 3744e6135806..93ac89b0d35c 100644
--- a/dtrans/test/win32/dnd/makefile.mk
+++ b/dtrans/test/win32/dnd/makefile.mk
@@ -32,7 +32,6 @@ TARGET=dndTest
TARGETTYPE=CUI
LIBTARGET=NO
-#USE_DEFFILE= TRUE
ENABLE_EXCEPTIONS=TRUE
# --- Settings ---
@@ -41,7 +40,6 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files ---
-# CFLAGS+=-GR -DUNICODE -D_UNICODE
CFLAGS+= -D_WIN32_DCOM
INCPRE+= -I$(ATL_INCLUDE)
@@ -73,8 +71,6 @@ APP1LIBS= \
$(SLB)$/dtobjfact.lib \
$(SLB)$/dtutils.lib
-# $(SOLARLIBDIR)$/imtaolecb.lib\
-
APP1DEF= $(MISC)\$(APP1TARGET).def
# --- Targets ---
diff --git a/dtrans/test/win32/dnd/targetlistener.cxx b/dtrans/test/win32/dnd/targetlistener.cxx
index ecc70e472916..1a1339833cc1 100644
--- a/dtrans/test/win32/dnd/targetlistener.cxx
+++ b/dtrans/test/win32/dnd/targetlistener.cxx
@@ -29,15 +29,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dtrans.hxx"
-
#include "targetlistener.hxx"
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
#include <com/sun/star/datatransfer/DataFlavor.hpp>
-//using namespace com::sun::star::datatransfer::dnd;
using namespace com::sun::star::datatransfer::dnd::DNDConstants;
using namespace com::sun::star::datatransfer;
-using namespace rtl;
+
+using ::rtl::OUString;
DropTargetListener::DropTargetListener(HWND hEdit):m_hEdit( hEdit)
{
@@ -52,21 +51,11 @@ void SAL_CALL DropTargetListener::disposing( const EventObject& Source )
}
-
-
void SAL_CALL DropTargetListener::drop( const DropTargetDropEvent& e )
throw(RuntimeException)
{
-// e.Context->dropComplete( sal_True);
-// e.Context->acceptDrop( ACTION_COPY);
e.Context->rejectDrop();
- // if the Transferable contains text, then we send it to the edit window
-// Sequence<DataFlavor> flavors= e.Transferable->getTransferDataFlavors();
-// DataFlavor aFlavor;
-// for( int i=0; i < flavors.getLength(); i++)
-// aFlavor= flavors[4];
-
DataFlavor flavor( OUString(OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=windows-1252"))),
OUString(L"Text plain"), getCppuType( ( Sequence<sal_Int8>*)0 ) );
@@ -81,9 +70,6 @@ void SAL_CALL DropTargetListener::dragEnter( const DropTargetDragEnterEvent& dtd
//If one drags something that is not moveable
if( !(dtde.SourceActions & dtde.DropAction) )
dtde.Context->acceptDrag( ACTION_COPY);
-
-// dtde.Context->rejectDrag( );
-
}
void SAL_CALL DropTargetListener::dragExit( const DropTargetEvent& dte )