summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dtrans/source/cnttype/mcnttfactory.cxx12
-rw-r--r--dtrans/source/cnttype/mcnttfactory.hxx6
-rw-r--r--dtrans/source/cnttype/mcnttype.cxx81
-rw-r--r--dtrans/source/cnttype/mcnttype.hxx3
-rw-r--r--dtrans/source/cnttype/mctfentry.cxx9
-rw-r--r--dtrans/source/cnttype/wbench/testcnttype.cxx21
-rw-r--r--dtrans/source/generic/clipboardmanager.cxx28
-rw-r--r--dtrans/source/generic/clipboardmanager.hxx9
-rw-r--r--dtrans/source/generic/dtrans.cxx3
-rw-r--r--dtrans/source/generic/generic_clipboard.cxx25
-rw-r--r--dtrans/source/generic/generic_clipboard.hxx6
-rw-r--r--dtrans/source/inc/DtObjFactory.hxx1
-rw-r--r--dtrans/source/test/test_dtrans.cxx59
-rw-r--r--dtrans/source/win32/clipb/APNDataObject.hxx5
-rw-r--r--dtrans/source/win32/clipb/MtaOleClipb.cxx77
-rw-r--r--dtrans/source/win32/clipb/MtaOleClipb.hxx4
-rw-r--r--dtrans/source/win32/clipb/WinClipbImpl.cxx47
-rw-r--r--dtrans/source/win32/clipb/WinClipbImpl.hxx11
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.cxx32
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.hxx16
-rw-r--r--dtrans/source/win32/clipb/wcbentry.cxx9
-rw-r--r--dtrans/source/win32/dnd/dndentry.cxx1
-rw-r--r--dtrans/source/win32/dnd/globals.cxx1
-rw-r--r--dtrans/source/win32/dnd/globals.hxx4
-rw-r--r--dtrans/source/win32/dnd/idroptarget.cxx1
-rw-r--r--dtrans/source/win32/dnd/idroptarget.hxx1
-rw-r--r--dtrans/source/win32/dnd/source.hxx5
-rw-r--r--dtrans/source/win32/dnd/sourcecontext.cxx2
-rw-r--r--dtrans/source/win32/dnd/sourcecontext.hxx6
-rw-r--r--dtrans/source/win32/dnd/target.cxx3
-rw-r--r--dtrans/source/win32/dnd/target.hxx11
-rw-r--r--dtrans/source/win32/dnd/targetdragcontext.hxx1
-rw-r--r--dtrans/source/win32/dnd/targetdropcontext.hxx1
-rw-r--r--dtrans/source/win32/dtobj/APNDataObject.cxx30
-rw-r--r--dtrans/source/win32/dtobj/APNDataObject.hxx5
-rw-r--r--dtrans/source/win32/dtobj/DOTransferable.cxx65
-rw-r--r--dtrans/source/win32/dtobj/DOTransferable.hxx10
-rw-r--r--dtrans/source/win32/dtobj/DTransHelper.cxx21
-rw-r--r--dtrans/source/win32/dtobj/DTransHelper.hxx20
-rw-r--r--dtrans/source/win32/dtobj/DataFmtTransl.cxx53
-rw-r--r--dtrans/source/win32/dtobj/DataFmtTransl.hxx3
-rw-r--r--dtrans/source/win32/dtobj/DtObjFactory.cxx4
-rw-r--r--dtrans/source/win32/dtobj/Fetc.cxx80
-rw-r--r--dtrans/source/win32/dtobj/Fetc.hxx2
-rw-r--r--dtrans/source/win32/dtobj/FetcList.cxx110
-rw-r--r--dtrans/source/win32/dtobj/FetcList.hxx1
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.cxx15
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.hxx1
-rw-r--r--dtrans/source/win32/dtobj/MimeAttrib.hxx2
-rw-r--r--dtrans/source/win32/dtobj/TxtCnvtHlp.cxx8
-rw-r--r--dtrans/source/win32/dtobj/TxtCnvtHlp.hxx1
-rw-r--r--dtrans/source/win32/dtobj/XNotifyingDataObject.cxx1
-rw-r--r--dtrans/source/win32/dtobj/XNotifyingDataObject.hxx3
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx105
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.hxx7
-rw-r--r--dtrans/source/win32/ftransl/ftransl.cxx56
-rw-r--r--dtrans/source/win32/ftransl/ftransl.hxx8
-rw-r--r--dtrans/source/win32/ftransl/ftranslentry.cxx9
-rw-r--r--dtrans/source/win32/misc/ImplHelper.cxx34
-rw-r--r--dtrans/source/win32/misc/ImplHelper.hxx13
-rw-r--r--dtrans/source/win32/misc/WinClip.hxx1
-rw-r--r--dtrans/source/win32/workbench/XTDo.cxx48
-rw-r--r--dtrans/source/win32/workbench/XTDo.hxx7
-rw-r--r--dtrans/source/win32/workbench/test_wincb.cxx38
-rw-r--r--dtrans/source/win32/workbench/testmarshal.cxx11
-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
72 files changed, 2 insertions, 1318 deletions
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx
index 7bb69a31f1ae..e1bfc96dbdfc 100644
--- a/dtrans/source/cnttype/mcnttfactory.cxx
+++ b/dtrans/source/cnttype/mcnttfactory.cxx
@@ -24,10 +24,8 @@
#define MIMECONTENTTYPEFACTORY_IMPL_NAME "com.sun.star.datatransfer.MimeCntTypeFactory"
-
// namespace directives
-
using namespace ::rtl;
using namespace ::osl;
using namespace ::cppu;
@@ -35,10 +33,8 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::datatransfer;
-
// helper functions
-
namespace
{
Sequence< OUString > SAL_CALL MimeContentTypeFactory_getSupportedServiceNames( )
@@ -49,18 +45,14 @@ namespace
}
}
-
// ctor
-
CMimeContentTypeFactory::CMimeContentTypeFactory()
{
}
-
// createMimeContentType
-
Reference< XMimeContentType > CMimeContentTypeFactory::createMimeContentType( const OUString& aContentType )
throw( IllegalArgumentException, RuntimeException )
{
@@ -68,10 +60,8 @@ Reference< XMimeContentType > CMimeContentTypeFactory::createMimeContentType( co
return Reference< XMimeContentType >( new CMimeContentType( aContentType ) );
}
-
// XServiceInfo
-
OUString SAL_CALL CMimeContentTypeFactory::getImplementationName( )
throw( RuntimeException )
{
@@ -85,10 +75,8 @@ sal_Bool SAL_CALL CMimeContentTypeFactory::supportsService( const OUString& Serv
return cppu::supportsService(this, ServiceName);
}
-
// XServiceInfo
-
Sequence< OUString > SAL_CALL CMimeContentTypeFactory::getSupportedServiceNames( )
throw( RuntimeException )
{
diff --git a/dtrans/source/cnttype/mcnttfactory.hxx b/dtrans/source/cnttype/mcnttfactory.hxx
index f849b133db16..2d2908ed2b4f 100644
--- a/dtrans/source/cnttype/mcnttfactory.hxx
+++ b/dtrans/source/cnttype/mcnttfactory.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _MCNTTFACTORY_HXX_
#define _MCNTTFACTORY_HXX_
@@ -35,16 +34,12 @@ class CMimeContentTypeFactory : public
public:
CMimeContentTypeFactory();
- //------------------------------------------------
// XMimeContentTypeFactory
- //------------------------------------------------
virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XMimeContentType > SAL_CALL createMimeContentType( const OUString& aContentType )
throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- //------------------------------------------------
// XServiceInfo
- //------------------------------------------------
virtual OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
@@ -59,7 +54,6 @@ private:
::osl::Mutex m_aMutex;
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index 7381e3660efa..c05d57488519 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -19,66 +19,43 @@
#include "mcnttype.hxx"
-
// namespace directives
-
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::container;
using namespace std;
using namespace osl;
-
-
// constants
-
const char TSPECIALS[] = "()<>@,;:\\\"/[]?=";
const char TOKEN[] = "!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~.";
const char SPACE[] = " ";
const char SEMICOLON[] = ";";
-
// ctor
-
CMimeContentType::CMimeContentType( const OUString& aCntType )
{
init( aCntType );
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::getMediaType( ) throw(RuntimeException)
{
return m_MediaType;
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::getMediaSubtype( ) throw(RuntimeException)
{
return m_MediaSubtype;
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::getFullMediaType( ) throw(RuntimeException)
{
return m_MediaType + "/" + m_MediaSubtype;
}
-
-//
-
-
Sequence< OUString > SAL_CALL CMimeContentType::getParameters( ) throw(RuntimeException)
{
MutexGuard aGuard( m_aMutex );
@@ -97,20 +74,12 @@ Sequence< OUString > SAL_CALL CMimeContentType::getParameters( ) throw(RuntimeEx
return seqParams;
}
-
-//
-
-
sal_Bool SAL_CALL CMimeContentType::hasParameter( const OUString& aName ) throw(RuntimeException)
{
MutexGuard aGuard( m_aMutex );
return ( m_ParameterMap.end( ) != m_ParameterMap.find( aName ) );
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::getParameterValue( const OUString& aName ) throw(NoSuchElementException, RuntimeException)
{
MutexGuard aGuard( m_aMutex );
@@ -121,10 +90,6 @@ OUString SAL_CALL CMimeContentType::getParameterValue( const OUString& aName ) t
return m_ParameterMap.find( aName )->second;
}
-
-//
-
-
void SAL_CALL CMimeContentType::init( const OUString& aCntType ) throw( IllegalArgumentException )
{
if ( aCntType.isEmpty( ) )
@@ -136,10 +101,6 @@ void SAL_CALL CMimeContentType::init( const OUString& aCntType ) throw( IllegalA
type();
}
-
-//
-
-
void SAL_CALL CMimeContentType::getSym( void )
{
if ( m_nPos < m_ContentType.getLength( ) )
@@ -152,10 +113,6 @@ void SAL_CALL CMimeContentType::getSym( void )
m_nxtSym = OUString( );
}
-
-//
-
-
void SAL_CALL CMimeContentType::acceptSym( const OUString& pSymTlb )
{
if ( pSymTlb.indexOf( m_nxtSym ) < 0 )
@@ -164,20 +121,12 @@ void SAL_CALL CMimeContentType::acceptSym( const OUString& pSymTlb )
getSym();
}
-
-//
-
-
void SAL_CALL CMimeContentType::skipSpaces( void )
{
while (m_nxtSym == SPACE)
getSym( );
}
-
-//
-
-
void SAL_CALL CMimeContentType::type( void )
{
skipSpaces( );
@@ -207,10 +156,6 @@ void SAL_CALL CMimeContentType::type( void )
subtype( );
}
-
-//
-
-
void SAL_CALL CMimeContentType::subtype( void )
{
skipSpaces( );
@@ -237,10 +182,6 @@ void SAL_CALL CMimeContentType::subtype( void )
trailer();
}
-
-//
-
-
void SAL_CALL CMimeContentType::trailer( void )
{
OUString sToken(TOKEN);
@@ -282,10 +223,6 @@ void SAL_CALL CMimeContentType::trailer( void )
}
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::pName( )
{
OUString pname;
@@ -305,10 +242,6 @@ OUString SAL_CALL CMimeContentType::pName( )
return pname;
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::pValue( )
{
OUString pvalue;
@@ -339,12 +272,10 @@ OUString SAL_CALL CMimeContentType::pValue( )
return pvalue;
}
-
// the following combinations within a quoted value are not allowed:
// '";' (quote sign followed by semicolon) and '" ' (quote sign followed
// by space)
-
OUString SAL_CALL CMimeContentType::quotedPValue( )
{
OUString pvalue;
@@ -375,10 +306,6 @@ OUString SAL_CALL CMimeContentType::quotedPValue( )
return pvalue;
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::nonquotedPValue( )
{
OUString pvalue;
@@ -398,10 +325,6 @@ OUString SAL_CALL CMimeContentType::nonquotedPValue( )
return pvalue;
}
-
-//
-
-
void SAL_CALL CMimeContentType::comment( void )
{
while ( !m_nxtSym.isEmpty( ) )
@@ -415,10 +338,6 @@ void SAL_CALL CMimeContentType::comment( void )
}
}
-
-//
-
-
sal_Bool SAL_CALL CMimeContentType::isInRange( const OUString& aChr, const OUString& aRange )
{
return ( aRange.indexOf( aChr ) > -1 );
diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx
index 28cfa2efec0a..5f1d0435becd 100644
--- a/dtrans/source/cnttype/mcnttype.hxx
+++ b/dtrans/source/cnttype/mcnttype.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _MCNTTYPE_HXX_
#define _MCNTTYPE_HXX_
@@ -35,9 +34,7 @@ class CMimeContentType : public
public:
CMimeContentType( const OUString& aCntType );
- //-------------------------------------------
// XMimeContentType
- //-------------------------------------------
virtual OUString SAL_CALL getMediaType( ) throw(::com::sun::star::uno::RuntimeException);
virtual OUString SAL_CALL getMediaSubtype( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/dtrans/source/cnttype/mctfentry.cxx b/dtrans/source/cnttype/mctfentry.cxx
index 87ff14bf872d..7ed64cb3cd2e 100644
--- a/dtrans/source/cnttype/mctfentry.cxx
+++ b/dtrans/source/cnttype/mctfentry.cxx
@@ -23,20 +23,16 @@
#include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp>
#include "mcnttfactory.hxx"
-
// some defines
-
// the service names
#define MIMECONTENTTYPEFACTORY_SERVICE_NAME "com.sun.star.datatransfer.MimeContentTypeFactory"
// the implementation names
#define MIMECONTENTTYPEFACTORY_IMPL_NAME "com.sun.star.datatransfer.MimeCntTypeFactory"
-
// namespace directives
-
using namespace ::rtl ;
using namespace ::cppu ;
using namespace ::com::sun::star::uno ;
@@ -44,19 +40,15 @@ using namespace ::com::sun::star::registry ;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::datatransfer;
-
// create a static object to initialize the shell9x library
-
namespace
{
-
// functions to create a new Clipboad instance; is needed by factory helper implementation
// @param rServiceManager - service manager, useful if the component needs other uno services
// so we should give it to every UNO-Implementation component
-
Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& )
{
return Reference< XInterface >( static_cast< XMimeContentTypeFactory* >( new CMimeContentTypeFactory() ) );
@@ -69,7 +61,6 @@ extern "C"
// component_getFactory
// returns a factory to create XFilePicker-Services
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL mcnttype_component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ )
{
void* pRet = 0;
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx
index 1c55c2b7f1a5..e1535fb2e81a 100644
--- a/dtrans/source/cnttype/wbench/testcnttype.cxx
+++ b/dtrans/source/cnttype/wbench/testcnttype.cxx
@@ -32,17 +32,13 @@
#include <vector>
-
// my defines
-
#define TEST_CLIPBOARD
#define RDB_SYSPATH "d:\\projects\\src621\\dtrans\\wntmsci7\\bin\\applicat.rdb"
-
// namesapces
-
using namespace ::rtl;
using namespace ::std;
using namespace ::cppu;
@@ -51,10 +47,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
-
-//
-
-
void ShutdownServiceMgr( Reference< XMultiServiceFactory >& SrvMgr )
{
// Cast factory to XComponent
@@ -68,10 +60,6 @@ void ShutdownServiceMgr( Reference< XMultiServiceFactory >& SrvMgr )
SrvMgr.clear();
}
-
-//
-
-
sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData )
{
FILE* fstream;
@@ -95,10 +83,6 @@ sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData
return sal_True;
}
-
-//
-
-
sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& vecData, Reference< XMimeContentTypeFactory > cnttypeFactory )
{
FILE* fstream;
@@ -152,16 +136,13 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v
return sal_True;
}
-
// main
-
int SAL_CALL main( int nArgc, char* argv[] )
{
if ( nArgc != 3 )
printf( "Start with: testcnttype input-file output-file\n" );
-
// get the global service-manager
OUString rdbName = OUString( RDB_SYSPATH );
@@ -198,10 +179,8 @@ int SAL_CALL main( int nArgc, char* argv[] )
ShutdownServiceMgr( g_xFactory );
}
-
// shutdown the service manager
-
ShutdownServiceMgr( g_xFactory );
return 0;
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx
index 01955d60acd6..b67e6ac3e9f5 100644
--- a/dtrans/source/generic/clipboardmanager.cxx
+++ b/dtrans/source/generic/clipboardmanager.cxx
@@ -32,22 +32,16 @@ using namespace std;
using ::dtrans::ClipboardManager;
-
-
ClipboardManager::ClipboardManager():
WeakComponentImplHelper3< XClipboardManager, XEventListener, XServiceInfo > (m_aMutex),
m_aDefaultName(OUString("default"))
{
}
-
-
ClipboardManager::~ClipboardManager()
{
}
-
-
OUString SAL_CALL ClipboardManager::getImplementationName( )
throw(RuntimeException)
{
@@ -60,16 +54,12 @@ sal_Bool SAL_CALL ClipboardManager::supportsService( const OUString& ServiceName
return cppu::supportsService(this, ServiceName);
}
-
-
Sequence< OUString > SAL_CALL ClipboardManager::getSupportedServiceNames( )
throw(RuntimeException)
{
return ClipboardManager_getSupportedServiceNames();
}
-
-
Reference< XClipboard > SAL_CALL ClipboardManager::getClipboard( const OUString& aName )
throw(NoSuchElementException, RuntimeException)
{
@@ -89,8 +79,6 @@ Reference< XClipboard > SAL_CALL ClipboardManager::getClipboard( const OUString&
throw NoSuchElementException(aName, static_cast < XClipboardManager * > (this));
}
-
-
void SAL_CALL ClipboardManager::addClipboard( const Reference< XClipboard >& xClipboard )
throw(IllegalArgumentException, ElementExistException, RuntimeException)
{
@@ -129,8 +117,6 @@ void SAL_CALL ClipboardManager::addClipboard( const Reference< XClipboard >& xCl
}
}
-
-
void SAL_CALL ClipboardManager::removeClipboard( const OUString& aName )
throw(RuntimeException)
{
@@ -139,8 +125,6 @@ void SAL_CALL ClipboardManager::removeClipboard( const OUString& aName )
m_aClipboardMap.erase(aName.getLength() ? aName : m_aDefaultName );
}
-
-
Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames()
throw(RuntimeException)
{
@@ -163,8 +147,6 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames()
return aRet;
}
-
-
void SAL_CALL ClipboardManager::dispose()
throw(RuntimeException)
{
@@ -211,8 +193,6 @@ void SAL_CALL ClipboardManager::dispose()
}
}
-
-
void SAL_CALL ClipboardManager::disposing( const EventObject& event )
throw(RuntimeException)
{
@@ -222,16 +202,12 @@ void SAL_CALL ClipboardManager::disposing( const EventObject& event )
removeClipboard(xClipboard->getName());
}
-
-
Reference< XInterface > SAL_CALL ClipboardManager_createInstance(
const Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/)
{
return Reference < XInterface >( ( OWeakObject * ) new ClipboardManager());
}
-
-
Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames()
{
Sequence < OUString > SupportedServicesNames( 1 );
@@ -240,8 +216,4 @@ Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames()
return SupportedServicesNames;
}
-
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/generic/clipboardmanager.hxx b/dtrans/source/generic/clipboardmanager.hxx
index 8429996c0364..090f7597c3c7 100644
--- a/dtrans/source/generic/clipboardmanager.hxx
+++ b/dtrans/source/generic/clipboardmanager.hxx
@@ -27,16 +27,10 @@
#include <map>
-// ------------------------------------------------------------------------
-
#define CLIPBOARDMANAGER_IMPLEMENTATION_NAME "com.sun.star.comp.datatransfer.ClipboardManager"
-// ------------------------------------------------------------------------
-
typedef ::std::map< OUString, ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > > ClipboardMap;
-// ------------------------------------------------------------------------
-
namespace dtrans
{
@@ -103,13 +97,10 @@ namespace dtrans
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL listClipboardNames( )
throw(::com::sun::star::uno::RuntimeException);
-
};
}
-// ------------------------------------------------------------------------
-
::com::sun::star::uno::Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ClipboardManager_createInstance(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
diff --git a/dtrans/source/generic/dtrans.cxx b/dtrans/source/generic/dtrans.cxx
index 61ec37a3b996..fd7c0a3ae0ed 100644
--- a/dtrans/source/generic/dtrans.cxx
+++ b/dtrans/source/generic/dtrans.cxx
@@ -26,12 +26,9 @@ using namespace com::sun::star::registry;
using namespace com::sun::star::uno;
using namespace cppu;
-
extern "C"
{
-//==================================================================================================
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL dtrans_component_getFactory(
const sal_Char * pImplName,
void * pServiceManager,
diff --git a/dtrans/source/generic/generic_clipboard.cxx b/dtrans/source/generic/generic_clipboard.cxx
index 1f22408555e6..98953bf60b79 100644
--- a/dtrans/source/generic/generic_clipboard.cxx
+++ b/dtrans/source/generic/generic_clipboard.cxx
@@ -37,14 +37,10 @@ GenericClipboard::GenericClipboard() :
{
}
-
-
GenericClipboard::~GenericClipboard()
{
}
-
-
void SAL_CALL GenericClipboard::initialize( const Sequence< Any >& aArguments )
throw(Exception, RuntimeException)
{
@@ -59,8 +55,6 @@ void SAL_CALL GenericClipboard::initialize( const Sequence< Any >& aArguments )
}
}
-
-
OUString SAL_CALL GenericClipboard::getImplementationName( )
throw(RuntimeException)
{
@@ -73,16 +67,12 @@ sal_Bool SAL_CALL GenericClipboard::supportsService( const OUString& ServiceName
return cppu::supportsService(this, ServiceName);
}
-
-
Sequence< OUString > SAL_CALL GenericClipboard::getSupportedServiceNames( )
throw(RuntimeException)
{
return GenericClipboard_getSupportedServiceNames();
}
-
-
Reference< XTransferable > SAL_CALL GenericClipboard::getContents()
throw(RuntimeException)
{
@@ -90,8 +80,6 @@ Reference< XTransferable > SAL_CALL GenericClipboard::getContents()
return m_aContents;
}
-
-
void SAL_CALL GenericClipboard::setContents(const Reference< XTransferable >& xTrans,
const Reference< XClipboardOwner >& xClipboardOwner )
throw(RuntimeException)
@@ -128,25 +116,18 @@ void SAL_CALL GenericClipboard::setContents(const Reference< XTransferable >& xT
}
}
-
-
OUString SAL_CALL GenericClipboard::getName()
throw(RuntimeException)
{
return m_aName;
}
-
-
sal_Int8 SAL_CALL GenericClipboard::getRenderingCapabilities()
throw(RuntimeException)
{
return RenderingCapabilities::Delayed;
}
-
-
-
void SAL_CALL GenericClipboard::addClipboardListener( const Reference< XClipboardListener >& listener )
throw(RuntimeException)
{
@@ -157,8 +138,6 @@ void SAL_CALL GenericClipboard::addClipboardListener( const Reference< XClipboar
rBHelper.aLC.addInterface( getCppuType( (const ::com::sun::star::uno::Reference< XClipboardListener > *) 0), listener );
}
-
-
void SAL_CALL GenericClipboard::removeClipboardListener( const Reference< XClipboardListener >& listener )
throw(RuntimeException)
{
@@ -168,8 +147,6 @@ void SAL_CALL GenericClipboard::removeClipboardListener( const Reference< XClipb
rBHelper.aLC.removeInterface( getCppuType( (const Reference< XClipboardListener > *) 0 ), listener ); \
}
-
-
Sequence< OUString > SAL_CALL GenericClipboard_getSupportedServiceNames()
{
Sequence< OUString > aRet(1);
@@ -177,8 +154,6 @@ Sequence< OUString > SAL_CALL GenericClipboard_getSupportedServiceNames()
return aRet;
}
-
-
Reference< XInterface > SAL_CALL GenericClipboard_createInstance(
const Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/)
{
diff --git a/dtrans/source/generic/generic_clipboard.hxx b/dtrans/source/generic/generic_clipboard.hxx
index c307e279cac7..a6853ce29379 100644
--- a/dtrans/source/generic/generic_clipboard.hxx
+++ b/dtrans/source/generic/generic_clipboard.hxx
@@ -28,12 +28,8 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
-// ------------------------------------------------------------------------
-
#define GENERIC_CLIPBOARD_IMPLEMENTATION_NAME "com.sun.star.comp.datatransfer.clipboard.GenericClipboard"
-// ------------------------------------------------------------------------
-
namespace dtrans
{
@@ -114,8 +110,6 @@ namespace dtrans
}
-// ------------------------------------------------------------------------
-
::com::sun::star::uno::Sequence< OUString > SAL_CALL GenericClipboard_getSupportedServiceNames();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GenericClipboard_createInstance(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
diff --git a/dtrans/source/inc/DtObjFactory.hxx b/dtrans/source/inc/DtObjFactory.hxx
index 3427236b40f2..0031dc5d7cc3 100644
--- a/dtrans/source/inc/DtObjFactory.hxx
+++ b/dtrans/source/inc/DtObjFactory.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _DTOBJFACTORY_HXX_
#define _DTOBJFACTORY_HXX_
diff --git a/dtrans/source/test/test_dtrans.cxx b/dtrans/source/test/test_dtrans.cxx
index 11ac2174915b..a8503a61811e 100644
--- a/dtrans/source/test/test_dtrans.cxx
+++ b/dtrans/source/test/test_dtrans.cxx
@@ -34,10 +34,8 @@
#include <stdio.h>
#include <string.h>
-
// my defines
-
#ifdef UNX
#define PATH_SEPARATOR '/'
#else
@@ -49,10 +47,8 @@
#define PERFORM( a, b ) fprintf( stderr, "Performing " a); b; fprintf( stderr, "done\n" )
#define TRACE( a ) fprintf( stderr, a )
-
// namespaces
-
using namespace ::rtl;
using namespace ::std;
using namespace ::cppu;
@@ -63,16 +59,12 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
-
// globals
-
const char * app = NULL;
-
// ClipboardOwner
-
class ClipboardOwner : public WeakImplHelper1< XClipboardOwner >
{
Reference< XClipboard > m_xClipboard;
@@ -83,10 +75,8 @@ class ClipboardOwner : public WeakImplHelper1< XClipboardOwner >
public:
ClipboardOwner();
-
// XClipboardOwner
-
virtual void SAL_CALL lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans ) throw(RuntimeException);
sal_uInt32 receivedLostOwnerships() { return m_nReceivedLostOwnerships; };
@@ -94,19 +84,15 @@ public:
Reference< XTransferable > lostOwnershipTransferableValue() { return m_xTransferable; };
};
-
// ctor
-
ClipboardOwner::ClipboardOwner():
m_nReceivedLostOwnerships( 0 )
{
}
-
// lostOwnership
-
void SAL_CALL ClipboardOwner::lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans )
throw(RuntimeException)
{
@@ -115,10 +101,8 @@ void SAL_CALL ClipboardOwner::lostOwnership( const Reference< XClipboard >& xCli
m_xTransferable = xTrans;
}
-
// ClipboardListener
-
class ClipboardListener : public WeakImplHelper1< XClipboardListener >
{
Reference< XClipboard > m_xClipboard;
@@ -129,16 +113,12 @@ class ClipboardListener : public WeakImplHelper1< XClipboardListener >
public:
ClipboardListener();
-
// XClipboardOwner
-
virtual void SAL_CALL changedContents( const ClipboardEvent& event ) throw(RuntimeException);
-
// XEventListener
-
virtual void SAL_CALL disposing( const EventObject& event ) throw(RuntimeException);
sal_uInt32 receivedChangedContentsEvents() { return m_nReceivedChangedContentsEvents; };
@@ -146,19 +126,15 @@ public:
Reference< XTransferable > changedContentsEventTransferableValue() { return m_xTransferable; };
};
-
// ctor
-
ClipboardListener::ClipboardListener():
m_nReceivedChangedContentsEvents( 0 )
{
}
-
// changedContents
-
void SAL_CALL ClipboardListener::changedContents( const ClipboardEvent& event )
throw(RuntimeException)
{
@@ -167,36 +143,28 @@ void SAL_CALL ClipboardListener::changedContents( const ClipboardEvent& event )
m_xTransferable = event.Contents;
}
-
// disposing
-
void SAL_CALL ClipboardListener::disposing( const EventObject& event )
throw(RuntimeException)
{
}
-
// StringTransferable
-
class StringTransferable : public WeakImplHelper2< XClipboardOwner, XTransferable >
{
public:
StringTransferable( );
-
// 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);
sal_Bool receivedLostOwnership() { return m_receivedLostOwnership; };
@@ -208,10 +176,8 @@ private:
sal_Bool m_receivedLostOwnership;
};
-
// ctor
-
StringTransferable::StringTransferable( ) :
m_seqDFlv( 1 ),
m_receivedLostOwnership( sal_False ),
@@ -233,10 +199,8 @@ StringTransferable::StringTransferable( ) :
m_seqDFlv[0] = df;
}
-
// getTransferData
-
Any SAL_CALL StringTransferable::getTransferData( const DataFlavor& aFlavor )
throw(UnsupportedFlavorException, IOException, RuntimeException)
{
@@ -250,20 +214,16 @@ Any SAL_CALL StringTransferable::getTransferData( const DataFlavor& aFlavor )
return anyData;
}
-
// getTransferDataFlavors
-
Sequence< DataFlavor > SAL_CALL StringTransferable::getTransferDataFlavors( )
throw(RuntimeException)
{
return m_seqDFlv;
}
-
// isDataFlavorSupported
-
sal_Bool SAL_CALL StringTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
throw(RuntimeException)
{
@@ -282,28 +242,22 @@ sal_Bool SAL_CALL StringTransferable::isDataFlavorSupported( const DataFlavor& a
return bRet;
}
-
// lostOwnership
-
void SAL_CALL StringTransferable::lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans )
throw(RuntimeException)
{
m_receivedLostOwnership = sal_True;
}
-
// main
-
int SAL_CALL main( int argc, const char* argv[] )
{
OUString aRegistry;
-
// check command line parameters
-
if ( NULL == ( app = strrchr( argv[0], PATH_SEPARATOR ) ) )
app = argv[0];
else
@@ -323,7 +277,6 @@ int SAL_CALL main( int argc, const char* argv[] )
if( aRegistry.isEmpty( ) )
fprintf( stderr, "Usage: %s -r full-path-to-applicat.rdb\n", app );
-
// create service manager
Reference< XMultiServiceFactory > xServiceManager;
@@ -333,10 +286,8 @@ int SAL_CALL main( int argc, const char* argv[] )
xServiceManager = createRegistryServiceFactory( aRegistry, sal_True );
ENSURE( xServiceManager.is(), "*** ERROR *** service manager could not be created." );
-
// create an instance of GenericClipboard service
-
Sequence< Any > arguments(1);
arguments[0] = makeAny( OUString("generic") );
@@ -353,10 +304,8 @@ int SAL_CALL main( int argc, const char* argv[] )
if( xClipboardNotifier.is() )
xClipboardNotifier->addClipboardListener( xClipboardListener );
-
// run various tests on clipboard implementation
-
TRACE( "\n*** testing generic clipboard service ***\n" );
Reference< XTransferable > xContents = new StringTransferable();
@@ -403,7 +352,6 @@ int SAL_CALL main( int argc, const char* argv[] )
TEST( "if received changedContents notification for correct transferable: ", pListener->changedContentsEventTransferableValue() == xContents );
}
-
PERFORM( "update on contents without data (clear): ", xClipboard->setContents( Reference< XTransferable >(), Reference< XClipboardOwner >() ) );
TEST( "that no further lostOwnership messages were received: ", pOwner->receivedLostOwnerships() == 1 );
TEST( "current clipboard contents (none): ", xClipboard->getContents().is() == sal_False );
@@ -416,19 +364,15 @@ int SAL_CALL main( int argc, const char* argv[] )
TEST( "if received changedContents notification for correct transferable: ", ! pListener->changedContentsEventTransferableValue().is() );
}
-
// create an instance of ClipboardManager service
-
Reference< XClipboardManager > xClipboardManager( xServiceManager->createInstance(
OUString("com.sun.star.datatransfer.clipboard.ClipboardManager") ), UNO_QUERY );
ENSURE( xClipboardManager.is(), "*** ERROR *** clipboard manager service could not be created." );
-
// run various tests on clipboard manager implementation
-
TRACE( "\n*** testing clipboard manager service ***\n" );
TEST( "initial number of clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 );
@@ -455,10 +399,8 @@ int SAL_CALL main( int argc, const char* argv[] )
ENSURE( sal_False, "*** ERROR *** exception caught." );
}
-
// shutdown the service manager
-
// query XComponent interface
Reference< XComponent > xComponent( xServiceManager, UNO_QUERY );
@@ -472,5 +414,4 @@ int SAL_CALL main( int argc, const char* argv[] )
return 0;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/clipb/APNDataObject.hxx b/dtrans/source/win32/clipb/APNDataObject.hxx
index 279cd832b1dc..740bd5508595 100644
--- a/dtrans/source/win32/clipb/APNDataObject.hxx
+++ b/dtrans/source/win32/clipb/APNDataObject.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _APNDATAOBJECT_HXX_
#define _APNDATAOBJECT_HXX_
@@ -34,17 +33,13 @@ public:
CAPNDataObject( IDataObjectPtr rIDataObject );
~CAPNDataObject( );
- //-----------------------------------------------------------------
//IUnknown interface methods
- //-----------------------------------------------------------------
STDMETHODIMP QueryInterface(REFIID iid, LPVOID* ppvObject);
STDMETHODIMP_( ULONG ) AddRef( );
STDMETHODIMP_( ULONG ) Release( );
- //-----------------------------------------------------------------
// IDataObject interface methods
- //-----------------------------------------------------------------
STDMETHODIMP GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium );
STDMETHODIMP GetDataHere( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium );
diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx
index 59c9a8b8e0f1..82d97c4a273a 100644
--- a/dtrans/source/win32/clipb/MtaOleClipb.cxx
+++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx
@@ -52,10 +52,8 @@
#define __uuidof(I) IID_##I
#endif
-
// namespace directives
-
using osl::Condition;
using osl::Mutex;
using osl::MutexGuard;
@@ -66,10 +64,8 @@ namespace /* private */
char CLIPSRV_DLL_NAME[] = "sysdtrans.dll";
char g_szWndClsName[] = "MtaOleReqWnd###";
-
// messages constants
-
const sal_uInt32 MSG_SETCLIPBOARD = WM_USER + 0x0001;
const sal_uInt32 MSG_GETCLIPBOARD = WM_USER + 0x0002;
const sal_uInt32 MSG_REGCLIPVIEWER = WM_USER + 0x0003;
@@ -84,7 +80,6 @@ namespace /* private */
const sal_Bool AUTO_RESET = sal_False;
const sal_Bool INIT_NONSIGNALED = sal_False;
-
/* Cannot use osl conditions because they are blocking
without waking up on messages sent by another thread
this leads to deadlocks because we are blocking the
@@ -155,10 +150,8 @@ namespace /* private */
Win32Condition& operator=(const Win32Condition&);
};
-
// we use one condition for every request
-
struct MsgCtx
{
Win32Condition aCondition;
@@ -167,16 +160,12 @@ namespace /* private */
} /* namespace private */
-
// static member initialization
-
CMtaOleClipboard* CMtaOleClipboard::s_theMtaOleClipboardInst = NULL;
-
// marshal an IDataObject
-
//inline
HRESULT MarshalIDataObjectInStream( IDataObject* pIDataObject, LPSTREAM* ppStream )
{
@@ -191,10 +180,8 @@ HRESULT MarshalIDataObjectInStream( IDataObject* pIDataObject, LPSTREAM* ppStrea
);
}
-
// unmarshal an IDataObject
-
//inline
HRESULT UnmarshalIDataObjectAndReleaseStream( LPSTREAM lpStream, IDataObject** ppIDataObject )
{
@@ -208,10 +195,8 @@ HRESULT UnmarshalIDataObjectAndReleaseStream( LPSTREAM lpStream, IDataObject** p
reinterpret_cast<LPVOID*>(ppIDataObject));
}
-
// helper class to ensure that the calling thread has com initialized
-
class CAutoComInit
{
public:
@@ -255,10 +240,8 @@ private:
HRESULT m_hResult;
};
-
// ctor
-
CMtaOleClipboard::CMtaOleClipboard( ) :
m_hOleThread( NULL ),
m_uOleThreadId( 0 ),
@@ -283,10 +266,8 @@ CMtaOleClipboard::CMtaOleClipboard( ) :
NULL, 0, CMtaOleClipboard::oleThreadProc, this, 0, &m_uOleThreadId );
OSL_ASSERT( NULL != m_hOleThread );
-
// setup the clipboard changed notifier thread
-
m_hClipboardChangedNotifierEvents[0] = CreateEventA( 0, MANUAL_RESET, INIT_NONSIGNALED, NULL );
OSL_ASSERT( NULL != m_hClipboardChangedNotifierEvents[0] );
@@ -300,10 +281,8 @@ CMtaOleClipboard::CMtaOleClipboard( ) :
OSL_ASSERT( NULL != m_hClipboardChangedNotifierThread );
}
-
// dtor
-
CMtaOleClipboard::~CMtaOleClipboard( )
{
// block calling threads out
@@ -354,11 +333,6 @@ CMtaOleClipboard::~CMtaOleClipboard( )
"Clipboard viewer not properly unregistered" );
}
-
-
-//
-
-
HRESULT CMtaOleClipboard::flushClipboard( )
{
if ( !WaitForThreadReady( ) )
@@ -381,10 +355,6 @@ HRESULT CMtaOleClipboard::flushClipboard( )
return aMsgCtx.hr;
}
-
-//
-
-
HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject )
{
OSL_PRECOND( NULL != ppIDataObject, "invalid parameter" );
@@ -421,11 +391,9 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject )
return hr;
}
-
// this is an asynchronous method that's why we don't wait until the
// request is completed
-
HRESULT CMtaOleClipboard::setClipboard( IDataObject* pIDataObject )
{
if ( !WaitForThreadReady( ) )
@@ -460,10 +428,8 @@ HRESULT CMtaOleClipboard::setClipboard( IDataObject* pIDataObject )
return S_OK;
}
-
// register a clipboard viewer
-
bool CMtaOleClipboard::registerClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncClipViewerCallback )
{
if ( !WaitForThreadReady( ) )
@@ -487,10 +453,8 @@ bool CMtaOleClipboard::registerClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncClipV
return bRet;
}
-
// register a clipboard viewer
-
bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncClipViewerCallback )
{
bool bRet = true;
@@ -528,19 +492,11 @@ bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncCli
return bRet;
}
-
-//
-
-
LRESULT CMtaOleClipboard::onSetClipboard( IDataObject* pIDataObject )
{
return static_cast<LRESULT>( OleSetClipboard( pIDataObject ) );
}
-
-//
-
-
LRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream )
{
OSL_ASSERT(NULL != ppStream);
@@ -557,19 +513,15 @@ LRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream )
return static_cast<LRESULT>(hr);
}
-
// flush the ole-clipboard
-
LRESULT CMtaOleClipboard::onFlushClipboard( )
{
return static_cast<LRESULT>( OleFlushClipboard( ) );
}
-
// handle clipboard chain change event
-
LRESULT CMtaOleClipboard::onChangeCBChain( HWND hWndRemove, HWND hWndNext )
{
if ( hWndRemove == m_hwndNextClipViewer )
@@ -591,10 +543,8 @@ LRESULT CMtaOleClipboard::onChangeCBChain( HWND hWndRemove, HWND hWndNext )
return 0;
}
-
// handle draw clipboard event
-
LRESULT CMtaOleClipboard::onDrawClipboard( )
{
// we don't send a notification if we are
@@ -626,31 +576,24 @@ LRESULT CMtaOleClipboard::onDrawClipboard( )
return 0;
}
-
// SendMessage so we don't need to supply the HWND if we send
// something to our wrapped window
-
LRESULT CMtaOleClipboard::sendMessage( UINT msg, WPARAM wParam, LPARAM lParam )
{
return ::SendMessageA( m_hwndMtaOleReqWnd, msg, wParam, lParam );
}
-
// PostMessage so we don't need to supply the HWND if we send
// something to our wrapped window
-
bool CMtaOleClipboard::postMessage( UINT msg, WPARAM wParam, LPARAM lParam )
{
return PostMessageA( m_hwndMtaOleReqWnd, msg, wParam, lParam ) ? true : false;
}
-
-
// the window proc
-
LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
LRESULT lResult = 0;
@@ -734,10 +677,6 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARA
return lResult;
}
-
-//
-
-
void CMtaOleClipboard::createMtaOleReqWnd( )
{
WNDCLASSEXA wcex;
@@ -767,10 +706,6 @@ void CMtaOleClipboard::createMtaOleReqWnd( )
g_szWndClsName, NULL, 0, 0, 0, 0, 0, NULL, NULL, hInst, NULL );
}
-
-//
-
-
unsigned int CMtaOleClipboard::run( )
{
#if OSL_DEBUG_LEVEL > 0
@@ -803,10 +738,6 @@ unsigned int CMtaOleClipboard::run( )
return nRet;
}
-
-//
-
-
unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
{
CMtaOleClipboard* pInst =
@@ -816,10 +747,6 @@ unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
return pInst->run( );
}
-
-//
-
-
unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID pParam )
{
CMtaOleClipboard* pInst = reinterpret_cast< CMtaOleClipboard* >( pParam );
@@ -860,10 +787,6 @@ unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID
return ( 0 );
}
-
-//
-
-
bool CMtaOleClipboard::WaitForThreadReady( ) const
{
bool bRet = false;
diff --git a/dtrans/source/win32/clipb/MtaOleClipb.hxx b/dtrans/source/win32/clipb/MtaOleClipb.hxx
index af8894190d3a..e3ebfd2a1b3c 100644
--- a/dtrans/source/win32/clipb/MtaOleClipb.hxx
+++ b/dtrans/source/win32/clipb/MtaOleClipb.hxx
@@ -31,14 +31,12 @@
#pragma warning(pop)
#endif
-//--------------------------------------------------------
// the Mta-Ole clipboard class is for internal use only!
// only one instance of this class should be created, the
// user has to ensure this!
// the class is not thread-safe because it will be used
// only from within the clipboard service and the methods
// of the clipboard service are already synchronized
-//--------------------------------------------------------
class CMtaOleClipboard
{
@@ -72,10 +70,8 @@ private:
bool postMessage( UINT msg, WPARAM wParam = 0, LPARAM lParam = 0 );
LRESULT sendMessage( UINT msg, WPARAM wParam = 0, LPARAM lParam = 0 );
- //---------------------------------------------------------------
// message handler functions; remember these functions are called
// from a different thread context!
- //---------------------------------------------------------------
LRESULT onSetClipboard( IDataObject* pIDataObject );
LRESULT onGetClipboard( LPSTREAM* ppStream );
diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx
index 441338925848..a529b812ed76 100644
--- a/dtrans/source/win32/clipb/WinClipbImpl.cxx
+++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx
@@ -37,10 +37,8 @@
#pragma warning(pop)
#endif
-
// namespace directives
-
using namespace osl;
using namespace std;
using namespace cppu;
@@ -50,15 +48,10 @@ using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::clipboard;
using namespace com::sun::star::datatransfer::clipboard::RenderingCapabilities;
-
// definition of static members
CWinClipbImpl* CWinClipbImpl::s_pCWinClipbImpl = NULL;
osl::Mutex CWinClipbImpl::s_aMutex;
-
-//
-
-
CWinClipbImpl::CWinClipbImpl( const OUString& aClipboardName, CWinClipboard* theWinClipboard ) :
m_itsName( aClipboardName ),
m_pWinClipboard( theWinClipboard ),
@@ -72,10 +65,6 @@ CWinClipbImpl::CWinClipbImpl( const OUString& aClipboardName, CWinClipboard* the
registerClipboardViewer( );
}
-
-//
-
-
CWinClipbImpl::~CWinClipbImpl( )
{
ClearableMutexGuard aGuard( s_aMutex );
@@ -85,10 +74,8 @@ CWinClipbImpl::~CWinClipbImpl( )
unregisterClipboardViewer( );
}
-
// getContent
-
Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( ) throw( RuntimeException )
{
// use the shotcut or create a transferable from
@@ -125,10 +112,8 @@ Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( ) throw( Runtime
return rClipContent;
}
-
// setContent
-
void SAL_CALL CWinClipbImpl::setContents(
const Reference< XTransferable >& xTransferable,
const Reference< XClipboardOwner >& xClipboardOwner )
@@ -155,28 +140,16 @@ void SAL_CALL CWinClipbImpl::setContents(
m_MtaOleClipboard.setClipboard(pIDataObj.get());
}
-
-//
-
-
OUString SAL_CALL CWinClipbImpl::getName( ) throw( RuntimeException )
{
return m_itsName;
}
-
-//
-
-
sal_Int8 SAL_CALL CWinClipbImpl::getRenderingCapabilities( ) throw( RuntimeException )
{
return ( Delayed | Persistant );
}
-
-//
-
-
void SAL_CALL CWinClipbImpl::flushClipboard( ) throw( RuntimeException )
{
// actually it should be ClearableMutexGuard aGuard( m_ClipContentMutex );
@@ -193,37 +166,21 @@ void SAL_CALL CWinClipbImpl::flushClipboard( ) throw( RuntimeException )
m_MtaOleClipboard.flushClipboard( );
}
-
-//
-
-
void SAL_CALL CWinClipbImpl::registerClipboardViewer( )
{
m_MtaOleClipboard.registerClipViewer( CWinClipbImpl::onClipboardContentChanged );
}
-
-//
-
-
void SAL_CALL CWinClipbImpl::unregisterClipboardViewer( )
{
m_MtaOleClipboard.registerClipViewer( NULL );
}
-
-//
-
-
void SAL_CALL CWinClipbImpl::dispose() throw( RuntimeException )
{
OSL_ENSURE( !m_pCurrentClipContent, "Clipboard was not flushed before shutdown!" );
}
-
-//
-
-
void WINAPI CWinClipbImpl::onClipboardContentChanged( void )
{
MutexGuard aGuard( s_aMutex );
@@ -233,10 +190,6 @@ void WINAPI CWinClipbImpl::onClipboardContentChanged( void )
s_pCWinClipbImpl->m_pWinClipboard->notifyAllClipboardListener( );
}
-
-//
-
-
void SAL_CALL CWinClipbImpl::onReleaseDataObject( CXNotifyingDataObject* theCaller )
{
OSL_ASSERT( NULL != theCaller );
diff --git a/dtrans/source/win32/clipb/WinClipbImpl.hxx b/dtrans/source/win32/clipb/WinClipbImpl.hxx
index 15eea430dd67..bb496df082fa 100644
--- a/dtrans/source/win32/clipb/WinClipbImpl.hxx
+++ b/dtrans/source/win32/clipb/WinClipbImpl.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _WINCLIPBIMPL_HXX_
#define _WINCLIPBIMPL_HXX_
@@ -39,10 +38,8 @@
class CWinClipboard;
class CXNotifyingDataObject;
-//---------------------------------------------------
// impl class to avoid deadlocks between XTDataObject
// and the clipboard implementation
-//---------------------------------------------------
class CWinClipbImpl
{
@@ -62,27 +59,19 @@ protected:
OUString SAL_CALL getName( ) throw( ::com::sun::star::uno::RuntimeException );
- //------------------------------------------------
// XClipboardEx
- //------------------------------------------------
sal_Int8 SAL_CALL getRenderingCapabilities( ) throw( ::com::sun::star::uno::RuntimeException );
- //------------------------------------------------
// XFlushableClipboard
- //------------------------------------------------
void SAL_CALL flushClipboard( ) throw( com::sun::star::uno::RuntimeException );
- //------------------------------------------------
// XComponent
- //------------------------------------------------
void SAL_CALL dispose( ) throw( ::com::sun::star::uno::RuntimeException );
- //------------------------------------------------
// member functions
- //------------------------------------------------
void SAL_CALL registerClipboardViewer( );
void SAL_CALL unregisterClipboardViewer( );
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
index 66b3f582eaf2..6870052c6b0f 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -25,10 +25,8 @@
#include <cppuhelper/supportsservice.hxx>
#include "WinClipbImpl.hxx"
-
// namespace directives
-
using namespace osl;
using namespace std;
using namespace cppu;
@@ -38,13 +36,10 @@ using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::clipboard;
using namespace com::sun::star::lang;
-
#define WINCLIPBOARD_IMPL_NAME "com.sun.star.datatransfer.clipboard.ClipboardW32"
-
// helper functions
-
namespace
{
Sequence< OUString > SAL_CALL WinClipboard_getSupportedServiceNames()
@@ -55,7 +50,6 @@ namespace
}
}
-
// ctor
/*XEventListener,*/
@@ -66,10 +60,7 @@ CWinClipboard::CWinClipboard( const Reference< XComponentContext >& rxContext, c
m_pImpl.reset( new CWinClipbImpl( aClipboardName, this ) );
}
-//========================================================================
// XClipboard
-//========================================================================
-
// getContent
// to avoid unecessary traffic we check first if there is a clipboard
@@ -78,7 +69,6 @@ CWinClipboard::CWinClipboard( const Reference< XComponentContext >& rxContext, c
// and so on, we simply return the orignial XTransferable instead of our
// DOTransferable
-
Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -93,10 +83,8 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( Runtime
return Reference< XTransferable >( );
}
-
// setContent
-
void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTransferable,
const Reference< XClipboardOwner >& xClipboardOwner )
throw( RuntimeException )
@@ -111,10 +99,8 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra
m_pImpl->setContents( xTransferable, xClipboardOwner );
}
-
// getName
-
OUString SAL_CALL CWinClipboard::getName( ) throw( RuntimeException )
{
if ( rBHelper.bDisposed )
@@ -127,9 +113,7 @@ OUString SAL_CALL CWinClipboard::getName( ) throw( RuntimeException )
return OUString("");
}
-//========================================================================
// XFlushableClipboard
-//========================================================================
void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException )
{
@@ -143,9 +127,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException )
m_pImpl->flushClipboard( );
}
-//========================================================================
// XClipboardEx
-//========================================================================
sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeException )
{
@@ -159,14 +141,10 @@ sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeExce
return 0;
}
-//========================================================================
// XClipboardNotifier
-//========================================================================
-
// getName
-
void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardListener >& listener )
throw( RuntimeException )
{
@@ -183,10 +161,8 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi
rBHelper.aLC.addInterface( getCppuType( &listener ), listener );
}
-
// getName
-
void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboardListener >& listener )
throw( RuntimeException )
{
@@ -203,10 +179,8 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar
rBHelper.aLC.removeInterface( getCppuType( &listener ), listener );
}
-
// getName
-
void SAL_CALL CWinClipboard::notifyAllClipboardListener( )
{
if ( !rBHelper.bDisposed )
@@ -254,11 +228,9 @@ void SAL_CALL CWinClipboard::notifyAllClipboardListener( )
} // end if
}
-
// overwritten base class method which will be
// called by the base class dispose method
-
void SAL_CALL CWinClipboard::disposing()
{
// do my own stuff
@@ -268,10 +240,8 @@ void SAL_CALL CWinClipboard::disposing()
m_pImpl.reset();
}
-
// XServiceInfo
-
OUString SAL_CALL CWinClipboard::getImplementationName( )
throw(RuntimeException)
{
@@ -285,10 +255,8 @@ sal_Bool SAL_CALL CWinClipboard::supportsService( const OUString& ServiceName )
return cppu::supportsService(this, ServiceName);
}
-
// XServiceInfo
-
Sequence< OUString > SAL_CALL CWinClipboard::getSupportedServiceNames( )
throw(RuntimeException)
{
diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx b/dtrans/source/win32/clipb/WinClipboard.hxx
index 608f9e9ceece..36344799719f 100644
--- a/dtrans/source/win32/clipb/WinClipboard.hxx
+++ b/dtrans/source/win32/clipb/WinClipboard.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _WINCLIPBOARD_HXX_
#define _WINCLIPBOARD_HXX_
@@ -40,7 +39,6 @@
// forward
class CWinClipbImpl;
-//------------------------------------------------------------------------
// implements the XClipboard[Ex] ... interfaces
// for the clipboard viewer mechanism we need a static callback function
// and a static member to reasocciate from this static function to the
@@ -49,7 +47,6 @@ class CWinClipbImpl;
// because we assume to be instanciated only once
// this will be asured by an OneInstanceFactory of the service and not
// by this class!
-//------------------------------------------------------------------------
// helper class, so that the mutex is constructed
// before the constructor of WeakComponentImplHelper
@@ -72,9 +69,7 @@ public:
CWinClipboard( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const OUString& aClipboardName );
- //------------------------------------------------
// XClipboard
- //------------------------------------------------
virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents( )
throw( ::com::sun::star::uno::RuntimeException );
@@ -87,21 +82,15 @@ public:
virtual OUString SAL_CALL getName( )
throw( ::com::sun::star::uno::RuntimeException );
- //------------------------------------------------
// XFlushableClipboard
- //------------------------------------------------
virtual void SAL_CALL flushClipboard( ) throw( com::sun::star::uno::RuntimeException );
- //------------------------------------------------
// XClipboardEx
- //------------------------------------------------
virtual sal_Int8 SAL_CALL getRenderingCapabilities( ) throw( ::com::sun::star::uno::RuntimeException );
- //------------------------------------------------
// XClipboardNotifier
- //------------------------------------------------
virtual void SAL_CALL addClipboardListener(
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
@@ -111,16 +100,12 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw( ::com::sun::star::uno::RuntimeException );
- //------------------------------------------------
// overwrite base class method, which is called
// by base class dispose function
- //------------------------------------------------
virtual void SAL_CALL disposing();
- //------------------------------------------------
// XServiceInfo
- //------------------------------------------------
virtual OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
@@ -141,7 +126,6 @@ private:
friend class CWinClipbImpl;
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx
index 8ca8563008b6..0e91ccec074f 100644
--- a/dtrans/source/win32/clipb/wcbentry.cxx
+++ b/dtrans/source/win32/clipb/wcbentry.cxx
@@ -23,20 +23,16 @@
#include <osl/diagnose.h>
#include "WinClipboard.hxx"
-
// some defines
-
// the service names
#define WINCLIPBOARD_SERVICE_NAME "com.sun.star.datatransfer.clipboard.SystemClipboard"
// the implementation names
#define WINCLIPBOARD_IMPL_NAME "com.sun.star.datatransfer.clipboard.ClipboardW32"
-
// namespace directives
-
using namespace ::rtl ;
using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::registry ;
@@ -44,19 +40,15 @@ using namespace ::cppu ;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::datatransfer::clipboard;
-
// create a static object to initialize the shell9x library
-
namespace
{
-
// functions to create a new Clipboad instance; is needed by factory helper implementation
// @param rServiceManager - service manager, useful if the component needs other uno services
// so we should give it to every UNO-Implementation component
-
Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
{
return Reference< XInterface >( static_cast< XClipboard* >( new CWinClipboard( comphelper::getComponentContext(rServiceManager), OUString( "" ) ) ) );
@@ -69,7 +61,6 @@ extern "C"
// component_getFactory
// returns a factory to create XFilePicker-Services
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL sysdtrans_component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ )
{
void* pRet = 0;
diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx
index 8aadbed956c6..da2e8de24bdd 100644
--- a/dtrans/source/win32/dnd/dndentry.cxx
+++ b/dtrans/source/win32/dnd/dndentry.cxx
@@ -43,7 +43,6 @@ Reference< XInterface > SAL_CALL createDropTarget( const Reference< XMultiServic
return Reference<XInterface>( static_cast<XInitialization*>(pTarget), UNO_QUERY);
}
-
extern "C"
{
diff --git a/dtrans/source/win32/dnd/globals.cxx b/dtrans/source/win32/dnd/globals.cxx
index 329551fabe0e..f36297e349b1 100644
--- a/dtrans/source/win32/dnd/globals.cxx
+++ b/dtrans/source/win32/dnd/globals.cxx
@@ -82,7 +82,6 @@ sal_Int8 dndOleKeysToAction( DWORD grfKeyState, sal_Int8 nSourceActions)
return ret;
}
-
sal_Int8 dndOleDropEffectsToActions( DWORD dwEffect)
{
sal_Int8 ret= ACTION_NONE;
diff --git a/dtrans/source/win32/dnd/globals.hxx b/dtrans/source/win32/dnd/globals.hxx
index 1828fc1549ee..e614e50962b6 100644
--- a/dtrans/source/win32/dnd/globals.hxx
+++ b/dtrans/source/win32/dnd/globals.hxx
@@ -30,7 +30,6 @@
#endif
#include <sal/types.h>
-
#define DNDSOURCE_SERVICE_NAME "com.sun.star.datatransfer.dnd.OleDragSource"
#define DNDSOURCE_IMPL_NAME "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1"
@@ -71,14 +70,11 @@ DWORD dndActionsToDropEffects( sal_Int8 actions);
// or Alt).
DWORD dndActionsToSingleDropEffect( sal_Int8 actions);
-
-
struct MutexDummy
{
osl::Mutex m_mutex;
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dnd/idroptarget.cxx b/dtrans/source/win32/dnd/idroptarget.cxx
index b0e4ad970c55..1510a5420965 100644
--- a/dtrans/source/win32/dnd/idroptarget.cxx
+++ b/dtrans/source/win32/dnd/idroptarget.cxx
@@ -35,7 +35,6 @@ IDropTargetImpl::~IDropTargetImpl()
{
}
-
//IDropTarget
HRESULT STDMETHODCALLTYPE IDropTargetImpl::QueryInterface( REFIID riid, void **ppvObject)
{
diff --git a/dtrans/source/win32/dnd/idroptarget.hxx b/dtrans/source/win32/dnd/idroptarget.hxx
index 32425a627304..bbaa799b147b 100644
--- a/dtrans/source/win32/dnd/idroptarget.hxx
+++ b/dtrans/source/win32/dnd/idroptarget.hxx
@@ -61,7 +61,6 @@ public:
/* [in] */ POINTL pt,
/* [out][in] */ DWORD __RPC_FAR *pdwEffect);
-
};
#endif
diff --git a/dtrans/source/win32/dnd/source.hxx b/dtrans/source/win32/dnd/source.hxx
index aed4af9b9126..333fc7b61106 100644
--- a/dtrans/source/win32/dnd/source.hxx
+++ b/dtrans/source/win32/dnd/source.hxx
@@ -93,7 +93,6 @@ 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 )
@@ -111,8 +110,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (RuntimeException);
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
-
-
virtual HRESULT STDMETHODCALLTYPE QueryInterface(
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
@@ -121,7 +118,6 @@ public:
virtual ULONG STDMETHODCALLTYPE Release( );
-
// IDropSource
virtual HRESULT STDMETHODCALLTYPE QueryContinueDrag(
/* [in] */ BOOL fEscapePressed,
@@ -132,7 +128,6 @@ public:
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dnd/sourcecontext.cxx b/dtrans/source/win32/dnd/sourcecontext.cxx
index a9f1c090dac1..a6f106f5e99a 100644
--- a/dtrans/source/win32/dnd/sourcecontext.cxx
+++ b/dtrans/source/win32/dnd/sourcecontext.cxx
@@ -73,7 +73,6 @@ void SAL_CALL SourceContext::transferablesFlavorsChanged( )
{
}
-
// non -interface functions
// Fires XDragSourceListener::dragDropEnd events.
void SourceContext::fire_dragDropEnd( sal_Bool success, sal_Int8 effect)
@@ -110,7 +109,6 @@ void SourceContext::fire_dragDropEnd( sal_Bool success, sal_Int8 effect)
}
}
-
void SourceContext::fire_dropActionChanged( sal_Int8 dropAction, sal_Int8 userAction)
{
if( m_currentAction != dropAction)
diff --git a/dtrans/source/win32/dnd/sourcecontext.hxx b/dtrans/source/win32/dnd/sourcecontext.hxx
index 4d9e5c928dc9..f149abb5e556 100644
--- a/dtrans/source/win32/dnd/sourcecontext.hxx
+++ b/dtrans/source/win32/dnd/sourcecontext.hxx
@@ -23,7 +23,6 @@
#include <com/sun/star/datatransfer/dnd/XDragSourceContext.hpp>
#include <cppuhelper/compbase1.hxx>
-
#include "source.hxx"
using namespace ::com::sun::star::datatransfer;
@@ -32,7 +31,6 @@ using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-
// This class fires events to XDragSourceListener implementations.
// Of that interface only dragDropEnd and dropActionChanged are called.
// The functions dragEnter, dragExit and dragOver are not supported
@@ -68,16 +66,12 @@ public:
virtual void SAL_CALL transferablesFlavorsChanged( )
throw( RuntimeException);
-
-
// non - interface functions
void fire_dragDropEnd( sal_Bool success, sal_Int8 byte);
void fire_dropActionChanged( sal_Int8 dropAction, sal_Int8 userAction);
};
-
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx
index 036ae9686124..4f52e540d07c 100644
--- a/dtrans/source/win32/dnd/target.cxx
+++ b/dtrans/source/win32/dnd/target.cxx
@@ -34,7 +34,6 @@ using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::dnd;
using namespace com::sun::star::datatransfer::dnd::DNDConstants;
-
#define WM_REGISTERDRAGDROP WM_USER + 1
#define WM_REVOKEDRAGDROP WM_USER + 2
extern Reference< XTransferable > g_XTransferable;
@@ -135,7 +134,6 @@ void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments )
m_pDropTarget= new IDropTargetImpl( *static_cast<DropTarget*>( this) );
m_pDropTarget->AddRef();
-
// Obtain the id of the thread that created the window
m_threadIdWindow= GetWindowThreadProcessId( m_hWnd, NULL);
// The event is set by the thread that we will create momentarily.
@@ -274,7 +272,6 @@ sal_Bool SAL_CALL DropTarget::isActive( ) throw(RuntimeException)
return m_bActive; //m_bDropTargetRegistered;
}
-
void SAL_CALL DropTarget::setActive( sal_Bool _b ) throw(RuntimeException)
{
MutexGuard g(m_mutex);
diff --git a/dtrans/source/win32/dnd/target.hxx b/dtrans/source/win32/dnd/target.hxx
index 98ccb2d14de4..37772ac1f4e1 100644
--- a/dtrans/source/win32/dnd/target.hxx
+++ b/dtrans/source/win32/dnd/target.hxx
@@ -38,7 +38,6 @@
#include "globals.hxx"
#include "../../inc/DtObjFactory.hxx"
-
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
using namespace cppu;
@@ -106,7 +105,6 @@ private:
Reference<XDropTargetDragContext> m_currentDragContext;
Reference<XDropTargetDropContext> m_currentDropContext;
-
private:
DropTarget();
DropTarget(DropTarget&);
@@ -140,7 +138,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (RuntimeException);
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
-
// Functions called from the IDropTarget implementation ( m_pDropTarget)
virtual HRESULT DragEnter(
/* [unique][in] */ IDataObject *pDataObj,
@@ -161,7 +158,6 @@ public:
/* [in] */ POINTL pt,
/* [out][in] */ DWORD *pdwEffect);
-
// Non - interface functions --------------------------------------------------
// XDropTargetDropContext delegated from DropContext
@@ -173,7 +169,6 @@ public:
void _acceptDrag( sal_Int8 dragOperation, const Reference<XDropTargetDragContext>& context);
void _rejectDrag( const Reference<XDropTargetDragContext>& context);
-
protected:
// Gets the current action dependend on the pressed modifiers, the effects
// supported by the drop source (IDropSource) and the default actions of the
@@ -182,20 +177,14 @@ protected:
// Only filters with the default actions
inline sal_Int8 getFilteredActions( DWORD grfKeyState);
-
-
void fire_drop( const DropTargetDropEvent& dte);
void fire_dragEnter( const DropTargetDragEnterEvent& dtde );
void fire_dragExit( const DropTargetEvent& dte );
void fire_dragOver( const DropTargetDragEvent& dtde );
void fire_dropActionChanged( const DropTargetDragEvent& dtde );
-
-
-
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dnd/targetdragcontext.hxx b/dtrans/source/win32/dnd/targetdragcontext.hxx
index 28b0b8233d91..26029c86681b 100644
--- a/dtrans/source/win32/dnd/targetdragcontext.hxx
+++ b/dtrans/source/win32/dnd/targetdragcontext.hxx
@@ -20,7 +20,6 @@
#ifndef _TARGETDRAGCONTEXT_HXX_
#define _TARGETDRAGCONTEXT_HXX_
-
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp>
#include <com/sun/star/datatransfer/DataFlavor.hpp>
diff --git a/dtrans/source/win32/dnd/targetdropcontext.hxx b/dtrans/source/win32/dnd/targetdropcontext.hxx
index ce6e4c5c58cb..6f428c89b080 100644
--- a/dtrans/source/win32/dnd/targetdropcontext.hxx
+++ b/dtrans/source/win32/dnd/targetdropcontext.hxx
@@ -43,7 +43,6 @@ public:
TargetDropContext( DropTarget* pTarget);
~TargetDropContext();
-
// XDropTargetDragContext
virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation )
throw( RuntimeException);
diff --git a/dtrans/source/win32/dtobj/APNDataObject.cxx b/dtrans/source/win32/dtobj/APNDataObject.cxx
index 9428b52a47e5..4de3f3e579c7 100644
--- a/dtrans/source/win32/dtobj/APNDataObject.cxx
+++ b/dtrans/source/win32/dtobj/APNDataObject.cxx
@@ -31,10 +31,8 @@
#define FREE_HGLOB_ON_RELEASE TRUE
#define KEEP_HGLOB_ON_RELEASE FALSE
-
// ctor
-
CAPNDataObject::CAPNDataObject( IDataObjectPtr rIDataObject ) :
m_rIDataObjectOrg( rIDataObject ),
m_hGlobal( NULL ),
@@ -106,10 +104,8 @@ CAPNDataObject::~CAPNDataObject( )
}
}
-
// IUnknown->QueryInterface
-
STDMETHODIMP CAPNDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
{
OSL_ASSERT( NULL != ppvObject );
@@ -130,19 +126,15 @@ STDMETHODIMP CAPNDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
return hr;
}
-
// IUnknown->AddRef
-
STDMETHODIMP_(ULONG) CAPNDataObject::AddRef( )
{
return static_cast< ULONG >( InterlockedIncrement( &m_nRefCnt ) );
}
-
// IUnknown->Release
-
STDMETHODIMP_(ULONG) CAPNDataObject::Release( )
{
// we need a helper variable because it's not allowed to access
@@ -155,10 +147,8 @@ STDMETHODIMP_(ULONG) CAPNDataObject::Release( )
return nRefCnt;
}
-
// IDataObject->GetData
-
STDMETHODIMP CAPNDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium )
{
HRESULT hr = m_rIDataObjectOrg->GetData( pFormatetc, pmedium );
@@ -174,10 +164,8 @@ STDMETHODIMP CAPNDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmediu
return hr;
}
-
// IDataObject->EnumFormatEtc
-
STDMETHODIMP CAPNDataObject::EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC** ppenumFormatetc )
{
HRESULT hr = m_rIDataObjectOrg->EnumFormatEtc(dwDirection, ppenumFormatetc);
@@ -193,10 +181,8 @@ STDMETHODIMP CAPNDataObject::EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC**
return hr;
}
-
// IDataObject->QueryGetData
-
STDMETHODIMP CAPNDataObject::QueryGetData( LPFORMATETC pFormatetc )
{
HRESULT hr = m_rIDataObjectOrg->QueryGetData( pFormatetc );
@@ -212,10 +198,8 @@ STDMETHODIMP CAPNDataObject::QueryGetData( LPFORMATETC pFormatetc )
return hr;
}
-
// IDataObject->GetDataHere
-
STDMETHODIMP CAPNDataObject::GetDataHere( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium )
{
HRESULT hr = m_rIDataObjectOrg->GetDataHere(pFormatetc, pmedium);
@@ -231,10 +215,8 @@ STDMETHODIMP CAPNDataObject::GetDataHere( LPFORMATETC pFormatetc, LPSTGMEDIUM pm
return hr;
}
-
// IDataObject->GetCanonicalFormatEtc
-
STDMETHODIMP CAPNDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatectIn, LPFORMATETC pFormatetcOut)
{
HRESULT hr = m_rIDataObjectOrg->GetCanonicalFormatEtc( pFormatectIn, pFormatetcOut );
@@ -250,10 +232,8 @@ STDMETHODIMP CAPNDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatectIn, LPF
return hr;
}
-
// IDataObject->SetData
-
STDMETHODIMP CAPNDataObject::SetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium, BOOL fRelease )
{
HRESULT hr = m_rIDataObjectOrg->SetData( pFormatetc, pmedium, fRelease );
@@ -269,10 +249,8 @@ STDMETHODIMP CAPNDataObject::SetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmediu
return hr;
}
-
// IDataObject->DAdvise
-
STDMETHODIMP CAPNDataObject::DAdvise( LPFORMATETC pFormatetc, DWORD advf, LPADVISESINK pAdvSink, DWORD * pdwConnection )
{
HRESULT hr = m_rIDataObjectOrg->DAdvise(pFormatetc, advf, pAdvSink, pdwConnection);
@@ -288,10 +266,8 @@ STDMETHODIMP CAPNDataObject::DAdvise( LPFORMATETC pFormatetc, DWORD advf, LPADVI
return hr;
}
-
// IDataObject->DUnadvise
-
STDMETHODIMP CAPNDataObject::DUnadvise( DWORD dwConnection )
{
HRESULT hr = m_rIDataObjectOrg->DUnadvise( dwConnection );
@@ -307,10 +283,8 @@ STDMETHODIMP CAPNDataObject::DUnadvise( DWORD dwConnection )
return hr;
}
-
// IDataObject->EnumDAdvise
-
STDMETHODIMP CAPNDataObject::EnumDAdvise( LPENUMSTATDATA * ppenumAdvise )
{
HRESULT hr = m_rIDataObjectOrg->EnumDAdvise(ppenumAdvise);
@@ -326,19 +300,15 @@ STDMETHODIMP CAPNDataObject::EnumDAdvise( LPENUMSTATDATA * ppenumAdvise )
return hr;
}
-
// for our convenience
-
CAPNDataObject::operator IDataObject*( )
{
return static_cast< IDataObject* >( this );
}
-
// helper function
-
HRESULT CAPNDataObject::MarshalIDataObjectIntoCurrentApartment( IDataObject** ppIDataObj )
{
OSL_ASSERT(NULL != ppIDataObj);
diff --git a/dtrans/source/win32/dtobj/APNDataObject.hxx b/dtrans/source/win32/dtobj/APNDataObject.hxx
index 6ef90e16f068..bc23d88d6c8c 100644
--- a/dtrans/source/win32/dtobj/APNDataObject.hxx
+++ b/dtrans/source/win32/dtobj/APNDataObject.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _APNDATAOBJECT_HXX_
#define _APNDATAOBJECT_HXX_
@@ -36,17 +35,13 @@ public:
CAPNDataObject( IDataObjectPtr rIDataObject );
virtual ~CAPNDataObject( );
- //-----------------------------------------------------------------
//IUnknown interface methods
- //-----------------------------------------------------------------
STDMETHODIMP QueryInterface(REFIID iid, LPVOID* ppvObject);
STDMETHODIMP_( ULONG ) AddRef( );
STDMETHODIMP_( ULONG ) Release( );
- //-----------------------------------------------------------------
// IDataObject interface methods
- //-----------------------------------------------------------------
STDMETHODIMP GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium );
STDMETHODIMP GetDataHere( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium );
diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index 56c5dde01ca0..475ecadac7d3 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -31,10 +31,8 @@
#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
#include <comphelper/processfactory.hxx>
-
// namespace directives
-
using namespace std;
using namespace osl;
using namespace cppu;
@@ -44,11 +42,6 @@ using namespace com::sun::star::io;
using namespace com::sun::star::lang;
using namespace com::sun::star::container;
-
-
-//
-
-
namespace
{
const Type CPPUTYPE_SEQINT8 = getCppuType( ( Sequence< sal_Int8 >* )0 );
@@ -64,11 +57,8 @@ namespace
} // end namespace
-
-
// ctor
-
CDOTransferable::CDOTransferable(
const Reference< XComponentContext >& rxContext, IDataObjectPtr rDataObject ) :
m_rDataObject( rDataObject ),
@@ -79,10 +69,6 @@ CDOTransferable::CDOTransferable(
{
}
-
-//
-
-
Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
throw( UnsupportedFlavorException, IOException, RuntimeException )
{
@@ -90,17 +76,13 @@ Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
MutexGuard aGuard( m_aMutex );
-
// convert dataflavor to formatetc
-
CFormatEtc fetc = m_DataFormatTranslator.getFormatEtcFromDataFlavor( aFlavor );
OSL_ASSERT( CF_INVALID != fetc.getClipformat() );
-
// get the data from clipboard in a byte stream
-
ByteSequence_t clipDataStream;
try
@@ -137,29 +119,23 @@ Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
throw; // pass through exception
}
-
// return the data as any
-
return byteStreamToAny( clipDataStream, aFlavor.DataType );
}
-
// getTransferDataFlavors
-
Sequence< DataFlavor > SAL_CALL CDOTransferable::getTransferDataFlavors( )
throw( RuntimeException )
{
return m_FlavorList;
}
-
// isDataFlavorSupported
// returns true if we find a DataFlavor with the same MimeType and
// DataType
-
sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
throw( RuntimeException )
{
@@ -172,7 +148,6 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla
return sal_False;
}
-
// helper function
// the list of datafalvors currently on the clipboard will be initialized
// only once; if the client of this Transferable will hold a reference
@@ -183,7 +158,6 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla
// we save the first offered text format which we will later use for the
// conversion
-
void SAL_CALL CDOTransferable::initFlavorList( )
{
IEnumFORMATETCPtr pEnumFormatEtc;
@@ -231,10 +205,6 @@ void SAL_CALL CDOTransferable::initFlavorList( )
}
}
-
-//
-
-
inline
void SAL_CALL CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor )
{
@@ -248,10 +218,8 @@ void SAL_CALL CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor )
}
}
-
// helper function
-
//inline
DataFlavor SAL_CALL CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFormatEtc )
{
@@ -268,11 +236,9 @@ DataFlavor SAL_CALL CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFo
return m_DataFormatTranslator.getDataFlavorFromFormatEtc( aFormatEtc, lcid );
}
-
// returns the current locale on clipboard; if there is no locale on
// clipboard the function returns the current thread locale
-
LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( )
{
LCID lcid = GetThreadLocale( );
@@ -297,12 +263,10 @@ LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( )
return lcid;
}
-
// i think it's not necessary to call ReleaseStgMedium
// in case of failures because nothing should have been
// allocated etc.
-
CDOTransferable::ByteSequence_t SAL_CALL CDOTransferable::getClipboardData( CFormatEtc& aFormatEtc )
{
STGMEDIUM stgmedium;
@@ -377,10 +341,6 @@ CDOTransferable::ByteSequence_t SAL_CALL CDOTransferable::getClipboardData( CFor
return byteStream;
}
-
-//
-
-
OUString SAL_CALL CDOTransferable::synthesizeUnicodeText( )
{
ByteSequence_t aTextSequence;
@@ -422,10 +382,6 @@ OUString SAL_CALL CDOTransferable::synthesizeUnicodeText( )
return OUString(pWChar);
}
-
-//
-
-
void CDOTransferable::clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium, ByteSequence_t& aByteSequence )
{
CStgTransferHelper memTransferHelper;
@@ -458,10 +414,6 @@ void CDOTransferable::clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium,
memTransferHelper.read( aByteSequence.getArray( ), nMemSize );
}
-
-//
-
-
inline
Any CDOTransferable::byteStreamToAny( ByteSequence_t& aByteStream, const Type& aRequestedDataType )
{
@@ -478,10 +430,6 @@ Any CDOTransferable::byteStreamToAny( ByteSequence_t& aByteStream, const Type& a
return aAny;
}
-
-//
-
-
inline
OUString CDOTransferable::byteStreamToOUString( ByteSequence_t& aByteStream )
{
@@ -498,10 +446,6 @@ OUString CDOTransferable::byteStreamToOUString( ByteSequence_t& aByteStream )
return OUString( reinterpret_cast< sal_Unicode* >( aByteStream.getArray( ) ), nWChars );
}
-
-//
-
-
sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
const DataFlavor& lhs, const DataFlavor& rhs )
{
@@ -531,20 +475,12 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
return bRet;
}
-
-//
-
-
sal_Bool SAL_CALL CDOTransferable::cmpFullMediaType(
const Reference< XMimeContentType >& xLhs, const Reference< XMimeContentType >& xRhs ) const
{
return xLhs->getFullMediaType().equalsIgnoreAsciiCase( xRhs->getFullMediaType( ) );
}
-
-//
-
-
sal_Bool SAL_CALL CDOTransferable::cmpAllContentTypeParameter(
const Reference< XMimeContentType >& xLhs, const Reference< XMimeContentType >& xRhs ) const
{
@@ -606,5 +542,4 @@ sal_Bool SAL_CALL CDOTransferable::cmpAllContentTypeParameter(
return retVal;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dtobj/DOTransferable.hxx b/dtrans/source/win32/dtobj/DOTransferable.hxx
index d8fcf77d3327..5e20010949d5 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.hxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _DOTRANSFERABLE_HXX_
#define _DOTRANSFERABLE_HXX_
@@ -41,9 +40,7 @@ class CDOTransferable : public ::cppu::WeakImplHelper2< ::com::sun::star::datatr
public:
typedef com::sun::star::uno::Sequence< sal_Int8 > ByteSequence_t;
- //------------------------------------------------------------------------
// XTransferable
- //------------------------------------------------------------------------
virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
throw( ::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
@@ -53,22 +50,19 @@ public:
virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
throw( ::com::sun::star::uno::RuntimeException );
- //------------------------------------------------------------------------
+
// XSystemTransferable
- //------------------------------------------------------------------------
+
virtual ::com::sun::star::uno::Any SAL_CALL getData( const com::sun::star::uno::Sequence<sal_Int8>& aProcessId ) throw
(::com::sun::star::uno::RuntimeException);
-
private:
// should be created only by CDTransObjFactory
explicit CDOTransferable(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
IDataObjectPtr rDataObject );
- //------------------------------------------------------------------------
// some helper functions
- //------------------------------------------------------------------------
void SAL_CALL initFlavorList( );
diff --git a/dtrans/source/win32/dtobj/DTransHelper.cxx b/dtrans/source/win32/dtobj/DTransHelper.cxx
index 6f7094351cdd..46b1086fe18d 100644
--- a/dtrans/source/win32/dtobj/DTransHelper.cxx
+++ b/dtrans/source/win32/dtobj/DTransHelper.cxx
@@ -21,10 +21,8 @@
#include <osl/diagnose.h>
#include "DTransHelper.hxx"
-
// implementation
-
CStgTransferHelper::CStgTransferHelper( sal_Bool bAutoInit,
HGLOBAL hGlob,
sal_Bool bDelStgOnRelease ) :
@@ -35,21 +33,16 @@ CStgTransferHelper::CStgTransferHelper( sal_Bool bAutoInit,
init( hGlob, m_bDelStgOnRelease );
}
-
// dtor
-
-
CStgTransferHelper::~CStgTransferHelper( )
{
if ( m_lpStream )
m_lpStream->Release( );
}
-
// TransferData into the
-
void SAL_CALL CStgTransferHelper::write( const void* lpData, ULONG cb, ULONG* cbWritten )
{
HRESULT hr = E_FAIL;
@@ -71,10 +64,8 @@ void SAL_CALL CStgTransferHelper::write( const void* lpData, ULONG cb, ULONG* cb
#endif
}
-
// read
-
void SAL_CALL CStgTransferHelper::read( LPVOID pv, ULONG cb, ULONG* pcbRead )
{
HRESULT hr = E_FAIL;
@@ -86,10 +77,8 @@ void SAL_CALL CStgTransferHelper::read( LPVOID pv, ULONG cb, ULONG* pcbRead )
throw CStgTransferException( hr );
}
-
// GetHGlobal
-
HGLOBAL SAL_CALL CStgTransferHelper::getHGlobal( ) const
{
OSL_ASSERT( m_lpStream );
@@ -106,10 +95,8 @@ HGLOBAL SAL_CALL CStgTransferHelper::getHGlobal( ) const
return hGlob;
}
-
// getIStream
-
void SAL_CALL CStgTransferHelper::getIStream( LPSTREAM* ppStream )
{
OSL_ASSERT( ppStream );
@@ -118,10 +105,8 @@ void SAL_CALL CStgTransferHelper::getIStream( LPSTREAM* ppStream )
static_cast< LPUNKNOWN >( *ppStream )->AddRef( );
}
-
// Init
-
void SAL_CALL CStgTransferHelper::init( SIZE_T newSize,
sal_uInt32 uiFlags,
sal_Bool bDelStgOnRelease )
@@ -149,10 +134,8 @@ void SAL_CALL CStgTransferHelper::init( SIZE_T newSize,
#endif
}
-
// Init
-
void SAL_CALL CStgTransferHelper::init( HGLOBAL hGlob,
sal_Bool bDelStgOnRelease )
{
@@ -165,10 +148,8 @@ void SAL_CALL CStgTransferHelper::init( HGLOBAL hGlob,
throw CStgTransferException( hr );
}
-
// free the global memory and invalidate the stream pointer
-
void SAL_CALL CStgTransferHelper::cleanup( )
{
if ( m_lpStream && !m_bDelStgOnRelease )
@@ -185,10 +166,8 @@ void SAL_CALL CStgTransferHelper::cleanup( )
}
}
-
// return the size of memory we point to
-
sal_uInt32 SAL_CALL CStgTransferHelper::memSize( CLIPFORMAT cf ) const
{
DWORD dwSize = 0;
diff --git a/dtrans/source/win32/dtobj/DTransHelper.hxx b/dtrans/source/win32/dtobj/DTransHelper.hxx
index 8f5a8956ccc5..7c9424f34026 100644
--- a/dtrans/source/win32/dtobj/DTransHelper.hxx
+++ b/dtrans/source/win32/dtobj/DTransHelper.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _DTRANSHELPER_HXX_
#define _DTRANSHELPER_HXX_
@@ -35,11 +34,9 @@
#define MEM_DESTROY_ON_RELEASE TRUE
#define NO_MEM_DESTROY_ON_RELEASE FALSE
-//-------------------------------------------------------------------------
// a helper class to manage a global memory area, the clients can write
// into the global memory area and extract the handle to the global mem
// note: not thread-safe
-//-------------------------------------------------------------------------
class CStgTransferHelper
{
@@ -91,19 +88,15 @@ private:
CStgTransferHelper& operator=( const CStgTransferHelper& );
};
-//-------------------------------------------------------------------------
// something like an auto-pointer - allows access to the memory belonging
// to a HGLOBAL and automatically unlocks a global memory at destruction
// time
-//-------------------------------------------------------------------------
class CRawHGlobalPtr
{
public:
- //---------------------------------------------
// ctor
- //---------------------------------------------
CRawHGlobalPtr( HGLOBAL hGlob ) :
m_hGlob( hGlob ),
@@ -112,10 +105,7 @@ public:
{
}
-
- //---------------------------------------------
// ctor
- //---------------------------------------------
CRawHGlobalPtr( const CStgTransferHelper& theHGlobalHelper ) :
m_hGlob( theHGlobalHelper.getHGlobal( ) ),
@@ -124,9 +114,7 @@ public:
{
}
- //---------------------------------------------
// dtor
- //---------------------------------------------
~CRawHGlobalPtr( )
{
@@ -134,10 +122,8 @@ public:
GlobalUnlock( m_hGlob );
}
- //---------------------------------------------
// lock the global memory (initializes a
// pointer to this memory)
- //---------------------------------------------
BOOL Lock( )
{
@@ -150,10 +136,8 @@ public:
return m_bIsLocked;
}
- //---------------------------------------------
// unlock the global memory (invalidates the
// pointer to this memory)
- //---------------------------------------------
BOOL Unlock( )
{
@@ -164,10 +148,8 @@ public:
return ( NO_ERROR == GetLastError( ) );
}
- //---------------------------------------------
// locks the global memory and returns a
// pointer to this memory
- //---------------------------------------------
LPVOID GetMemPtr( )
{
@@ -175,9 +157,7 @@ public:
return m_pGlobMem;
}
- //---------------------------------------------
// size of mem we point to
- //---------------------------------------------
int MemSize( ) const
{
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
index 90fa35d471aa..d1109ec69cc8 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
@@ -29,7 +29,6 @@
#include "Fetc.hxx"
#include <com/sun/star/datatransfer/DataFormatTranslator.hpp>
-
#if defined _MSC_VER
#pragma warning(push,1)
#pragma warning(disable:4917)
@@ -40,17 +39,13 @@
#pragma warning(pop)
#endif
-
-
// namespace directives
-
using namespace std;
using namespace com::sun::star::uno;
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::lang;
-
const Type CPPUTYPE_SALINT32 = getCppuType((sal_Int32*)0);
const Type CPPUTYPE_SALINT8 = getCppuType((sal_Int8*)0);
const Type CPPUTYPE_OUSTRING = getCppuType((OUString*)0);
@@ -63,19 +58,11 @@ const OUString HPNAME_OEM_ANSI_TEXT ("OEM/ANSI Text");
const OUString HTML_FORMAT_NAME_WINDOWS ("HTML Format");
const OUString HTML_FORMAT_NAME_SOFFICE ("HTML (HyperText Markup Language)");
-
-//
-
-
CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext )
{
m_XDataFormatTranslator = DataFormatTranslator::create( rxContext );
}
-
-//
-
-
CFormatEtc CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor& aDataFlavor ) const
{
sal_Int32 cf = CF_INVALID;
@@ -116,10 +103,6 @@ CFormatEtc CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor&
return sal::static_int_cast<CFormatEtc>(getFormatEtcForClipformat( sal::static_int_cast<CLIPFORMAT>(cf) ));
}
-
-//
-
-
DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& aFormatEtc, LCID lcid ) const
{
DataFlavor aFlavor;
@@ -173,10 +156,6 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& a
return aFlavor;
}
-
-//
-
-
CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformatName( const OUString& aClipFmtName ) const
{
// check parameter
@@ -187,10 +166,6 @@ CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformatName( const
return getFormatEtcForClipformat( cf );
}
-
-//
-
-
OUString CDataFormatTranslator::getClipboardFormatName( CLIPFORMAT aClipformat ) const
{
OSL_PRECOND( CF_INVALID != aClipformat, "Invalid clipboard format" );
@@ -201,10 +176,6 @@ OUString CDataFormatTranslator::getClipboardFormatName( CLIPFORMAT aClipformat )
return OUString( wBuff, nLen );
}
-
-//
-
-
CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT cf ) const
{
CFormatEtc fetc( cf, TYMED_NULL, NULL, DVASPECT_CONTENT );
@@ -238,57 +209,33 @@ CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT
return fetc;
}
-
-//
-
-
sal_Bool SAL_CALL CDataFormatTranslator::isOemOrAnsiTextFormat( CLIPFORMAT cf ) const
{
return ( (cf == CF_TEXT) || (cf == CF_OEMTEXT) );
}
-
-//
-
-
sal_Bool SAL_CALL CDataFormatTranslator::isUnicodeTextFormat( CLIPFORMAT cf ) const
{
return ( cf == CF_UNICODETEXT );
}
-
-//
-
-
sal_Bool SAL_CALL CDataFormatTranslator::isTextFormat( CLIPFORMAT cf ) const
{
return ( isOemOrAnsiTextFormat( cf ) || isUnicodeTextFormat( cf ) );
}
-
-//
-
-
sal_Bool SAL_CALL CDataFormatTranslator::isHTMLFormat( CLIPFORMAT cf ) const
{
OUString clipFormatName = getClipboardFormatName( cf );
return ( clipFormatName == HTML_FORMAT_NAME_WINDOWS );
}
-
-//
-
-
sal_Bool SAL_CALL CDataFormatTranslator::isTextHtmlFormat( CLIPFORMAT cf ) const
{
OUString clipFormatName = getClipboardFormatName( cf );
return ( clipFormatName.equalsIgnoreAsciiCase( HTML_FORMAT_NAME_SOFFICE ) );
}
-
-//
-
-
OUString SAL_CALL CDataFormatTranslator::getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat ) const
{
OSL_ASSERT( isOemOrAnsiTextFormat( aClipformat ) );
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.hxx b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
index 5f8b9e1cca47..fb024d869347 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.hxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _DATAFMTTRANSL_HXX_
#define _DATAFMTTRANSL_HXX_
@@ -35,9 +34,7 @@
#pragma warning(pop)
#endif
-//-----------------------------------------------
// declaration
-//-----------------------------------------------
class CFormatEtc;
diff --git a/dtrans/source/win32/dtobj/DtObjFactory.cxx b/dtrans/source/win32/dtobj/DtObjFactory.cxx
index 174972463a21..584c695772c5 100644
--- a/dtrans/source/win32/dtobj/DtObjFactory.cxx
+++ b/dtrans/source/win32/dtobj/DtObjFactory.cxx
@@ -23,18 +23,14 @@
#include "DOTransferable.hxx"
-
// namespace directives
-
using namespace com::sun::star::uno;
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::lang;
-
// implementation
-
IDataObjectPtr SAL_CALL CDTransObjFactory::createDataObjFromTransferable(const Reference<XComponentContext>& rxContext,
const Reference< XTransferable >& refXTransferable)
{
diff --git a/dtrans/source/win32/dtobj/Fetc.cxx b/dtrans/source/win32/dtobj/Fetc.cxx
index b237b865f124..9f60a0e5d68e 100644
--- a/dtrans/source/win32/dtobj/Fetc.cxx
+++ b/dtrans/source/win32/dtobj/Fetc.cxx
@@ -21,10 +21,6 @@
#include "Fetc.hxx"
#include "../misc/ImplHelper.hxx"
-
-//
-
-
CFormatEtc::CFormatEtc( )
{
m_FormatEtc.cfFormat = 0;
@@ -34,28 +30,18 @@ CFormatEtc::CFormatEtc( )
m_FormatEtc.tymed = TYMED_NULL;
}
-
// transfer of ownership
-
CFormatEtc::CFormatEtc( const FORMATETC& aFormatEtc )
{
CopyFormatEtc( &m_FormatEtc, &const_cast< FORMATETC& >( aFormatEtc ) );
}
-
-//
-
-
CFormatEtc::~CFormatEtc( )
{
DeleteTargetDevice( m_FormatEtc.ptd );
}
-
-//
-
-
CFormatEtc::CFormatEtc( CLIPFORMAT cf, DWORD tymed, DVTARGETDEVICE* ptd, DWORD dwAspect, LONG lindex )
{
m_FormatEtc.cfFormat = cf;
@@ -65,10 +51,6 @@ CFormatEtc::CFormatEtc( CLIPFORMAT cf, DWORD tymed, DVTARGETDEVICE* ptd, DWORD d
m_FormatEtc.tymed = tymed;
}
-
-//
-
-
CFormatEtc::CFormatEtc( const CFormatEtc& theOther )
{
m_FormatEtc.cfFormat = theOther.m_FormatEtc.cfFormat;
@@ -78,10 +60,6 @@ CFormatEtc::CFormatEtc( const CFormatEtc& theOther )
m_FormatEtc.tymed = theOther.m_FormatEtc.tymed;
}
-
-//
-
-
CFormatEtc& CFormatEtc::operator=( const CFormatEtc& theOther )
{
if ( this != &theOther )
@@ -98,28 +76,16 @@ CFormatEtc& CFormatEtc::operator=( const CFormatEtc& theOther )
return *this;
}
-
-//
-
-
CFormatEtc::operator FORMATETC*( )
{
return &m_FormatEtc;
}
-
-//
-
-
CFormatEtc::operator FORMATETC( )
{
return m_FormatEtc;
}
-
-//
-
-
void CFormatEtc::getFORMATETC( LPFORMATETC lpFormatEtc )
{
OSL_ASSERT( lpFormatEtc );
@@ -128,28 +94,16 @@ void CFormatEtc::getFORMATETC( LPFORMATETC lpFormatEtc )
CopyFormatEtc( lpFormatEtc, &m_FormatEtc );
}
-
-//
-
-
CLIPFORMAT CFormatEtc::getClipformat( ) const
{
return m_FormatEtc.cfFormat;
}
-
-//
-
-
DWORD CFormatEtc::getTymed( ) const
{
return m_FormatEtc.tymed;
}
-
-//
-
-
void CFormatEtc::getTargetDevice( DVTARGETDEVICE** lpDvTargetDevice ) const
{
OSL_ASSERT( lpDvTargetDevice );
@@ -161,83 +115,49 @@ void CFormatEtc::getTargetDevice( DVTARGETDEVICE** lpDvTargetDevice ) const
*lpDvTargetDevice = CopyTargetDevice( m_FormatEtc.ptd );
}
-
-//
-
-
DWORD CFormatEtc::getDvAspect( ) const
{
return m_FormatEtc.dwAspect;
}
-
-//
-
-
LONG CFormatEtc::getLindex( ) const
{
return m_FormatEtc.lindex;
}
-
-//
-
-
void CFormatEtc::setClipformat( CLIPFORMAT cf )
{
m_FormatEtc.cfFormat = cf;
}
-
-//
-
-
void CFormatEtc::setTymed( DWORD tymed )
{
m_FormatEtc.tymed = tymed;
}
-
// transfer of ownership!
-
void CFormatEtc::setTargetDevice( DVTARGETDEVICE* ptd )
{
DeleteTargetDevice( m_FormatEtc.ptd );
m_FormatEtc.ptd = ptd;
}
-
-//
-
-
void CFormatEtc::setDvAspect( DWORD dwAspect )
{
m_FormatEtc.dwAspect = dwAspect;
}
-
-//
-
-
void CFormatEtc::setLindex( LONG lindex )
{
m_FormatEtc.lindex = lindex;
}
-
-//
-
-
sal_Int32 operator==( const CFormatEtc& lhs, const CFormatEtc& rhs )
{
return CompareFormatEtc( &lhs.m_FormatEtc, &rhs.m_FormatEtc );
}
-
-//
-
-
sal_Int32 operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs )
{
return ( ( lhs == rhs ) != 1 );
diff --git a/dtrans/source/win32/dtobj/Fetc.hxx b/dtrans/source/win32/dtobj/Fetc.hxx
index 3d02afa16b5c..7358b9a3ef61 100644
--- a/dtrans/source/win32/dtobj/Fetc.hxx
+++ b/dtrans/source/win32/dtobj/Fetc.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _FETC_HXX_
#define _FETC_HXX_
@@ -77,7 +76,6 @@ private:
sal_Int32 operator==( const CFormatEtc& lhs, const CFormatEtc& rhs );
sal_Int32 operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs );
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx
index 1ac231364011..7eba9fd20cd8 100644
--- a/dtrans/source/win32/dtobj/FetcList.cxx
+++ b/dtrans/source/win32/dtobj/FetcList.cxx
@@ -31,46 +31,27 @@
#include "MimeAttrib.hxx"
-
// namespace directives
-
using namespace com::sun::star::uno;
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::lang;
using namespace com::sun::star::container;
using namespace std;
-
-
-//
-
-
LCID CFormatRegistrar::m_TxtLocale = 0;
sal_uInt32 CFormatRegistrar::m_TxtCodePage = GetACP( );
-
-//
-
-
CFormatEtcContainer::CFormatEtcContainer( )
{
m_EnumIterator = m_FormatMap.begin( );
}
-
-//
-
-
void CFormatEtcContainer::addFormatEtc( const CFormatEtc& fetc )
{
m_FormatMap.push_back( CFormatEtc( fetc ) );
}
-
-//
-
-
void SAL_CALL CFormatEtcContainer::removeFormatEtc( const CFormatEtc& fetc )
{
FormatEtcMap_t::iterator iter =
@@ -80,19 +61,11 @@ void SAL_CALL CFormatEtcContainer::removeFormatEtc( const CFormatEtc& fetc )
m_FormatMap.erase( iter );
}
-
-//
-
-
void SAL_CALL CFormatEtcContainer::removeAllFormatEtc( )
{
m_FormatMap.clear( );
}
-
-//
-
-
sal_Bool CFormatEtcContainer::hasFormatEtc( const CFormatEtc& fetc ) const
{
FormatEtcMap_t::const_iterator iter =
@@ -101,28 +74,16 @@ sal_Bool CFormatEtcContainer::hasFormatEtc( const CFormatEtc& fetc ) const
return ( iter != m_FormatMap.end( ) );
}
-
-//
-
-
sal_Bool CFormatEtcContainer::hasElements( ) const
{
return !m_FormatMap.empty();
}
-
-//
-
-
void CFormatEtcContainer::beginEnumFormatEtc( )
{
m_EnumIterator = m_FormatMap.begin( );
}
-
-//
-
-
sal_uInt32 SAL_CALL CFormatEtcContainer::nextFormatEtc( LPFORMATETC lpFetc,
sal_uInt32 aNum )
{
@@ -141,11 +102,6 @@ sal_uInt32 SAL_CALL CFormatEtcContainer::nextFormatEtc( LPFORMATETC lpFetc,
return nFetched;
}
-
-
-//
-
-
sal_Bool SAL_CALL CFormatEtcContainer::skipFormatEtc( sal_uInt32 aNum )
{
FormatEtcMap_t::const_iterator iter_end = m_FormatMap.end( );
@@ -157,14 +113,6 @@ sal_Bool SAL_CALL CFormatEtcContainer::skipFormatEtc( sal_uInt32 aNum )
return ( m_EnumIterator != m_FormatMap.end( ) );
}
-
-//#########################################################################
-
-
-
-//
-
-
CFormatRegistrar::CFormatRegistrar( const Reference< XComponentContext >& rxContext,
const CDataFormatTranslator& aDataFormatTranslator ) :
m_DataFormatTranslator( aDataFormatTranslator ),
@@ -173,7 +121,6 @@ CFormatRegistrar::CFormatRegistrar( const Reference< XComponentContext >& rxCont
{
}
-
// this function converts all DataFlavors of the given FlavorList into
// an appropriate FORMATETC structure, for some formats like unicodetext,
// text and text/html we will offer an accompany format e.g.:
@@ -194,7 +141,6 @@ CFormatRegistrar::CFormatRegistrar( const Reference< XComponentContext >& rxCont
// if some tries to register different text formats with different charsets the last
// registered wins and the others are ignored
-
void SAL_CALL CFormatRegistrar::RegisterFormats(
const Reference< XTransferable >& aXTransferable, CFormatEtcContainer& aFormatEtcContainer )
{
@@ -277,46 +223,26 @@ void SAL_CALL CFormatRegistrar::RegisterFormats(
}
}
-
-//
-
-
sal_Bool SAL_CALL CFormatRegistrar::hasSynthesizedLocale( ) const
{
return m_bHasSynthesizedLocale;
}
-
-//
-
-
LCID SAL_CALL CFormatRegistrar::getSynthesizedLocale( ) const
{
return m_TxtLocale;
}
-
-//
-
-
sal_uInt32 SAL_CALL CFormatRegistrar::getRegisteredTextCodePage( ) const
{
return m_TxtCodePage;
}
-
-//
-
-
DataFlavor SAL_CALL CFormatRegistrar::getRegisteredTextFlavor( ) const
{
return m_RegisteredTextFlavor;
}
-
-//
-
-
sal_Bool SAL_CALL CFormatRegistrar::isSynthesizeableFormat( const CFormatEtc& aFormatEtc ) const
{
return ( m_DataFormatTranslator.isOemOrAnsiTextFormat( aFormatEtc.getClipformat() ) ||
@@ -324,10 +250,6 @@ sal_Bool SAL_CALL CFormatRegistrar::isSynthesizeableFormat( const CFormatEtc& aF
m_DataFormatTranslator.isHTMLFormat( aFormatEtc.getClipformat() ) );
}
-
-//
-
-
inline
sal_Bool SAL_CALL CFormatRegistrar::needsToSynthesizeAccompanyFormats( const CFormatEtc& aFormatEtc ) const
{
@@ -336,10 +258,6 @@ sal_Bool SAL_CALL CFormatRegistrar::needsToSynthesizeAccompanyFormats( const CFo
m_DataFormatTranslator.isTextHtmlFormat( aFormatEtc.getClipformat( ) ) );
}
-
-//
-
-
OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor& aFlavor )
{
OUString charset;
@@ -367,10 +285,6 @@ OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor&
return charset;
}
-
-//
-
-
sal_Bool SAL_CALL CFormatRegistrar::hasUnicodeFlavor( const Reference< XTransferable >& aXTransferable ) const
{
CFormatEtc fetc( CF_UNICODETEXT );
@@ -381,20 +295,12 @@ sal_Bool SAL_CALL CFormatRegistrar::hasUnicodeFlavor( const Reference< XTransfer
return aXTransferable->isDataFlavorSupported( aFlavor );
}
-
-//
-
-
inline
sal_Bool CFormatRegistrar::isEqualCurrentSystemCodePage( sal_uInt32 aCodePage ) const
{
return ( (aCodePage == GetOEMCP()) || (aCodePage == GetACP()) );
}
-
-//
-
-
sal_Bool SAL_CALL CFormatRegistrar::findLocaleForTextCodePage( )
{
m_TxtLocale = 0;
@@ -402,10 +308,6 @@ sal_Bool SAL_CALL CFormatRegistrar::findLocaleForTextCodePage( )
return ( IsValidLocale( m_TxtLocale, LCID_INSTALLED ) ) ? sal_True : sal_False;
}
-
-//
-
-
sal_Bool SAL_CALL CFormatRegistrar::isLocaleCodePage( LCID lcid, LCTYPE lctype, sal_uInt32 codepage )
{
char buff[6];
@@ -420,30 +322,18 @@ sal_Bool SAL_CALL CFormatRegistrar::isLocaleCodePage( LCID lcid, LCTYPE lctype,
return ( localeCodePage == codepage );
}
-
-//
-
-
inline
sal_Bool SAL_CALL CFormatRegistrar::isLocaleOemCodePage( LCID lcid, sal_uInt32 codepage )
{
return isLocaleCodePage( lcid, LOCALE_IDEFAULTCODEPAGE, codepage );
}
-
-//
-
-
inline
sal_Bool SAL_CALL CFormatRegistrar::isLocaleAnsiCodePage( LCID lcid, sal_uInt32 codepage )
{
return isLocaleCodePage( lcid, LOCALE_IDEFAULTANSICODEPAGE, codepage );
}
-
-//
-
-
BOOL CALLBACK CFormatRegistrar::EnumLocalesProc( LPSTR lpLocaleStr )
{
// the lpLocaleStr parametere is hexadecimal
diff --git a/dtrans/source/win32/dtobj/FetcList.hxx b/dtrans/source/win32/dtobj/FetcList.hxx
index 2352578cdea1..cab9b02782e8 100644
--- a/dtrans/source/win32/dtobj/FetcList.hxx
+++ b/dtrans/source/win32/dtobj/FetcList.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _FETCLIST_HXX_
#define _FETCLIST_HXX_
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index 27842aeac7b8..46fa0ba9a83c 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -56,10 +56,8 @@ struct METAFILEHEADER
};
#pragma pack()
-
// convert a windows metafile picture to a openoffice metafile picture
-
Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFilePict )
{
OSL_ASSERT( aMetaFilePict.getLength( ) == sizeof( METAFILEPICT ) );
@@ -128,10 +126,8 @@ Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFi
return mfpictStream;
}
-
// convert a windows enhanced metafile to a openoffice metafile
-
Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile )
{
Sequence< sal_Int8 > aRet;
@@ -149,10 +145,8 @@ Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile
return aRet;
}
-
// convert a openoffice metafile picture to a windows metafile picture
-
HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 >& aOOMetaFilePict )
{
HMETAFILEPICT hPict = NULL;
@@ -173,10 +167,8 @@ HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 >& aOOMetaFilePic
return hPict;
}
-
// convert a openoffice metafile picture to a windows enhanced metafile picture
-
HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( Sequence< sal_Int8 >& aOOMetaFilePict )
{
HENHMETAFILE hEnhMtf = SetEnhMetaFileBits( aOOMetaFilePict.getLength(), (unsigned char*) aOOMetaFilePict.getConstArray() );
@@ -184,10 +176,8 @@ HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( Sequence< sal_Int8 >& aOOMetaFileP
return hEnhMtf;
}
-
// convert a windows device independent bitmap into a openoffice bitmap
-
Sequence< sal_Int8 > SAL_CALL WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB )
{
OSL_ENSURE(aWinDIB.getLength() > sizeof(BITMAPINFOHEADER), "CF_DIBV5/CF_DIB too small (!)");
@@ -219,10 +209,8 @@ Sequence< sal_Int8 > SAL_CALL WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB
return ooBmpStream;
}
-
// convert a openoffice bitmap into a windows device independent bitmap
-
Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp )
{
Sequence< sal_Int8 > winDIBStream( aOOBmp.getLength( ) - sizeof( BITMAPFILEHEADER ) );
@@ -234,7 +222,6 @@ Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp )
return winDIBStream;
}
-
// converts the openoffice text/html clipboard format to the HTML Format
// well known under MS Windows
// the MS HTML Format has a header before the real html data
@@ -525,10 +512,8 @@ ByteSequence_t CF_HDROPToFileList(HGLOBAL hGlobal)
return FileListToByteSequence(files);
}
-
// convert a windows bitmap handle into a openoffice bitmap
-
Sequence< sal_Int8 > SAL_CALL WinBITMAPToOOBMP( HBITMAP aHBMP )
{
Sequence< sal_Int8 > ooBmpStream;
diff --git a/dtrans/source/win32/dtobj/FmtFilter.hxx b/dtrans/source/win32/dtobj/FmtFilter.hxx
index b9f06b599af7..8020662adb3b 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.hxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _FMTFILTER_HXX_
#define _FMTFILTER_HXX_
diff --git a/dtrans/source/win32/dtobj/MimeAttrib.hxx b/dtrans/source/win32/dtobj/MimeAttrib.hxx
index 7eba4d058372..278f2aa36323 100644
--- a/dtrans/source/win32/dtobj/MimeAttrib.hxx
+++ b/dtrans/source/win32/dtobj/MimeAttrib.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _MIMEATTRIB_HXX_
#define _MIMEATTRIB_HXX_
@@ -30,7 +29,6 @@ const OUString PRE_OEM_CODEPAGE ("cp");
const OUString CHARSET_UTF16 ("utf-16");
const OUString CHARSET_UNICODE ("unicode");
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx
index 2a0dfe78f604..f3560204fad5 100644
--- a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx
+++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx
@@ -25,10 +25,8 @@
using namespace ::com::sun::star::datatransfer;
using namespace ::com::sun::star::uno;
-
// assuming a '\0' terminated string if no length specified
-
int CalcBuffSizeForTextConversion( UINT code_page, LPCSTR lpMultiByteString, int nLen = -1 )
{
return ( MultiByteToWideChar( code_page,
@@ -39,10 +37,8 @@ int CalcBuffSizeForTextConversion( UINT code_page, LPCSTR lpMultiByteString, int
0 ) * sizeof( sal_Unicode ) );
}
-
// assuming a '\0' terminated string if no length specified
-
int CalcBuffSizeForTextConversion( UINT code_page, LPCWSTR lpWideCharString, int nLen = -1 )
{
return WideCharToMultiByte( code_page,
@@ -55,12 +51,10 @@ int CalcBuffSizeForTextConversion( UINT code_page, LPCWSTR lpWideCharString, int
NULL );
}
-
// converts text in one code page into unicode text
// automatically calculates the necessary buffer size and allocates
// the buffer
-
int MultiByteToWideCharEx( UINT cp_src,
LPCSTR lpMultiByteString,
sal_uInt32 lenStr,
@@ -91,12 +85,10 @@ int MultiByteToWideCharEx( UINT cp_src,
ptrHGlob.MemSize( ) );
}
-
// converts unicode text into text of the specified code page
// automatically calculates the necessary buffer size and allocates
// the buffer
-
int WideCharToMultiByteEx( UINT cp_dest,
LPCWSTR lpWideCharString,
sal_uInt32 lenStr,
diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
index 6ecd88e99b61..8f3b2a02ace0 100644
--- a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
+++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _TXTCNVTHLP_HXX_
#define _TXTCNVTHLP_HXX_
diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx b/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
index 0fa4a9cab98c..49546050dcfb 100644
--- a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
@@ -35,7 +35,6 @@ using namespace com::sun::star::datatransfer::clipboard;
using com::sun::star::uno::RuntimeException;
using com::sun::star::uno::Reference;
-
CXNotifyingDataObject::CXNotifyingDataObject(
const IDataObjectPtr& aIDataObject,
const Reference< XTransferable >& aXTransferable,
diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx b/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx
index c0e172ddc994..43d94f1f6b4d 100644
--- a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _XNOTIFYINGDATAOBJECT_HXX_
#define _XNOTIFYINGDATAOBJECT_HXX_
@@ -54,9 +53,7 @@ public:
virtual ~CXNotifyingDataObject() {}
- //-----------------------------------------------------------------
// ole interface implementation
- //-----------------------------------------------------------------
//IUnknown interface methods
STDMETHODIMP QueryInterface(REFIID iid, LPVOID* ppvObject);
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 754beadaa505..a2374686a5c9 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -45,20 +45,15 @@
#define __uuidof(I) IID_##I
#endif
-
// namespace directives
-
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::clipboard;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-
-
// a helper class that will be thrown by the function validateFormatEtc
-
class CInvalidFormatEtcException
{
public:
@@ -66,10 +61,8 @@ public:
CInvalidFormatEtcException( HRESULT hr ) : m_hr( hr ) {};
};
-
// ctor
-
CXTDataObject::CXTDataObject( const Reference< XComponentContext >& rxContext,
const Reference< XTransferable >& aXTransferable )
: m_nRefCnt( 0 )
@@ -80,10 +73,8 @@ CXTDataObject::CXTDataObject( const Reference< XComponentContext >& rxContext,
{
}
-
// IUnknown->QueryInterface
-
STDMETHODIMP CXTDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
{
if ( NULL == ppvObject )
@@ -103,19 +94,15 @@ STDMETHODIMP CXTDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
return hr;
}
-
// IUnknown->AddRef
-
STDMETHODIMP_(ULONG) CXTDataObject::AddRef( )
{
return static_cast< ULONG >( InterlockedIncrement( &m_nRefCnt ) );
}
-
// IUnknown->Release
-
STDMETHODIMP_(ULONG) CXTDataObject::Release( )
{
ULONG nRefCnt =
@@ -127,10 +114,6 @@ STDMETHODIMP_(ULONG) CXTDataObject::Release( )
return nRefCnt;
}
-
-//
-
-
STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium )
{
if ( !(pFormatetc && pmedium) )
@@ -175,10 +158,6 @@ STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium
return S_OK;
}
-
-//
-
-
// inline
void SAL_CALL CXTDataObject::renderDataAndSetupStgMedium(
const sal_Int8* lpStorage, const FORMATETC& fetc, sal_uInt32 nInitStgSize,
@@ -204,10 +183,6 @@ void SAL_CALL CXTDataObject::renderDataAndSetupStgMedium(
setupStgMedium( fetc, stgTransfHelper, stgmedium );
}
-
-//
-
-
//inline
void SAL_CALL CXTDataObject::renderLocaleAndSetupStgMedium(
FORMATETC& fetc, STGMEDIUM& stgmedium )
@@ -226,10 +201,6 @@ void SAL_CALL CXTDataObject::renderLocaleAndSetupStgMedium(
throw CInvalidFormatEtcException( DV_E_FORMATETC );
}
-
-//
-
-
//inline
void SAL_CALL CXTDataObject::renderUnicodeAndSetupStgMedium(
FORMATETC& fetc, STGMEDIUM& stgmedium )
@@ -263,10 +234,6 @@ void SAL_CALL CXTDataObject::renderUnicodeAndSetupStgMedium(
stgmedium );
}
-
-//
-
-
//inline
void SAL_CALL CXTDataObject::renderAnyDataAndSetupStgMedium(
FORMATETC& fetc, STGMEDIUM& stgmedium )
@@ -337,10 +304,6 @@ void SAL_CALL CXTDataObject::renderAnyDataAndSetupStgMedium(
stgmedium );
}
-
-//
-
-
HRESULT SAL_CALL CXTDataObject::renderSynthesizedFormatAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium )
{
HRESULT hr = S_OK;
@@ -377,10 +340,8 @@ HRESULT SAL_CALL CXTDataObject::renderSynthesizedFormatAndSetupStgMedium( FORMAT
return hr;
}
-
// the transferable must have only text, so we will synthesize unicode text
-
void SAL_CALL CXTDataObject::renderSynthesizedUnicodeAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium )
{
OSL_ASSERT( CF_UNICODETEXT == fetc.cfFormat );
@@ -410,10 +371,8 @@ void SAL_CALL CXTDataObject::renderSynthesizedUnicodeAndSetupStgMedium( FORMATET
setupStgMedium( fetc, stgTransfHelper, stgmedium );
}
-
// the transferable must have only unicode text so we will sythesize text
-
void SAL_CALL CXTDataObject::renderSynthesizedTextAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium )
{
OSL_ASSERT( m_DataFormatTranslator.isOemOrAnsiTextFormat( fetc.cfFormat ) );
@@ -446,10 +405,6 @@ void SAL_CALL CXTDataObject::renderSynthesizedTextAndSetupStgMedium( FORMATETC&
setupStgMedium( fetc, stgTransfHelper, stgmedium );
}
-
-//
-
-
void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium )
{
OSL_ASSERT( m_DataFormatTranslator.isHTMLFormat( fetc.cfFormat ) );
@@ -486,10 +441,8 @@ void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC&
stgmedium );
}
-
// IDataObject->EnumFormatEtc
-
STDMETHODIMP CXTDataObject::EnumFormatEtc(
DWORD dwDirection, IEnumFORMATETC** ppenumFormatetc )
{
@@ -517,10 +470,8 @@ STDMETHODIMP CXTDataObject::EnumFormatEtc(
return hr;
}
-
// IDataObject->QueryGetData
-
STDMETHODIMP CXTDataObject::QueryGetData( LPFORMATETC pFormatetc )
{
if ( (NULL == pFormatetc) || IsBadReadPtr( pFormatetc, sizeof( FORMATETC ) ) )
@@ -531,73 +482,55 @@ STDMETHODIMP CXTDataObject::QueryGetData( LPFORMATETC pFormatetc )
return m_FormatEtcContainer.hasFormatEtc( *pFormatetc ) ? S_OK : S_FALSE;
}
-
// IDataObject->GetDataHere
-
STDMETHODIMP CXTDataObject::GetDataHere( LPFORMATETC, LPSTGMEDIUM )
{
return E_NOTIMPL;
}
-
// IDataObject->GetCanonicalFormatEtc
-
STDMETHODIMP CXTDataObject::GetCanonicalFormatEtc( LPFORMATETC, LPFORMATETC )
{
return E_NOTIMPL;
}
-
// IDataObject->SetData
-
STDMETHODIMP CXTDataObject::SetData( LPFORMATETC, LPSTGMEDIUM, BOOL )
{
return E_NOTIMPL;
}
-
// IDataObject->DAdvise
-
STDMETHODIMP CXTDataObject::DAdvise( LPFORMATETC, DWORD, LPADVISESINK, DWORD * )
{
return E_NOTIMPL;
}
-
// IDataObject->DUnadvise
-
STDMETHODIMP CXTDataObject::DUnadvise( DWORD )
{
return E_NOTIMPL;
}
-
// IDataObject->EnumDAdvise
-
STDMETHODIMP CXTDataObject::EnumDAdvise( LPENUMSTATDATA * )
{
return E_NOTIMPL;
}
-
// for our convenience
-
CXTDataObject::operator IDataObject*( )
{
return static_cast< IDataObject* >( this );
}
-
-//
-
-
inline
DataFlavor SAL_CALL CXTDataObject::formatEtcToDataFlavor( const FORMATETC& aFormatEtc ) const
{
@@ -615,10 +548,6 @@ DataFlavor SAL_CALL CXTDataObject::formatEtcToDataFlavor( const FORMATETC& aForm
return aFlavor;
}
-
-//
-
-
inline
void CXTDataObject::validateFormatEtc( LPFORMATETC lpFormatEtc ) const
{
@@ -646,10 +575,6 @@ void CXTDataObject::validateFormatEtc( LPFORMATETC lpFormatEtc ) const
throw CInvalidFormatEtcException( DV_E_TYMED );
}
-
-//
-
-
//inline
void SAL_CALL CXTDataObject::setupStgMedium( const FORMATETC& fetc,
CStgTransferHelper& stgTransHlp,
@@ -681,20 +606,12 @@ void SAL_CALL CXTDataObject::setupStgMedium( const FORMATETC& fetc,
OSL_ASSERT( sal_False );
}
-
-//
-
-
inline
void SAL_CALL CXTDataObject::invalidateStgMedium( STGMEDIUM& stgmedium ) const
{
stgmedium.tymed = TYMED_NULL;
}
-
-//
-
-
inline
HRESULT SAL_CALL CXTDataObject::translateStgExceptionCode( HRESULT hr ) const
{
@@ -714,10 +631,6 @@ HRESULT SAL_CALL CXTDataObject::translateStgExceptionCode( HRESULT hr ) const
return hrTransl;
}
-
-//
-
-
inline void SAL_CALL CXTDataObject::InitializeFormatEtcContainer( )
{
if ( !m_bFormatEtcContainerInitialized )
@@ -727,14 +640,10 @@ inline void SAL_CALL CXTDataObject::InitializeFormatEtcContainer( )
}
}
-//============================================================================
// CEnumFormatEtc
-//============================================================================
-
// ctor
-
CEnumFormatEtc::CEnumFormatEtc( LPUNKNOWN lpUnkOuter, const CFormatEtcContainer& aFormatEtcContainer ) :
m_nRefCnt( 0 ),
m_lpUnkOuter( lpUnkOuter ),
@@ -743,10 +652,8 @@ CEnumFormatEtc::CEnumFormatEtc( LPUNKNOWN lpUnkOuter, const CFormatEtcContainer&
Reset( );
}
-
// IUnknown->QueryInterface
-
STDMETHODIMP CEnumFormatEtc::QueryInterface( REFIID iid, LPVOID* ppvObject )
{
if ( NULL == ppvObject )
@@ -767,10 +674,8 @@ STDMETHODIMP CEnumFormatEtc::QueryInterface( REFIID iid, LPVOID* ppvObject )
return hr;
}
-
// IUnknown->AddRef
-
STDMETHODIMP_(ULONG) CEnumFormatEtc::AddRef( )
{
// keep the dataobject alive
@@ -778,10 +683,8 @@ STDMETHODIMP_(ULONG) CEnumFormatEtc::AddRef( )
return InterlockedIncrement( &m_nRefCnt );
}
-
// IUnknown->Release
-
STDMETHODIMP_(ULONG) CEnumFormatEtc::Release( )
{
// release the outer dataobject
@@ -794,10 +697,8 @@ STDMETHODIMP_(ULONG) CEnumFormatEtc::Release( )
return nRefCnt;
}
-
// IEnumFORMATETC->Next
-
STDMETHODIMP CEnumFormatEtc::Next( ULONG nRequested, LPFORMATETC lpDest, ULONG* lpFetched )
{
if ( ( nRequested < 1 ) ||
@@ -813,29 +714,23 @@ STDMETHODIMP CEnumFormatEtc::Next( ULONG nRequested, LPFORMATETC lpDest, ULONG*
return (nFetched == nRequested) ? S_OK : S_FALSE;
}
-
// IEnumFORMATETC->Skip
-
STDMETHODIMP CEnumFormatEtc::Skip( ULONG celt )
{
return m_FormatEtcContainer.skipFormatEtc( celt ) ? S_OK : S_FALSE;
}
-
// IEnumFORMATETC->Reset
-
STDMETHODIMP CEnumFormatEtc::Reset( )
{
m_FormatEtcContainer.beginEnumFormatEtc( );
return S_OK;
}
-
// IEnumFORMATETC->Clone
-
STDMETHODIMP CEnumFormatEtc::Clone( IEnumFORMATETC** ppenum )
{
if ( NULL == ppenum )
diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx
index a8d0c944ca8f..6e1b1c21f25d 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _XTDATAOBJECT_HXX_
#define _XTDATAOBJECT_HXX_
@@ -67,9 +66,7 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& aXTransferable );
virtual ~CXTDataObject() {}
- //-----------------------------------------------------------------
// ole interface implementation
- //-----------------------------------------------------------------
//IUnknown interface methods
STDMETHODIMP QueryInterface(REFIID iid, LPVOID* ppvObject);
@@ -127,10 +124,6 @@ private:
CFormatRegistrar m_FormatRegistrar;
};
-//------------------------------------------------------------------------
-//
-//------------------------------------------------------------------------
-
class CEnumFormatEtc : public IEnumFORMATETC
{
public:
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index 13efa57f694e..4348a7058085 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -48,10 +48,8 @@ const OUString Windows_FormatName ("windows_formatname");
const com::sun::star::uno::Type CppuType_ByteSequence = ::getCppuType((const com::sun::star::uno::Sequence<sal_Int8>*)0);
const com::sun::star::uno::Type CppuType_String = ::getCppuType((const OUString*)0);
-
// namespace directives
-
using namespace osl;
using namespace cppu;
using namespace std;
@@ -60,10 +58,8 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::container;
-
// helper functions
-
namespace MODULE_PRIVATE
{
Sequence< OUString > SAL_CALL DataFormatTranslator_getSupportedServiceNames( )
@@ -74,18 +70,10 @@ namespace MODULE_PRIVATE
}
}
-
-//
-
-
FormatEntry::FormatEntry()
{
}
-
-//
-
-
FormatEntry::FormatEntry(
const char* mime_content_type,
const char* human_presentable_name,
@@ -105,20 +93,14 @@ FormatEntry::FormatEntry(
aStandardFormatId = std_clipboard_format_id;
}
-
// ctor
-
CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext ) :
m_xContext( rxContext )
{
initTranslationTable( );
}
-
-//
-
-
Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataFlavor& aDataFlavor )
throw( RuntimeException )
{
@@ -174,10 +156,6 @@ Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataF
return aAny;
}
-
-//
-
-
DataFlavor SAL_CALL CDataFormatTranslator::getDataFlavorFromSystemDataType( const Any& aSysDataType )
throw( RuntimeException )
{
@@ -205,10 +183,8 @@ DataFlavor SAL_CALL CDataFormatTranslator::getDataFlavorFromSystemDataType( cons
return aFlavor;
}
-
// XServiceInfo
-
OUString SAL_CALL CDataFormatTranslator::getImplementationName( )
throw( RuntimeException )
{
@@ -222,17 +198,14 @@ sal_Bool SAL_CALL CDataFormatTranslator::supportsService( const OUString& Servic
return cppu::supportsService(this, ServiceName);
}
-
// XServiceInfo
-
Sequence< OUString > SAL_CALL CDataFormatTranslator::getSupportedServiceNames( )
throw( RuntimeException )
{
return DataFormatTranslator_getSupportedServiceNames( );
}
-
// to optimize searching we add all entries with a
// standard clipboard format number first, in the
// table before the entries with CF_INVALID
@@ -240,7 +213,6 @@ Sequence< OUString > SAL_CALL CDataFormatTranslator::getSupportedServiceNames( )
// format number we can stop if we find the first
// CF_INVALID
-
void SAL_CALL CDataFormatTranslator::initTranslationTable()
{
//SOT_FORMATSTR_ID_DIF
@@ -492,10 +464,6 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
m_TranslTable.push_back(FormatEntry("application/x-openoffice-dummy4;windows_formatname=\"SO_DUMMYFORMAT_4\"", "SO_DUMMYFORMAT_4", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
}
-
-//
-
-
void SAL_CALL CDataFormatTranslator::findDataFlavorForStandardFormatId( sal_Int32 aStandardFormatId, DataFlavor& aDataFlavor ) const
{
/*
@@ -518,10 +486,6 @@ void SAL_CALL CDataFormatTranslator::findDataFlavorForStandardFormatId( sal_Int3
}
}
-
-//
-
-
void SAL_CALL CDataFormatTranslator::findDataFlavorForNativeFormatName( const OUString& aNativeFormatName, DataFlavor& aDataFlavor ) const
{
vector< FormatEntry >::const_iterator citer_end = m_TranslTable.end( );
@@ -537,10 +501,6 @@ void SAL_CALL CDataFormatTranslator::findDataFlavorForNativeFormatName( const OU
}
}
-
-//
-
-
void SAL_CALL CDataFormatTranslator::findStandardFormatIdForCharset( const OUString& aCharset, Any& aAny ) const
{
if ( aCharset.equalsIgnoreAsciiCase( "utf-16" ) )
@@ -553,10 +513,6 @@ void SAL_CALL CDataFormatTranslator::findStandardFormatIdForCharset( const OUStr
}
}
-
-//
-
-
void SAL_CALL CDataFormatTranslator::setStandardFormatIdForNativeFormatName( const OUString& aNativeFormatName, Any& aAny ) const
{
vector< FormatEntry >::const_iterator citer_end = m_TranslTable.end( );
@@ -571,10 +527,6 @@ void SAL_CALL CDataFormatTranslator::setStandardFormatIdForNativeFormatName( con
}
}
-
-//
-
-
void SAL_CALL CDataFormatTranslator::findStdFormatIdOrNativeFormatNameForFullMediaType(
const Reference< XMimeContentTypeFactory >& aRefXMimeFactory,
const OUString& aFullMediaType,
@@ -601,19 +553,11 @@ void SAL_CALL CDataFormatTranslator::findStdFormatIdOrNativeFormatNameForFullMed
}
}
-
-//
-
-
inline sal_Bool CDataFormatTranslator::isTextPlainMediaType( const OUString& fullMediaType ) const
{
return fullMediaType.equalsIgnoreAsciiCase("text/plain");
}
-
-//
-
-
DataFlavor SAL_CALL CDataFormatTranslator::mkDataFlv(const OUString& cnttype, const OUString& hpname, Type dtype)
{
DataFlavor dflv;
diff --git a/dtrans/source/win32/ftransl/ftransl.hxx b/dtrans/source/win32/ftransl/ftransl.hxx
index 8340050dafff..b7913097720e 100644
--- a/dtrans/source/win32/ftransl/ftransl.hxx
+++ b/dtrans/source/win32/ftransl/ftransl.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _FTRANSL_HXX_
#define _FTRANSL_HXX_
@@ -57,9 +56,7 @@ struct FormatEntry
sal_Int32 aStandardFormatId;
};
-//------------------------------------------------
// CDataFormatTranslator
-//------------------------------------------------
class CDataFormatTranslator : public
cppu::WeakImplHelper2< com::sun::star::datatransfer::XDataFormatTranslator, \
@@ -69,9 +66,7 @@ class CDataFormatTranslator : public
public:
CDataFormatTranslator( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
- //------------------------------------------------
// XDataFormatTranslator
- //------------------------------------------------
virtual ::com::sun::star::uno::Any SAL_CALL getSystemDataTypeFromDataFlavor( const ::com::sun::star::datatransfer::DataFlavor& aDataFlavor )
throw(::com::sun::star::uno::RuntimeException);
@@ -79,9 +74,7 @@ public:
virtual ::com::sun::star::datatransfer::DataFlavor SAL_CALL getDataFlavorFromSystemDataType( const ::com::sun::star::uno::Any& aSysDataType )
throw(::com::sun::star::uno::RuntimeException);
- //------------------------------------------------
// XServiceInfo
- //------------------------------------------------
virtual OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
@@ -112,7 +105,6 @@ private:
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/ftransl/ftranslentry.cxx b/dtrans/source/win32/ftransl/ftranslentry.cxx
index b0bc48cc722e..0e6d324f01cb 100644
--- a/dtrans/source/win32/ftransl/ftranslentry.cxx
+++ b/dtrans/source/win32/ftransl/ftranslentry.cxx
@@ -25,20 +25,16 @@
#include <com/sun/star/datatransfer/XDataFormatTranslator.hpp>
#include "ftransl.hxx"
-
// some defines
-
// the service names
#define SERVICE_NAME "com.sun.star.datatransfer.DataFormatTranslator"
// the implementation names
#define IMPL_NAME "com.sun.star.datatransfer.DataFormatTranslator"
-
// namespace directives
-
using namespace ::rtl ;
using namespace ::cppu ;
using namespace ::com::sun::star::uno ;
@@ -46,19 +42,15 @@ using namespace ::com::sun::star::registry ;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::datatransfer;
-
// create a static object to initialize the shell9x library
-
namespace
{
-
// functions to create a new Clipboad instance; is needed by factory helper implementation
// @param rServiceManager - service manager, useful if the component needs other uno services
// so we should give it to every UNO-Implementation component
-
Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
{
return Reference< XInterface >( static_cast< XDataFormatTranslator* >( new CDataFormatTranslator( comphelper::getComponentContext(rServiceManager) ) ) );
@@ -71,7 +63,6 @@ extern "C"
// component_getFactory
// returns a factory to create XFilePicker-Services
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL ftransl_component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ )
{
void* pRet = 0;
diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx
index 3b6c75ce010a..e3a5369808c7 100644
--- a/dtrans/source/win32/misc/ImplHelper.cxx
+++ b/dtrans/source/win32/misc/ImplHelper.cxx
@@ -41,16 +41,11 @@
#define FORMATETC_PARTIAL_MATCH -1
#define FORMATETC_NO_MATCH 0
-
// namespace directives
-
-
-
// returns a windows codepage appropriate to the
// given mime charset parameter value
-
sal_uInt32 SAL_CALL getWinCPFromMimeCharset( const OUString& charset )
{
sal_uInt32 winCP = GetACP( );
@@ -79,11 +74,9 @@ sal_uInt32 SAL_CALL getWinCPFromMimeCharset( const OUString& charset )
return winCP;
}
-
// returns a windows codepage appropriate to the
// given locale and locale type
-
OUString SAL_CALL getWinCPFromLocaleId( LCID lcid, LCTYPE lctype )
{
OSL_ASSERT( IsValidLocale( lcid, LCID_SUPPORTED ) );
@@ -129,33 +122,27 @@ OUString SAL_CALL getWinCPFromLocaleId( LCID lcid, LCTYPE lctype )
return winCP;
}
-
// returns a mime charset parameter value appropriate
// to the given codepage, optional a prefix can be
// given, e.g. "windows-" or "cp"
-
OUString SAL_CALL getMimeCharsetFromWinCP( sal_uInt32 cp, const OUString& aPrefix )
{
return aPrefix + cptostr( cp );
}
-
// returns a mime charset parameter value appropriate
// to the given locale id and locale type, optional a
// prefix can be given, e.g. "windows-" or "cp"
-
OUString SAL_CALL getMimeCharsetFromLocaleId( LCID lcid, LCTYPE lctype, const OUString& aPrefix )
{
OUString charset = getWinCPFromLocaleId( lcid, lctype );
return aPrefix + charset;
}
-
// IsOEMCP
-
sal_Bool SAL_CALL IsOEMCP( sal_uInt32 codepage )
{
OSL_ASSERT( IsValidCodePage( codepage ) );
@@ -172,10 +159,8 @@ sal_Bool SAL_CALL IsOEMCP( sal_uInt32 codepage )
return sal_False;
}
-
// converts a codepage into its string representation
-
OUString SAL_CALL cptostr( sal_uInt32 codepage )
{
OSL_ASSERT( IsValidCodePage( codepage ) );
@@ -183,7 +168,6 @@ OUString SAL_CALL cptostr( sal_uInt32 codepage )
return OUString::number( static_cast<sal_Int64>( codepage ) );
}
-
// OleStdDeleteTargetDevice()
//
// Purpose:
@@ -192,8 +176,6 @@ OUString SAL_CALL cptostr( sal_uInt32 codepage )
//
// Return Value:
// SCODE - S_OK if successful
-
-
void SAL_CALL DeleteTargetDevice( DVTARGETDEVICE* ptd )
{
#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
@@ -221,9 +203,6 @@ void SAL_CALL DeleteTargetDevice( DVTARGETDEVICE* ptd )
#endif
}
-
-
-
// OleStdCopyTargetDevice()
//
// Purpose:
@@ -239,8 +218,6 @@ void SAL_CALL DeleteTargetDevice( DVTARGETDEVICE* ptd )
// pointer to allocated copy of ptdSrc
// if ptdSrc==NULL then retuns NULL is returned.
// if ptdSrc!=NULL and memory allocation fails, then NULL is returned
-
-
DVTARGETDEVICE* SAL_CALL CopyTargetDevice( DVTARGETDEVICE* ptdSrc )
{
DVTARGETDEVICE* ptdDest = NULL;
@@ -272,8 +249,6 @@ DVTARGETDEVICE* SAL_CALL CopyTargetDevice( DVTARGETDEVICE* ptdSrc )
return ptdDest;
}
-
-
// OleStdCopyFormatEtc()
//
// Purpose:
@@ -297,8 +272,6 @@ DVTARGETDEVICE* SAL_CALL CopyTargetDevice( DVTARGETDEVICE* ptdSrc )
// returns TRUE if copy was successful;
// retuns FALSE if not successful, e.g. one or both of the pointers
// were invalid or the pointers were equal
-
-
sal_Bool SAL_CALL CopyFormatEtc( LPFORMATETC petcDest, LPFORMATETC petcSrc )
{
sal_Bool bRet = sal_False;
@@ -344,14 +317,12 @@ sal_Bool SAL_CALL CopyFormatEtc( LPFORMATETC petcDest, LPFORMATETC petcSrc )
return bRet;
}
-
// returns:
// 1 for exact match,
// 0 for no match,
// -1 for partial match (which is defined to mean the left is a subset
// of the right: fewer aspects, null target device, fewer medium).
-
sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLhs, const FORMATETC* pFetcRhs )
{
sal_Int32 nMatch = FORMATETC_EXACT_MATCH;
@@ -419,11 +390,6 @@ sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLhs, const FORMATETC*
return nMatch;
}
-
-
-//
-
-
sal_Bool SAL_CALL CompareTargetDevice( DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* ptdRight )
{
sal_Bool bRet = sal_False;
diff --git a/dtrans/source/win32/misc/ImplHelper.hxx b/dtrans/source/win32/misc/ImplHelper.hxx
index 10fb2593cc54..de50bd8f94ff 100644
--- a/dtrans/source/win32/misc/ImplHelper.hxx
+++ b/dtrans/source/win32/misc/ImplHelper.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _IMPLHELPER_HXX_
#define _IMPLHELPER_HXX_
@@ -41,49 +40,37 @@ DVTARGETDEVICE* SAL_CALL CopyTargetDevice(DVTARGETDEVICE* ptdSrc);
// some codepage helper functions
-//--------------------------------------------------
// returns a windows codepage appropriate to the
// given mime charset parameter value
-//--------------------------------------------------
sal_uInt32 SAL_CALL getWinCPFromMimeCharset(
const OUString& charset );
-//--------------------------------------------------
// returns a windows codepage appropriate to the
// given locale and locale type
-//--------------------------------------------------
OUString SAL_CALL getWinCPFromLocaleId(
LCID lcid, LCTYPE lctype );
-//--------------------------------------------------
// returns a mime charset parameter value appropriate
// to the given codepage, optional a prefix can be
// given, e.g. "windows-" or "cp"
-//--------------------------------------------------
OUString SAL_CALL getMimeCharsetFromWinCP(
sal_uInt32 cp, const OUString& aPrefix );
-//--------------------------------------------------
// returns a mime charset parameter value appropriate
// to the given locale id and locale type, optional a
// prefix can be given, e.g. "windows-" or "cp"
-//--------------------------------------------------
OUString SAL_CALL getMimeCharsetFromLocaleId(
LCID lcid, LCTYPE lctype, const OUString& aPrefix );
-//-----------------------------------------------------
// returns true, if a given codepage is an oem codepage
-//-----------------------------------------------------
sal_Bool SAL_CALL IsOEMCP( sal_uInt32 codepage );
-//--------------------------------------------------
// converts a codepage into a string representation
-//--------------------------------------------------
OUString SAL_CALL cptostr( sal_uInt32 codepage );
diff --git a/dtrans/source/win32/misc/WinClip.hxx b/dtrans/source/win32/misc/WinClip.hxx
index d447922c928a..5689a7bf294d 100644
--- a/dtrans/source/win32/misc/WinClip.hxx
+++ b/dtrans/source/win32/misc/WinClip.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _WINCLIP_HXX_
#define _WINCLIP_HXX_
diff --git a/dtrans/source/win32/workbench/XTDo.cxx b/dtrans/source/win32/workbench/XTDo.cxx
index b4d2b10dbf09..83b446464666 100644
--- a/dtrans/source/win32/workbench/XTDo.cxx
+++ b/dtrans/source/win32/workbench/XTDo.cxx
@@ -34,16 +34,11 @@
#include <memory>
#include <tchar.h>
-
// namespace directives
-
using namespace ::std;
-//============================================================================
// OTWrapperDataObject
-//============================================================================
-
// ctor
@@ -64,10 +59,8 @@ CXTDataObject::CXTDataObject( ) :
}
-
// IUnknown->QueryInterface
-
STDMETHODIMP CXTDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
{
OSL_ASSERT( NULL != ppvObject );
@@ -89,19 +82,15 @@ STDMETHODIMP CXTDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
return hr;
}
-
// IUnknown->AddRef
-
STDMETHODIMP_(ULONG) CXTDataObject::AddRef( )
{
return static_cast< ULONG >( InterlockedIncrement( &m_nRefCnt ) );
}
-
// IUnknown->Release
-
STDMETHODIMP_(ULONG) CXTDataObject::Release( )
{
// we need a helper variable because it's
@@ -156,10 +145,8 @@ STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium
return hr;
}
-
// IDataObject->EnumFormatEtc
-
STDMETHODIMP CXTDataObject::EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC** ppenumFormatetc )
{
if ( ( NULL == ppenumFormatetc ) || ( DATADIR_SET == dwDirection ) )
@@ -179,87 +166,66 @@ STDMETHODIMP CXTDataObject::EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC** p
return hr;
}
-
// IDataObject->QueryGetData
-
STDMETHODIMP CXTDataObject::QueryGetData( LPFORMATETC pFormatetc )
{
return E_NOTIMPL;
}
-
// IDataObject->GetDataHere
-
STDMETHODIMP CXTDataObject::GetDataHere( LPFORMATETC, LPSTGMEDIUM )
{
return E_NOTIMPL;
}
-
// IDataObject->GetCanonicalFormatEtc
-
STDMETHODIMP CXTDataObject::GetCanonicalFormatEtc( LPFORMATETC, LPFORMATETC )
{
return E_NOTIMPL;
}
-
// IDataObject->SetData
-
STDMETHODIMP CXTDataObject::SetData( LPFORMATETC, LPSTGMEDIUM, BOOL )
{
return E_NOTIMPL;
}
-
// IDataObject->DAdvise
-
STDMETHODIMP CXTDataObject::DAdvise( LPFORMATETC, DWORD, LPADVISESINK, DWORD * )
{
return E_NOTIMPL;
}
-
// IDataObject->DUnadvise
-
STDMETHODIMP CXTDataObject::DUnadvise( DWORD )
{
return E_NOTIMPL;
}
-
// IDataObject->EnumDAdvise
-
STDMETHODIMP CXTDataObject::EnumDAdvise( LPENUMSTATDATA * )
{
return E_NOTIMPL;
}
-
// for our convenience
-
CXTDataObject::operator IDataObject*( )
{
return static_cast< IDataObject* >( this );
}
-
-//============================================================================
// CEnumFormatEtc
-//============================================================================
-
// ctor
-
CEnumFormatEtc::CEnumFormatEtc( LPUNKNOWN pUnkDataObj ) :
m_nRefCnt( 0 ),
m_pUnkDataObj( pUnkDataObj ),
@@ -267,10 +233,8 @@ CEnumFormatEtc::CEnumFormatEtc( LPUNKNOWN pUnkDataObj ) :
{
}
-
// IUnknown->QueryInterface
-
STDMETHODIMP CEnumFormatEtc::QueryInterface( REFIID iid, LPVOID* ppvObject )
{
if ( NULL == ppvObject )
@@ -290,10 +254,8 @@ STDMETHODIMP CEnumFormatEtc::QueryInterface( REFIID iid, LPVOID* ppvObject )
return hr;
}
-
// IUnknown->AddRef
-
STDMETHODIMP_(ULONG) CEnumFormatEtc::AddRef( )
{
// keep the dataobject alive
@@ -301,10 +263,8 @@ STDMETHODIMP_(ULONG) CEnumFormatEtc::AddRef( )
return InterlockedIncrement( &m_nRefCnt );
}
-
// IUnknown->Release
-
STDMETHODIMP_(ULONG) CEnumFormatEtc::Release( )
{
// release the outer dataobject
@@ -320,10 +280,8 @@ STDMETHODIMP_(ULONG) CEnumFormatEtc::Release( )
return nRefCnt;
}
-
// IEnumFORMATETC->Next
-
STDMETHODIMP CEnumFormatEtc::Next( ULONG celt, LPFORMATETC rgelt, ULONG* pceltFetched )
{
if ( ( 0 != celt ) && ( NULL == rgelt ) )
@@ -358,10 +316,8 @@ STDMETHODIMP CEnumFormatEtc::Next( ULONG celt, LPFORMATETC rgelt, ULONG* pceltFe
return hr;
}
-
// IEnumFORMATETC->Skip
-
STDMETHODIMP CEnumFormatEtc::Skip( ULONG celt )
{
HRESULT hr = S_FALSE;
@@ -377,20 +333,16 @@ STDMETHODIMP CEnumFormatEtc::Skip( ULONG celt )
return hr;
}
-
// IEnumFORMATETC->Reset
-
STDMETHODIMP CEnumFormatEtc::Reset( )
{
m_nCurrPos = 0;
return S_OK;
}
-
// IEnumFORMATETC->Clone
-
STDMETHODIMP CEnumFormatEtc::Clone( IEnumFORMATETC** ppenum )
{
OSL_ASSERT( NULL != ppenum );
diff --git a/dtrans/source/win32/workbench/XTDo.hxx b/dtrans/source/win32/workbench/XTDo.hxx
index 2a9116a2ffd2..6d4891419269 100644
--- a/dtrans/source/win32/workbench/XTDo.hxx
+++ b/dtrans/source/win32/workbench/XTDo.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _XTDATAOBJECT_HXX_
#define _XTDATAOBJECT_HXX_
@@ -61,9 +60,7 @@ class CXTDataObject : public IDataObject
public:
CXTDataObject( );
- //-----------------------------------------------------------------
// ole interface implementation
- //-----------------------------------------------------------------
//IUnknown interface methods
STDMETHODIMP QueryInterface(REFIID iid, LPVOID* ppvObject);
@@ -89,10 +86,6 @@ private:
LONG m_nRefCnt;
};
-//------------------------------------------------------------------------
-//
-//------------------------------------------------------------------------
-
class CEnumFormatEtc : public IEnumFORMATETC
{
public:
diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx
index 175c58b0ac44..a065dc002b0b 100644
--- a/dtrans/source/win32/workbench/test_wincb.cxx
+++ b/dtrans/source/win32/workbench/test_wincb.cxx
@@ -46,10 +46,8 @@
#include <process.h>
-
// my defines
-
#define TEST_CLIPBOARD
#define RDB_SYSPATH "d:\\projects\\src623\\dtrans\\wntmsci7\\bin\\applicat.rdb"
#define WINCLIPBOARD_SERVICE_NAME L"com.sun.star.datatransfer.clipboard.SystemClipboard"
@@ -58,10 +56,8 @@
#define EVT_INIT_NONSIGNALED FALSE
#define EVT_NONAME ""
-
// namesapces
-
using namespace ::rtl;
using namespace ::std;
using namespace ::cppu;
@@ -71,26 +67,18 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
-
// globales
-
Reference< XTransferable > rXTransfRead;
HANDLE g_hEvtThreadWakeup;
-
-//
-
-
class CClipboardListener : public WeakImplHelper1 < XClipboardListener >
{
public:
~CClipboardListener( );
-
// XClipboardListener
-
virtual void SAL_CALL disposing( const EventObject& Source ) throw(RuntimeException);
virtual void SAL_CALL changedContents( const ClipboardEvent& event ) throw( RuntimeException );
};
@@ -109,19 +97,13 @@ void SAL_CALL CClipboardListener::changedContents( const ClipboardEvent& event )
//MessageBox( NULL, TEXT("Clipboard content changed"), TEXT("Info"), MB_OK | MB_ICONINFORMATION );
}
-
-//
-
-
class CTransferable : public WeakImplHelper2< XClipboardOwner, XTransferable >
{
public:
CTransferable( );
-
// XTransferable
-
virtual Any SAL_CALL getTransferData( const DataFlavor& aFlavor )
throw(UnsupportedFlavorException, IOException, RuntimeException);
@@ -129,10 +111,8 @@ public:
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);
@@ -141,10 +121,8 @@ private:
OUString m_Data;
};
-
// ctor
-
CTransferable::CTransferable( ) :
m_FlavorList( 1 ),
m_Data( OUString("I bought a new bike!") )
@@ -160,10 +138,8 @@ CTransferable::CTransferable( ) :
m_FlavorList[0] = df;
}
-
// getTransferData
-
Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
throw(UnsupportedFlavorException, IOException, RuntimeException)
{
@@ -192,20 +168,16 @@ Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
return anyData;
}
-
// getTransferDataFlavors
-
Sequence< DataFlavor > SAL_CALL CTransferable::getTransferDataFlavors( )
throw(RuntimeException)
{
return m_FlavorList;
}
-
// isDataFlavorSupported
-
sal_Bool SAL_CALL CTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
throw(RuntimeException)
{
@@ -218,10 +190,8 @@ sal_Bool SAL_CALL CTransferable::isDataFlavorSupported( const DataFlavor& aFlavo
return sal_False;
}
-
// lostOwnership
-
void SAL_CALL CTransferable::lostOwnership(
const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans )
throw(RuntimeException)
@@ -229,10 +199,8 @@ void SAL_CALL CTransferable::lostOwnership(
//MessageBox( NULL, TEXT("No longer clipboard owner"), TEXT("Info"), MB_OK | MB_ICONINFORMATION );
}
-
// main
-
int SAL_CALL main( int nArgc, char* Argv[] )
{
// create a multi-threaded apartment; we can test only
@@ -249,10 +217,8 @@ int SAL_CALL main( int nArgc, char* Argv[] )
BOOL bValid = IsValidLocale( lcid, LCID_SUPPORTED );
GetLocaleInfoA( lcid, LOCALE_IDEFAULTANSICODEPAGE, buff, sizeof( buff ) );
-
// get the global service-manager
-
OUString rdbName = OUString( RDB_SYSPATH );
Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) );
@@ -263,10 +229,8 @@ int SAL_CALL main( int nArgc, char* Argv[] )
return(-1);
}
-
// try to get an Interface to a XFilePicker Service
-
Reference< XTransferable > rXTransf( static_cast< XTransferable* >( new CTransferable ) );
Reference< XClipboard >
@@ -305,10 +269,8 @@ int SAL_CALL main( int nArgc, char* Argv[] )
rXClipListener.clear();
xClipNotifier.clear();
-
// shutdown the service manager
-
// Cast factory to XComponent
Reference< XComponent > xComponent( g_xFactory, UNO_QUERY );
diff --git a/dtrans/source/win32/workbench/testmarshal.cxx b/dtrans/source/win32/workbench/testmarshal.cxx
index 0789b0d41b76..e1047be86ee1 100644
--- a/dtrans/source/win32/workbench/testmarshal.cxx
+++ b/dtrans/source/win32/workbench/testmarshal.cxx
@@ -36,10 +36,8 @@
#include <process.h>
#include "XTDo.hxx"
-
// my defines
-
#define WRITE_CB
#define EVT_MANUAL_RESET TRUE
#define EVT_INIT_NONSIGNALED FALSE
@@ -47,17 +45,13 @@
#define WAIT_MSGLOOP
#define RAW_MARSHALING
-
// namesapces
-
using namespace ::rtl;
using namespace ::std;
-
// globales
-
HANDLE g_hEvtThreadWakeup;
#ifdef RAW_MARSHALING
@@ -66,7 +60,6 @@ HANDLE g_hEvtThreadWakeup;
IStream* g_pStm;
#endif
-//################################################################
// a thread in another apartment to test apartment transparency
unsigned int _stdcall ThreadProc(LPVOID pParam)
@@ -114,12 +107,8 @@ unsigned int _stdcall ThreadProc(LPVOID pParam)
return 0;
}
-//################################################################
-
-
// main
-
int SAL_CALL main( int nArgc, char* Argv[] )
{
HRESULT hr = OleInitialize( NULL );
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: */