summaryrefslogtreecommitdiff
path: root/dtrans/test/win32/dnd
diff options
context:
space:
mode:
authorAlexander Wilms <f.alexander.wilms@gmail.com>2014-02-25 18:22:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-02-26 10:20:05 -0600
commit75bbbf964b7976cc02d5ba054760bf93cb2e76c9 (patch)
treea20660b861414f454d9ae8ff7b554bc1667e3bdb /dtrans/test/win32/dnd
parent5faf5492741abfd013ae677b1ec2fc06276d8644 (diff)
Remove visual noise from dtrans
Change-Id: Ic460e514ac078a69cd86381b9b5cf779eb97971b Reviewed-on: https://gerrit.libreoffice.org/8254 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dtrans/test/win32/dnd')
-rw-r--r--dtrans/test/win32/dnd/atlwindow.cxx12
-rw-r--r--dtrans/test/win32/dnd/atlwindow.hxx2
-rw-r--r--dtrans/test/win32/dnd/dndTest.cxx6
-rw-r--r--dtrans/test/win32/dnd/targetlistener.cxx1
-rw-r--r--dtrans/test/win32/dnd/targetlistener.hxx1
-rw-r--r--dtrans/test/win32/dnd/transferable.cxx11
-rw-r--r--dtrans/test/win32/dnd/transferable.hxx14
7 files changed, 0 insertions, 47 deletions
diff --git a/dtrans/test/win32/dnd/atlwindow.cxx b/dtrans/test/win32/dnd/atlwindow.cxx
index f142332863c3..35e2cb5b1aca 100644
--- a/dtrans/test/win32/dnd/atlwindow.cxx
+++ b/dtrans/test/win32/dnd/atlwindow.cxx
@@ -38,10 +38,8 @@ using namespace com::sun::star::datatransfer::dnd::DNDConstants;
using namespace cppu;
using namespace std;
-
LRESULT APIENTRY EditSubclassProc( HWND hwnd, UINT uMsg,WPARAM wParam, LPARAM lParam) ;
-
extern Reference< XMultiServiceFactory > MultiServiceFactory;
DWORD WINAPI MTAFunc(LPVOID pParams);
@@ -60,11 +58,9 @@ LRESULT AWindow::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled
PostQuitMessage(0);
-
m_xDropTarget=0;
m_xDragSource=0;
-
// Remove the subclass from the edit control.
::SetWindowLong(m_hwndEdit, GWL_WNDPROC,
(LONG) wpOrigEditProc);
@@ -72,7 +68,6 @@ LRESULT AWindow::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled
return 0;
}
-
LRESULT AWindow::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
// Prepare the EDIT control
@@ -94,14 +89,12 @@ LRESULT AWindow::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
wpOrigEditProc = (WNDPROC) ::SetWindowLongA(m_hwndEdit,
GWL_WNDPROC, (LONG) EditSubclassProc);
-
// Add text to the window.
if( m_isMTA)
::SendMessageA(m_hwndEdit, WM_SETTEXT, 0, (LPARAM) szMTAWin);
else
::SendMessageA(m_hwndEdit, WM_SETTEXT, 0, (LPARAM) szSTAWin);
-
// create the DragSource
Reference< XInterface> xint= MultiServiceFactory->createInstance(OUString(L"com.sun.star.datatransfer.dnd.OleDragSource"));
m_xDragSource= Reference<XDragSource>( xint, UNO_QUERY);
@@ -120,7 +113,6 @@ LRESULT AWindow::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
any <<= (sal_uInt32)m_hWnd;
xInitTarget->initialize( Sequence<Any>( &any, 1) );
-
m_xDropTarget->addDropTargetListener( static_cast<XDropTargetListener*>
( new DropTargetListener( m_hwndEdit)) );
// // make this window tho a drop target
@@ -195,7 +187,6 @@ LRESULT AWindow::OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled
WaitForSingleObject( data.evtThreadReady, INFINITE);
CloseHandle( data.evtThreadReady);
-
}
else
{
@@ -232,8 +223,6 @@ LRESULT AWindow::OnFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled
return 0;
}
-
-
// Subclass procedure for EDIT window
LRESULT APIENTRY EditSubclassProc( HWND hwnd, UINT uMsg,WPARAM wParam, LPARAM lParam)
{
@@ -248,5 +237,4 @@ LRESULT APIENTRY EditSubclassProc( HWND hwnd, UINT uMsg,WPARAM wParam, LPARAM lP
wParam, lParam);
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/test/win32/dnd/atlwindow.hxx b/dtrans/test/win32/dnd/atlwindow.hxx
index 528fc9c4ba00..21c5dadd3184 100644
--- a/dtrans/test/win32/dnd/atlwindow.hxx
+++ b/dtrans/test/win32/dnd/atlwindow.hxx
@@ -28,7 +28,6 @@ extern CComModule _Module;
#include <com/sun/star/uno/Reference.h>
#include "../../source/inc/DtObjFactory.hxx"
-
using namespace com::sun::star::uno;
using namespace com::sun::star::datatransfer::dnd;
using namespace com::sun::star::datatransfer;
@@ -69,7 +68,6 @@ public:
DestroyWindow();
}
-
BEGIN_MSG_MAP(AWindow)
MESSAGE_HANDLER( WM_CLOSE, OnClose)
MESSAGE_HANDLER( WM_CREATE, OnCreate)
diff --git a/dtrans/test/win32/dnd/dndTest.cxx b/dtrans/test/win32/dnd/dndTest.cxx
index f78d6ef77f78..084555eb2122 100644
--- a/dtrans/test/win32/dnd/dndTest.cxx
+++ b/dtrans/test/win32/dnd/dndTest.cxx
@@ -49,7 +49,6 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::datatransfer::dnd;
using namespace com::sun::star::datatransfer::dnd::DNDConstants;
-
#define WM_CREATE_MTA_WND
HRESULT doTest();
@@ -66,7 +65,6 @@ int main( int argc, char *argv[ ], char *envp[ ] )
return -1;
}
-
_Module.Init( ObjectMap, GetModuleHandle( NULL));
if( FAILED(hr=doTest()))
@@ -74,7 +72,6 @@ int main( int argc, char *argv[ ], char *envp[ ] )
_com_error err( hr);
}
-
_Module.Term();
CoUninitialize();
return 0;
@@ -93,7 +90,6 @@ HRESULT doTest()
WaitForSingleObject( evt, INFINITE);
CloseHandle(evt);
-
HRESULT hr= S_OK;
RECT pos1={0,0,300,200};
AWindow win(_T("DnD starting in Ole STA"), threadIdMTA, pos1);
@@ -108,7 +104,6 @@ HRESULT doTest()
RECT pos4={ 300, 205, 600, 405};
AWindow win24( _T("DnD starting in Ole MTA"), threadIdMTA, pos4, true, true);
-
MSG msg;
while( GetMessage(&msg, (HWND)NULL, 0, 0) )
{
@@ -179,7 +174,6 @@ DWORD WINAPI MTAFunc( void* threadData)
DispatchMessage( &msg);
}
-
CoUninitialize();
return 0;
}
diff --git a/dtrans/test/win32/dnd/targetlistener.cxx b/dtrans/test/win32/dnd/targetlistener.cxx
index 990b5a7ed70d..e531a30304e0 100644
--- a/dtrans/test/win32/dnd/targetlistener.cxx
+++ b/dtrans/test/win32/dnd/targetlistener.cxx
@@ -24,7 +24,6 @@
using namespace com::sun::star::datatransfer::dnd::DNDConstants;
using namespace com::sun::star::datatransfer;
-
DropTargetListener::DropTargetListener(HWND hEdit):m_hEdit( hEdit)
{
}
diff --git a/dtrans/test/win32/dnd/targetlistener.hxx b/dtrans/test/win32/dnd/targetlistener.hxx
index fcca511ac978..da14fad93411 100644
--- a/dtrans/test/win32/dnd/targetlistener.hxx
+++ b/dtrans/test/win32/dnd/targetlistener.hxx
@@ -50,7 +50,6 @@ public:
virtual void SAL_CALL disposing( const EventObject& Source )
throw(RuntimeException);
-
virtual void SAL_CALL drop( const DropTargetDropEvent& dtde )
throw(RuntimeException);
virtual void SAL_CALL dragEnter( const DropTargetDragEnterEvent& dtde )
diff --git a/dtrans/test/win32/dnd/transferable.cxx b/dtrans/test/win32/dnd/transferable.cxx
index 90a50b7a879a..87dbc79ef13f 100644
--- a/dtrans/test/win32/dnd/transferable.cxx
+++ b/dtrans/test/win32/dnd/transferable.cxx
@@ -19,10 +19,8 @@
#include "transferable.hxx"
-
// ctor
-
CTransferable::CTransferable( wchar_t* dataString ) :
m_seqDFlv( 1 ),
m_Data( dataString )
@@ -40,14 +38,11 @@ CTransferable::CTransferable( wchar_t* dataString ) :
df.MimeType = L"text/plain";
df.DataType = getCppuType( ( Sequence< sal_Int8 >* )0 );
-
m_seqDFlv[0] = df;
}
-
// getTransferData
-
Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
throw(UnsupportedFlavorException, IOException, RuntimeException)
{
@@ -72,20 +67,16 @@ Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
return anyData;
}
-
// getTransferDataFlavors
-
Sequence< DataFlavor > SAL_CALL CTransferable::getTransferDataFlavors( )
throw(RuntimeException)
{
return m_seqDFlv;
}
-
// isDataFlavorSupported
-
sal_Bool SAL_CALL CTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
throw(RuntimeException)
{
@@ -104,10 +95,8 @@ sal_Bool SAL_CALL CTransferable::isDataFlavorSupported( const DataFlavor& aFlavo
return bRet;
}
-
// lostOwnership
-
void SAL_CALL CTransferable::lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans )
throw(RuntimeException)
{
diff --git a/dtrans/test/win32/dnd/transferable.hxx b/dtrans/test/win32/dnd/transferable.hxx
index 8c78794887f7..49fba2719ac5 100644
--- a/dtrans/test/win32/dnd/transferable.hxx
+++ b/dtrans/test/win32/dnd/transferable.hxx
@@ -46,10 +46,7 @@
#include "../../source/win32/ImplHelper.hxx"
-
-//-------------------------------------------------------------
// my defines
-//-------------------------------------------------------------
#define TEST_CLIPBOARD
#define RDB_SYSPATH "d:\\projects\\src616\\dtrans\\wntmsci7\\bin\\applicat.rdb"
@@ -59,9 +56,7 @@
#define EVT_INIT_NONSIGNALED FALSE
#define EVT_NONAME ""
-//------------------------------------------------------------
// namesapces
-//------------------------------------------------------------
using namespace ::rtl;
using namespace ::std;
@@ -72,27 +67,19 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
-//------------------------------------------------------------
-//
-//------------------------------------------------------------
-
class CTransferable : public WeakImplHelper2< XClipboardOwner, XTransferable >
{
public:
CTransferable( ){};
CTransferable( wchar_t* dataString);
- //-------------------------------------------------
// XTransferable
- //-------------------------------------------------
virtual Any SAL_CALL getTransferData( const DataFlavor& aFlavor ) throw(UnsupportedFlavorException, IOException, RuntimeException);
virtual Sequence< DataFlavor > SAL_CALL getTransferDataFlavors( ) throw(RuntimeException);
virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& aFlavor ) throw(RuntimeException);
- //-------------------------------------------------
// XClipboardOwner
- //-------------------------------------------------
virtual void SAL_CALL lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans ) throw(RuntimeException);
@@ -101,7 +88,6 @@ private:
OUString m_Data;
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */