summaryrefslogtreecommitdiff
path: root/dtrans/source/win32
diff options
context:
space:
mode:
Diffstat (limited to 'dtrans/source/win32')
-rw-r--r--dtrans/source/win32/clipb/APNDataObject.hxx10
-rw-r--r--dtrans/source/win32/clipb/WinClipbImpl.cxx58
-rw-r--r--dtrans/source/win32/clipb/WinClipbImpl.hxx40
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.cxx58
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.hxx70
-rw-r--r--dtrans/source/win32/clipb/sysdtrans.xml54
-rw-r--r--dtrans/source/win32/clipb/wcbentry.cxx38
-rw-r--r--dtrans/source/win32/dnd/dnd.xml70
-rw-r--r--dtrans/source/win32/dnd/dndentry.cxx34
-rw-r--r--dtrans/source/win32/dnd/globals.cxx12
-rw-r--r--dtrans/source/win32/dnd/globals.hxx22
-rw-r--r--dtrans/source/win32/dnd/idroptarget.cxx18
-rw-r--r--dtrans/source/win32/dnd/idroptarget.hxx24
-rw-r--r--dtrans/source/win32/dnd/source.cxx8
-rw-r--r--dtrans/source/win32/dnd/source.hxx2
-rw-r--r--dtrans/source/win32/dnd/sourcecontext.cxx2
-rw-r--r--dtrans/source/win32/dnd/sourcecontext.hxx14
-rw-r--r--dtrans/source/win32/dnd/target.cxx6
-rw-r--r--dtrans/source/win32/dnd/target.hxx6
-rw-r--r--dtrans/source/win32/dnd/targetdragcontext.cxx4
-rw-r--r--dtrans/source/win32/dnd/targetdragcontext.hxx6
-rw-r--r--dtrans/source/win32/dnd/targetdropcontext.cxx10
-rw-r--r--dtrans/source/win32/dnd/targetdropcontext.hxx16
-rw-r--r--dtrans/source/win32/dtobj/APNDataObject.cxx90
-rw-r--r--dtrans/source/win32/dtobj/APNDataObject.hxx10
-rw-r--r--dtrans/source/win32/dtobj/DOTransferable.cxx174
-rw-r--r--dtrans/source/win32/dtobj/DOTransferable.hxx46
-rw-r--r--dtrans/source/win32/dtobj/DTransHelper.cxx2
-rw-r--r--dtrans/source/win32/dtobj/DTransHelper.hxx36
-rw-r--r--dtrans/source/win32/dtobj/DataFmtTransl.cxx76
-rw-r--r--dtrans/source/win32/dtobj/DataFmtTransl.hxx14
-rw-r--r--dtrans/source/win32/dtobj/DtObjFactory.cxx4
-rw-r--r--dtrans/source/win32/dtobj/Fetc.cxx42
-rw-r--r--dtrans/source/win32/dtobj/Fetc.hxx4
-rw-r--r--dtrans/source/win32/dtobj/FetcList.cxx180
-rw-r--r--dtrans/source/win32/dtobj/FetcList.hxx52
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.cxx214
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.hxx4
-rw-r--r--dtrans/source/win32/dtobj/MimeAttrib.hxx2
-rw-r--r--dtrans/source/win32/dtobj/TxtCnvtHlp.cxx24
-rw-r--r--dtrans/source/win32/dtobj/TxtCnvtHlp.hxx12
-rw-r--r--dtrans/source/win32/dtobj/XNotifyingDataObject.cxx52
-rw-r--r--dtrans/source/win32/dtobj/XNotifyingDataObject.hxx20
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx66
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.hxx52
-rw-r--r--dtrans/source/win32/ftransl/ftransl.cxx100
-rw-r--r--dtrans/source/win32/ftransl/ftransl.hxx12
-rw-r--r--dtrans/source/win32/ftransl/ftransl.xml44
-rw-r--r--dtrans/source/win32/ftransl/ftranslentry.cxx38
-rw-r--r--dtrans/source/win32/misc/ImplHelper.cxx64
-rw-r--r--dtrans/source/win32/misc/ImplHelper.hxx16
-rw-r--r--dtrans/source/win32/misc/WinClip.hxx2
-rw-r--r--dtrans/source/win32/mtaole/MtaOleClipb.cxx308
-rw-r--r--dtrans/source/win32/workbench/XTDo.cxx42
-rw-r--r--dtrans/source/win32/workbench/XTDo.hxx28
-rw-r--r--dtrans/source/win32/workbench/test_wincb.cxx92
-rw-r--r--dtrans/source/win32/workbench/testmarshal.cxx82
57 files changed, 1293 insertions, 1293 deletions
diff --git a/dtrans/source/win32/clipb/APNDataObject.hxx b/dtrans/source/win32/clipb/APNDataObject.hxx
index 81ea56fd0df7..fc8940f53d62 100644
--- a/dtrans/source/win32/clipb/APNDataObject.hxx
+++ b/dtrans/source/win32/clipb/APNDataObject.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,13 +37,13 @@
/*
an APartment Neutral dataobject wrapper; this wrapper of a IDataObject
pointer can be used from any apartment without RPC_E_WRONG_THREAD
- which normally occurs if an apartment tries to use an interface
+ which normally occurs if an apartment tries to use an interface
pointer of another apartment; we use containment to hold the original
DataObject
*/
class CAPNDataObject : public IDataObject
{
-public:
+public:
CAPNDataObject( IDataObjectPtr rIDataObject );
~CAPNDataObject( );
@@ -76,8 +76,8 @@ private:
private:
IDataObjectPtr m_rIDataObjectOrg;
- HGLOBAL m_hGlobal;
- LONG m_nRefCnt;
+ HGLOBAL m_hGlobal;
+ LONG m_nRefCnt;
// prevent copy and assignment
private:
diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx
index 8b717d9a3ed0..42230e7b0896 100644
--- a/dtrans/source/win32/clipb/WinClipbImpl.cxx
+++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,11 +75,11 @@ CWinClipbImpl* CWinClipbImpl::s_pCWinClipbImpl = NULL;
osl::Mutex CWinClipbImpl::s_aMutex;
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CWinClipbImpl::CWinClipbImpl( const OUString& aClipboardName, CWinClipboard* theWinClipboard ) :
- m_itsName( aClipboardName ),
+ m_itsName( aClipboardName ),
m_pWinClipboard( theWinClipboard ),
m_pCurrentClipContent( NULL )
{
@@ -92,7 +92,7 @@ CWinClipbImpl::CWinClipbImpl( const OUString& aClipboardName, CWinClipboard* the
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CWinClipbImpl::~CWinClipbImpl( )
@@ -115,7 +115,7 @@ Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( ) throw( Runtime
ClearableMutexGuard aGuard( m_ClipContentMutex );
if ( NULL != m_pCurrentClipContent )
- {
+ {
return m_pCurrentClipContent->m_XTransferable;
}
@@ -128,19 +128,19 @@ Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( ) throw( Runtime
// get the current dataobject from clipboard
IDataObjectPtr pIDataObject;
HRESULT hr = m_MtaOleClipboard.getClipboard( &pIDataObject );
-
+
if ( SUCCEEDED( hr ) )
{
- // create an apartment neutral dataobject and initialize it with a
+ // create an apartment neutral dataobject and initialize it with a
// com smart pointer to the IDataObject from clipboard
IDataObjectPtr pIDo( new CAPNDataObject( pIDataObject ) );
-
+
CDTransObjFactory objFactory;
- // remeber pIDo destroys itself due to the smart pointer
+ // remeber pIDo destroys itself due to the smart pointer
rClipContent = objFactory.createTransferableFromDataObj( m_pWinClipboard->m_SrvMgr, pIDo );
}
-
+
return rClipContent;
}
@@ -148,34 +148,34 @@ Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( ) throw( Runtime
// setContent
//------------------------------------------------------------------------
-void SAL_CALL CWinClipbImpl::setContents(
+void SAL_CALL CWinClipbImpl::setContents(
const Reference< XTransferable >& xTransferable,
- const Reference< XClipboardOwner >& xClipboardOwner )
+ const Reference< XClipboardOwner >& xClipboardOwner )
throw( RuntimeException )
-{
+{
CDTransObjFactory objFactory;
IDataObjectPtr pIDataObj;
-
+
if ( xTransferable.is( ) )
{
ClearableMutexGuard aGuard( m_ClipContentMutex );
- m_pCurrentClipContent = new CXNotifyingDataObject(
+ m_pCurrentClipContent = new CXNotifyingDataObject(
objFactory.createDataObjFromTransferable( m_pWinClipboard->m_SrvMgr , xTransferable ),
xTransferable,
xClipboardOwner,
this );
-
+
aGuard.clear( );
- pIDataObj = IDataObjectPtr( m_pCurrentClipContent );
+ pIDataObj = IDataObjectPtr( m_pCurrentClipContent );
}
-
- m_MtaOleClipboard.setClipboard(pIDataObj.get());
+
+ m_MtaOleClipboard.setClipboard(pIDataObj.get());
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
OUString SAL_CALL CWinClipbImpl::getName( ) throw( RuntimeException )
@@ -184,7 +184,7 @@ OUString SAL_CALL CWinClipbImpl::getName( ) throw( RuntimeException )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Int8 SAL_CALL CWinClipbImpl::getRenderingCapabilities( ) throw( RuntimeException )
@@ -193,11 +193,11 @@ sal_Int8 SAL_CALL CWinClipbImpl::getRenderingCapabilities( ) throw( RuntimeExce
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CWinClipbImpl::flushClipboard( ) throw( RuntimeException )
-{
+{
// sollte eigentlich hier stehen: ClearableMutexGuard aGuard( m_ClipContentMutex );
// geht aber nicht, da FlushClipboard zurückruft und das DataObject
// freigibt und damit würde es einen Deadlock in onReleaseDataObject geben
@@ -211,10 +211,10 @@ void SAL_CALL CWinClipbImpl::flushClipboard( ) throw( RuntimeException )
if ( NULL != m_pCurrentClipContent )
m_MtaOleClipboard.flushClipboard( );
-}
+}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CWinClipbImpl::registerClipboardViewer( )
@@ -223,7 +223,7 @@ void SAL_CALL CWinClipbImpl::registerClipboardViewer( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CWinClipbImpl::unregisterClipboardViewer( )
@@ -232,7 +232,7 @@ void SAL_CALL CWinClipbImpl::unregisterClipboardViewer( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CWinClipbImpl::dispose() throw( RuntimeException )
@@ -241,10 +241,10 @@ void SAL_CALL CWinClipbImpl::dispose() throw( RuntimeException )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-void WINAPI CWinClipbImpl::onClipboardContentChanged( void )
+void WINAPI CWinClipbImpl::onClipboardContentChanged( void )
{
MutexGuard aGuard( s_aMutex );
diff --git a/dtrans/source/win32/clipb/WinClipbImpl.hxx b/dtrans/source/win32/clipb/WinClipbImpl.hxx
index 97e7919ea174..c79b70e135b7 100644
--- a/dtrans/source/win32/clipb/WinClipbImpl.hxx
+++ b/dtrans/source/win32/clipb/WinClipbImpl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,7 +53,7 @@ class CWinClipboard;
class CXNotifyingDataObject;
//---------------------------------------------------
-// impl class to avoid deadlocks between XTDataObject
+// impl class to avoid deadlocks between XTDataObject
// and the clipboard implementation
//---------------------------------------------------
@@ -63,28 +63,28 @@ public:
~CWinClipbImpl( );
protected:
- CWinClipbImpl( const ::rtl::OUString& aClipboardName, CWinClipboard* theWinClipboard );
+ CWinClipbImpl( const ::rtl::OUString& aClipboardName, CWinClipboard* theWinClipboard );
- ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents( )
+ ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents( )
throw( ::com::sun::star::uno::RuntimeException );
-
- void SAL_CALL setContents(
- const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
- const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
+
+ void SAL_CALL setContents(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
throw( ::com::sun::star::uno::RuntimeException );
::rtl::OUString SAL_CALL getName( ) throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------
- // XClipboardEx
+ // XClipboardEx
//------------------------------------------------
-
+
sal_Int8 SAL_CALL getRenderingCapabilities( ) throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------
// XFlushableClipboard
//------------------------------------------------
-
+
void SAL_CALL flushClipboard( ) throw( com::sun::star::uno::RuntimeException );
//------------------------------------------------
@@ -94,9 +94,9 @@ protected:
void SAL_CALL dispose( ) throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------
- // member functions
+ // member functions
//------------------------------------------------
-
+
void SAL_CALL registerClipboardViewer( );
void SAL_CALL unregisterClipboardViewer( );
@@ -106,20 +106,20 @@ private:
void SAL_CALL onReleaseDataObject( CXNotifyingDataObject* theCaller );
private:
- ::rtl::OUString m_itsName;
- CMtaOleClipboard m_MtaOleClipboard;
- CWinClipboard* m_pWinClipboard;
- CXNotifyingDataObject* m_pCurrentClipContent;
+ ::rtl::OUString m_itsName;
+ CMtaOleClipboard m_MtaOleClipboard;
+ CWinClipboard* m_pWinClipboard;
+ CXNotifyingDataObject* m_pCurrentClipContent;
osl::Mutex m_ClipContentMutex;
- static osl::Mutex s_aMutex;
- static CWinClipbImpl* s_pCWinClipbImpl;
+ static osl::Mutex s_aMutex;
+ static CWinClipbImpl* s_pCWinClipbImpl;
private:
CWinClipbImpl( const CWinClipbImpl& );
CWinClipbImpl& operator=( const CWinClipbImpl& );
- friend class CWinClipboard;
+ friend class CWinClipboard;
friend class CXNotifyingDataObject;
};
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
index 8439040a6337..36f05bee534d 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,8 +77,8 @@ namespace
// ctor
//------------------------------------------------------------------------
/*XEventListener,*/
-CWinClipboard::CWinClipboard( const Reference< XMultiServiceFactory >& rServiceManager, const OUString& aClipboardName ) :
- WeakComponentImplHelper4< XClipboardEx, XFlushableClipboard, XClipboardNotifier, XServiceInfo >( m_aCbListenerMutex ),
+CWinClipboard::CWinClipboard( const Reference< XMultiServiceFactory >& rServiceManager, const OUString& aClipboardName ) :
+ WeakComponentImplHelper4< XClipboardEx, XFlushableClipboard, XClipboardNotifier, XServiceInfo >( m_aCbListenerMutex ),
m_SrvMgr( rServiceManager )
{
m_pImpl.reset( new CWinClipbImpl( aClipboardName, this ) );
@@ -91,7 +91,7 @@ CWinClipboard::CWinClipboard( const Reference< XMultiServiceFactory >& rServiceM
//------------------------------------------------------------------------
// getContent
// to avoid unecessary traffic we check first if there is a clipboard
-// content which was set via setContent, in this case we don't need
+// content which was set via setContent, in this case we don't need
// to query the content from the clipboard, create a new wrapper object
// and so on, we simply return the orignial XTransferable instead of our
// DOTransferable
@@ -100,7 +100,7 @@ CWinClipboard::CWinClipboard( const Reference< XMultiServiceFactory >& rServiceM
Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( RuntimeException )
{
MutexGuard aGuard( m_aMutex );
-
+
if ( rBHelper.bDisposed )
throw DisposedException( OUString::createFromAscii( "object is already disposed" ),
static_cast< XClipboardEx* >( this ) );
@@ -116,7 +116,7 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( Runtime
//------------------------------------------------------------------------
void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTransferable,
- const Reference< XClipboardOwner >& xClipboardOwner )
+ const Reference< XClipboardOwner >& xClipboardOwner )
throw( RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -166,26 +166,26 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException )
//========================================================================
sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeException )
-{
+{
if ( rBHelper.bDisposed )
throw DisposedException( OUString::createFromAscii( "object is already disposed" ),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
- return m_pImpl->getRenderingCapabilities( );
+ return m_pImpl->getRenderingCapabilities( );
return 0;
}
//========================================================================
-// XClipboardNotifier
+// XClipboardNotifier
//========================================================================
//------------------------------------------------------------------------
// getName
//------------------------------------------------------------------------
-void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardListener >& listener )
+void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardListener >& listener )
throw( RuntimeException )
{
if ( rBHelper.bDisposed )
@@ -194,18 +194,18 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi
// check input parameter
if ( !listener.is( ) )
- throw IllegalArgumentException( OUString::createFromAscii( "empty reference" ),
- static_cast< XClipboardEx* >( this ),
+ throw IllegalArgumentException( OUString::createFromAscii( "empty reference" ),
+ static_cast< XClipboardEx* >( this ),
1 );
- rBHelper.aLC.addInterface( getCppuType( &listener ), listener );
+ rBHelper.aLC.addInterface( getCppuType( &listener ), listener );
}
//------------------------------------------------------------------------
// getName
//------------------------------------------------------------------------
-void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboardListener >& listener )
+void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboardListener >& listener )
throw( RuntimeException )
{
if ( rBHelper.bDisposed )
@@ -218,7 +218,7 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar
static_cast< XClipboardEx* >( this ),
1 );
- rBHelper.aLC.removeInterface( getCppuType( &listener ), listener );
+ rBHelper.aLC.removeInterface( getCppuType( &listener ), listener );
}
//------------------------------------------------------------------------
@@ -234,17 +234,17 @@ void SAL_CALL CWinClipboard::notifyAllClipboardListener( )
{
aGuard.clear( );
- OInterfaceContainerHelper* pICHelper = rBHelper.aLC.getContainer(
+ OInterfaceContainerHelper* pICHelper = rBHelper.aLC.getContainer(
getCppuType( ( Reference< XClipboardListener > * ) 0 ) );
if ( pICHelper )
- {
+ {
try
{
OInterfaceIteratorHelper iter(*pICHelper);
Reference<XTransferable> rXTransf(m_pImpl->getContents());
ClipboardEvent aClipbEvent(static_cast<XClipboard*>(this), rXTransf);
-
+
while(iter.hasMoreElements())
{
try
@@ -256,24 +256,24 @@ void SAL_CALL CWinClipboard::notifyAllClipboardListener( )
catch(RuntimeException&)
{
OSL_ENSURE( false, "RuntimeException caught" );
- }
- }
+ }
+ }
}
catch(const ::com::sun::star::lang::DisposedException&)
- {
+ {
OSL_ENSURE(false, "Service Manager disposed");
-
+
// no further clipboard changed notifications
m_pImpl->unregisterClipboardViewer();
}
-
+
} // end if
} // end if
} // end if
}
//------------------------------------------------
-// overwritten base class method which will be
+// overwritten base class method which will be
// called by the base class dispose method
//------------------------------------------------
@@ -290,17 +290,17 @@ void SAL_CALL CWinClipboard::disposing()
// XServiceInfo
// -------------------------------------------------
-OUString SAL_CALL CWinClipboard::getImplementationName( )
+OUString SAL_CALL CWinClipboard::getImplementationName( )
throw(RuntimeException)
{
return OUString::createFromAscii( WINCLIPBOARD_IMPL_NAME );
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-sal_Bool SAL_CALL CWinClipboard::supportsService( const OUString& ServiceName )
+sal_Bool SAL_CALL CWinClipboard::supportsService( const OUString& ServiceName )
throw(RuntimeException)
{
Sequence < OUString > SupportedServicesNames = WinClipboard_getSupportedServiceNames();
@@ -313,10 +313,10 @@ sal_Bool SAL_CALL CWinClipboard::supportsService( const OUString& ServiceName )
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-Sequence< OUString > SAL_CALL CWinClipboard::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL CWinClipboard::getSupportedServiceNames( )
throw(RuntimeException)
{
return WinClipboard_getSupportedServiceNames();
diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx b/dtrans/source/win32/clipb/WinClipboard.hxx
index 81bdeca7653f..72ca52b1438c 100644
--- a/dtrans/source/win32/clipb/WinClipboard.hxx
+++ b/dtrans/source/win32/clipb/WinClipboard.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,11 +53,11 @@
class CWinClipbImpl;
//------------------------------------------------------------------------
-// implements the XClipboard[Ex] ... interfaces
+// 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
-// class instance
-// watch out: we are using only one static member variable and not a list
+// and a static member to reasocciate from this static function to the
+// class instance
+// watch out: we are using only one static member variable and not a list
// because we assume to be instanciated only once
// this will be asured by an OneInstanceFactory of the service and not
// by this class!
@@ -67,65 +67,65 @@ class CWinClipbImpl;
// before the constructor of WeakComponentImplHelper
// will be called and initialized with this mutex
class CWinClipboardDummy
-{
+{
protected:
- osl::Mutex m_aMutex;
- osl::Mutex m_aCbListenerMutex;
+ osl::Mutex m_aMutex;
+ osl::Mutex m_aCbListenerMutex;
};
-class CWinClipboard :
+class CWinClipboard :
public CWinClipboardDummy,
- public cppu::WeakComponentImplHelper4<
+ public cppu::WeakComponentImplHelper4<
::com::sun::star::datatransfer::clipboard::XClipboardEx, \
::com::sun::star::datatransfer::clipboard::XFlushableClipboard,
- ::com::sun::star::datatransfer::clipboard::XClipboardNotifier,
+ ::com::sun::star::datatransfer::clipboard::XClipboardNotifier,
::com::sun::star::lang::XServiceInfo >
{
public:
- CWinClipboard( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
+ CWinClipboard( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
const ::rtl::OUString& aClipboardName );
-
+
//------------------------------------------------
// XClipboard
//------------------------------------------------
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents( )
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents( )
throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setContents(
- const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
- const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
+
+ virtual void SAL_CALL setContents(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
throw( ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getName( )
+ virtual ::rtl::OUString SAL_CALL getName( )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------
// XFlushableClipboard
//------------------------------------------------
-
+
virtual void SAL_CALL flushClipboard( ) throw( com::sun::star::uno::RuntimeException );
//------------------------------------------------
- // XClipboardEx
+ // XClipboardEx
//------------------------------------------------
-
+
virtual sal_Int8 SAL_CALL getRenderingCapabilities( ) throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------
- // XClipboardNotifier
+ // XClipboardNotifier
//------------------------------------------------
- virtual void SAL_CALL addClipboardListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ virtual void SAL_CALL addClipboardListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeClipboardListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ virtual void SAL_CALL removeClipboardListener(
+ 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
+ // overwrite base class method, which is called
// by base class dispose function
//------------------------------------------------
@@ -133,22 +133,22 @@ public:
//------------------------------------------------
// XServiceInfo
- //------------------------------------------------
+ //------------------------------------------------
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
throw(::com::sun::star::uno::RuntimeException);
private:
- void SAL_CALL notifyAllClipboardListener( );
+ void SAL_CALL notifyAllClipboardListener( );
-private:
- ::std::auto_ptr< CWinClipbImpl > m_pImpl;
+private:
+ ::std::auto_ptr< CWinClipbImpl > m_pImpl;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
friend class CWinClipbImpl;
diff --git a/dtrans/source/win32/clipb/sysdtrans.xml b/dtrans/source/win32/clipb/sysdtrans.xml
index a6dec8a03a42..cc615619037b 100644
--- a/dtrans/source/win32/clipb/sysdtrans.xml
+++ b/dtrans/source/win32/clipb/sysdtrans.xml
@@ -1,43 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name> sysdtrans </module-name>
+ <module-name> sysdtrans </module-name>
<component-description>
<author> Tino Rachui </author>
- <name> com.sun.star.comp.datatransfer.SystemClipboard </name>
+ <name> com.sun.star.comp.datatransfer.SystemClipboard </name>
<description>
The win32 implementation of the datatransfer service.
</description>
- <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
- <language> c++ </language>
+ <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
+ <language> c++ </language>
<status value="beta"/>
- <supported-service> com.sun.star.datatransfer.clipboard.SystemClipboard </supported-service>
- <service-dependency> ... </service-dependency>
- <type> com.sun.star.datatransfer.clipboard.XClipboardEx </type>
- <type> com.sun.star.datatransfer.XTransferable </type>
- <type> com.sun.star.datatransfer.XTransferableEx </type>
+ <supported-service> com.sun.star.datatransfer.clipboard.SystemClipboard </supported-service>
+ <service-dependency> ... </service-dependency>
+ <type> com.sun.star.datatransfer.clipboard.XClipboardEx </type>
+ <type> com.sun.star.datatransfer.XTransferable </type>
+ <type> com.sun.star.datatransfer.XTransferableEx </type>
<type> com.sun.star.datatransfer.clipboard.XClipboardOwner</type>
<type> com.sun.star.datatransfer.clipboard.XClipboardListener</type>
<type> com.sun.star.datatransfer.clipboard.XClipboardNotifier</type>
<type> com.sun.star.datatransfer.clipboard.XFlushableClipboard</type>
<type> com.sun.star.datatransfer.clipboard.RenderingCapabilities</type>
- <type> com.sun.star.datatransfer.XTransferDataAccess </type>
- <type> com.sun.star.lang.XComponent </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.lang.IllegalArgumentException </type>
- <type> com.sun.star.uno.TypeClass </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.registry.XRegistryKey </type>
- <type> com.sun.star.container.XSet </type>
+ <type> com.sun.star.datatransfer.XTransferDataAccess </type>
+ <type> com.sun.star.lang.XComponent </type>
+ <type> com.sun.star.lang.XMultiServiceFactory </type>
+ <type> com.sun.star.lang.XSingleServiceFactory </type>
+ <type> com.sun.star.lang.XServiceInfo </type>
+ <type> com.sun.star.lang.XTypeProvider </type>
+ <type> com.sun.star.lang.IllegalArgumentException </type>
+ <type> com.sun.star.uno.TypeClass </type>
+ <type> com.sun.star.uno.XWeak </type>
+ <type> com.sun.star.uno.XAggregation </type>
+ <type> com.sun.star.registry.XRegistryKey </type>
+ <type> com.sun.star.container.XSet </type>
</component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper </runtime-module-dependency>
- <runtime-module-dependency> cppu2 </runtime-module-dependency>
- <runtime-module-dependency> sal2 </runtime-module-dependency>
+ <project-build-dependency> cppuhelper </project-build-dependency>
+ <project-build-dependency> cppu </project-build-dependency>
+ <project-build-dependency> sal </project-build-dependency>
+ <runtime-module-dependency> cppuhelper </runtime-module-dependency>
+ <runtime-module-dependency> cppu2 </runtime-module-dependency>
+ <runtime-module-dependency> sal2 </runtime-module-dependency>
</module-description>
diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx
index 579872c8eead..dd09834f0581 100644
--- a/dtrans/source/win32/clipb/wcbentry.cxx
+++ b/dtrans/source/win32/clipb/wcbentry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dtrans.hxx"
//______________________________________________________________________________________________________________
-// includes of other projects
+// includes of other projects
//______________________________________________________________________________________________________________
#include <cppuhelper/factory.hxx>
#include <com/sun/star/container/XSet.hpp>
@@ -43,36 +43,36 @@
// the service names
#define WINCLIPBOARD_SERVICE_NAME "com.sun.star.datatransfer.clipboard.SystemClipboard"
-// the implementation names
+// the implementation names
#define WINCLIPBOARD_IMPL_NAME "com.sun.star.datatransfer.clipboard.ClipboardW32"
// the registry key names
// a key under which this service will be registered, Format: -> "/ImplName/UNO/SERVICES/ServiceName"
-// < Implementation-Name ></UNO/SERVICES/>< Service-Name >
+// < Implementation-Name ></UNO/SERVICES/>< Service-Name >
#define WINCLIPBOARD_REGKEY_NAME "/com.sun.star.datatransfer.clipboard.ClipboardW32/UNO/SERVICES/com.sun.star.datatransfer.clipboard.SystemClipboard"
//-----------------------------------------------------------------------------------------------------------
// namespace directives
//-----------------------------------------------------------------------------------------------------------
-using namespace ::rtl ;
-using namespace ::com::sun::star::uno ;
-using namespace ::com::sun::star::registry ;
-using namespace ::cppu ;
+using namespace ::rtl ;
+using namespace ::com::sun::star::uno ;
+using namespace ::com::sun::star::registry ;
+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
+ // so we should give it to every UNO-Implementation component
//-----------------------------------------------------------------------------------------------------------
Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
@@ -82,10 +82,10 @@ namespace
}
//-----------------------------------------------------------------------------------------------------------
-// the 3 important functions which will be exported
+// the 3 important functions which will be exported
//-----------------------------------------------------------------------------------------------------------
-extern "C"
+extern "C"
{
//----------------------------------------------------------------------
@@ -113,13 +113,13 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
{
try
{
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
+ Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( WINCLIPBOARD_REGKEY_NAME ) ) );
bRetVal = sal_True;
}
catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
+ {
+ OSL_ENSURE(sal_False, "InvalidRegistryException caught");
bRetVal = sal_False;
}
}
@@ -128,7 +128,7 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
}
//----------------------------------------------------------------------
-// component_getFactory
+// component_getFactory
// returns a factory to create XFilePicker-Services
//----------------------------------------------------------------------
@@ -139,8 +139,8 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, WINCLIPBOARD_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( WINCLIPBOARD_SERVICE_NAME ) );
-
+ aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( WINCLIPBOARD_SERVICE_NAME ) );
+
//OUString( RTL_CONSTASCII_USTRINGPARAM( FPS_IMPL_NAME ) )
Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
@@ -151,7 +151,7 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
{
xFactory->acquire();
pRet = xFactory.get();
- }
+ }
}
return pRet;
diff --git a/dtrans/source/win32/dnd/dnd.xml b/dtrans/source/win32/dnd/dnd.xml
index 10db2ddb2326..a7690cbd2de4 100644
--- a/dtrans/source/win32/dnd/dnd.xml
+++ b/dtrans/source/win32/dnd/dnd.xml
@@ -1,46 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name> dnd </module-name>
+ <module-name> dnd </module-name>
<component-description>
<author> Joachim Lingner </author>
- <name> com.sun.star.comp.datatransfer.dnd.OleDragAndDrop </name>
+ <name> com.sun.star.comp.datatransfer.dnd.OleDragAndDrop </name>
<description>
The win32 implementation of the drop target service.
</description>
- <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
- <language> c++ </language>
+ <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
+ <language> c++ </language>
<status value="beta"/>
- <supported-service> com.sun.star.datatransfer.dnd.OleDragSource</supported-service>
- <supported-service> com.sun.star.datatransfer.dnd.OleDropTarget</supported-service>
- <service-dependency> ... </service-dependency>
- <type> com.sun.star.datatransfer.dnd.DNDConstants </type>
- <type> com.sun.star.datatransfer.dnd.XDropTarget </type>
- <type> com.sun.star.datatransfer.dnd.XDropTargetDragContext </type>
- <type> com.sun.star.datatransfer.dnd.XDropTargetListener </type>
- <type> com.sun.star.datatransfer.dnd.XDropTargetDropContext </type>
- <type> com.sun.star.datatransfer.dnd.XDragSourceContext </type>
- <type> com.sun.star.datatransfer.dnd.XDragSource </type>
- <type> com.sun.star.datatransfer.XTransferable </type>
- <type> com.sun.star.lang.XComponent </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.lang.IllegalArgumentException </type>
- <type> com.sun.star.lang.XInitialization </type>
- <type> com.sun.star.lang.XUnoTunnel </type>
- <type> com.sun.star.uno.TypeClass </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.registry.XRegistryKey </type>
- <type> com.sun.star.awt.MouseButton </type>
- <type> com.sun.star.awt.MouseEvent </type>
+ <supported-service> com.sun.star.datatransfer.dnd.OleDragSource</supported-service>
+ <supported-service> com.sun.star.datatransfer.dnd.OleDropTarget</supported-service>
+ <service-dependency> ... </service-dependency>
+ <type> com.sun.star.datatransfer.dnd.DNDConstants </type>
+ <type> com.sun.star.datatransfer.dnd.XDropTarget </type>
+ <type> com.sun.star.datatransfer.dnd.XDropTargetDragContext </type>
+ <type> com.sun.star.datatransfer.dnd.XDropTargetListener </type>
+ <type> com.sun.star.datatransfer.dnd.XDropTargetDropContext </type>
+ <type> com.sun.star.datatransfer.dnd.XDragSourceContext </type>
+ <type> com.sun.star.datatransfer.dnd.XDragSource </type>
+ <type> com.sun.star.datatransfer.XTransferable </type>
+ <type> com.sun.star.lang.XComponent </type>
+ <type> com.sun.star.lang.XMultiServiceFactory </type>
+ <type> com.sun.star.lang.XSingleServiceFactory </type>
+ <type> com.sun.star.lang.XServiceInfo </type>
+ <type> com.sun.star.lang.XTypeProvider </type>
+ <type> com.sun.star.lang.IllegalArgumentException </type>
+ <type> com.sun.star.lang.XInitialization </type>
+ <type> com.sun.star.lang.XUnoTunnel </type>
+ <type> com.sun.star.uno.TypeClass </type>
+ <type> com.sun.star.uno.XWeak </type>
+ <type> com.sun.star.uno.XAggregation </type>
+ <type> com.sun.star.registry.XRegistryKey </type>
+ <type> com.sun.star.awt.MouseButton </type>
+ <type> com.sun.star.awt.MouseEvent </type>
</component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper </runtime-module-dependency>
- <runtime-module-dependency> cppu2 </runtime-module-dependency>
- <runtime-module-dependency> sal2 </runtime-module-dependency>
+ <project-build-dependency> cppuhelper </project-build-dependency>
+ <project-build-dependency> cppu </project-build-dependency>
+ <project-build-dependency> sal </project-build-dependency>
+ <runtime-module-dependency> cppuhelper </runtime-module-dependency>
+ <runtime-module-dependency> cppu2 </runtime-module-dependency>
+ <runtime-module-dependency> sal2 </runtime-module-dependency>
</module-description>
diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx
index 34bc550d46c3..cfb0b8d3d5a5 100644
--- a/dtrans/source/win32/dnd/dndentry.cxx
+++ b/dtrans/source/win32/dnd/dndentry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,10 +35,10 @@
#include "source.hxx"
#include "target.hxx"
-using namespace ::rtl ;
-using namespace ::com::sun::star::uno ;
-using namespace ::com::sun::star::registry ;
-using namespace ::cppu ;
+using namespace ::rtl ;
+using namespace ::com::sun::star::uno ;
+using namespace ::com::sun::star::registry ;
+using namespace ::cppu ;
using namespace ::com::sun::star::lang;
rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
@@ -56,7 +56,7 @@ Reference< XInterface > SAL_CALL createDropTarget( const Reference< XMultiServic
}
-extern "C"
+extern "C"
{
sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
{
@@ -88,17 +88,17 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
{
try
{
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
+ Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( DNDSOURCE_REGKEY_NAME ) ) );
bRetVal = sal_True;
- pXNewKey= static_cast< XRegistryKey* >( pRegistryKey );
+ pXNewKey= static_cast< XRegistryKey* >( pRegistryKey );
pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( DNDTARGET_REGKEY_NAME ) ) );
bRetVal = sal_True;
}
catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
+ {
+ OSL_ENSURE(sal_False, "InvalidRegistryException caught");
bRetVal = sal_False;
}
}
@@ -107,7 +107,7 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
}
//----------------------------------------------------------------------
-// component_getFactory
+// component_getFactory
// returns a factory to create XFilePicker-Services
//----------------------------------------------------------------------
@@ -119,21 +119,21 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, DNDSOURCE_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( DNDSOURCE_SERVICE_NAME ) );
-
+ aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( DNDSOURCE_SERVICE_NAME ) );
+
xFactory= createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
OUString::createFromAscii( pImplName ),
createDragSource,
aSNS,
&g_moduleCount.modCnt);
-
+
}
else if( pSrvManager && ( 0 == rtl_str_compare( pImplName, DNDTARGET_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( DNDTARGET_SERVICE_NAME ) );
-
+ aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( DNDTARGET_SERVICE_NAME ) );
+
xFactory= createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
OUString::createFromAscii( pImplName ),
@@ -146,7 +146,7 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
{
xFactory->acquire();
pRet = xFactory.get();
- }
+ }
return pRet;
}
diff --git a/dtrans/source/win32/dnd/globals.cxx b/dtrans/source/win32/dnd/globals.cxx
index f8160de03639..fa5f301ea90d 100644
--- a/dtrans/source/win32/dnd/globals.cxx
+++ b/dtrans/source/win32/dnd/globals.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ sal_Int8 dndOleKeysToAction( DWORD grfKeyState, sal_Int8 nSourceActions)
// no MK_ALT, MK_CONTROL, MK_SHIFT
if( !(grfKeyState & MK_CONTROL) &&
- !(grfKeyState & MK_ALT) &&
+ !(grfKeyState & MK_ALT) &&
!(grfKeyState & MK_RBUTTON) &&
!(grfKeyState & MK_SHIFT))
{
@@ -56,7 +56,7 @@ sal_Int8 dndOleKeysToAction( DWORD grfKeyState, sal_Int8 nSourceActions)
{
ret= ACTION_DEFAULT | ACTION_MOVE;
}
-
+
else if( nSourceActions & ACTION_COPY )
{
ret= ACTION_COPY;
@@ -75,8 +75,8 @@ sal_Int8 dndOleKeysToAction( DWORD grfKeyState, sal_Int8 nSourceActions)
{
ret= ACTION_MOVE;
}
- else if ( grfKeyState & MK_CONTROL &&
- !(grfKeyState & MK_SHIFT) )
+ else if ( grfKeyState & MK_CONTROL &&
+ !(grfKeyState & MK_SHIFT) )
{
ret= ACTION_COPY;
}
@@ -85,7 +85,7 @@ sal_Int8 dndOleKeysToAction( DWORD grfKeyState, sal_Int8 nSourceActions)
{
ret= ACTION_LINK;
}
- else if ( grfKeyState & MK_RBUTTON |
+ else if ( grfKeyState & MK_RBUTTON |
grfKeyState & MK_ALT)
{
ret= ACTION_COPY_OR_MOVE | ACTION_LINK;
diff --git a/dtrans/source/win32/dnd/globals.hxx b/dtrans/source/win32/dnd/globals.hxx
index d9ff77dd731d..e3803de1cbe9 100644
--- a/dtrans/source/win32/dnd/globals.hxx
+++ b/dtrans/source/win32/dnd/globals.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,34 +49,34 @@
#define DNDTARGET_REGKEY_NAME "/com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1/UNO/SERVICES/com.sun.star.datatransfer.dnd.OleDropTarget"
// This maps key states as occur as parameter, e.g. in IDropTarget::DragEnter,
-// IDropSource::QueryContinueDrag, to actions as are declared in
+// IDropSource::QueryContinueDrag, to actions as are declared in
// com::sun::star::datatransfer::dnd::DNDConstants ( ACTION_MOVE etc).
-// If the grfKeyState indicates the ALt or right mousebutton then the returned
+// If the grfKeyState indicates the ALt or right mousebutton then the returned
// values combines all possible actions. This is because those key and button are
// used when the user expect a menu to appear when he drops. The menu then
// contains entries, such as move, copy, link, cancel.
-// An odd fact is that the argument grfKeyState in IDropTarget::Drop does not
-// contain mouse buttons (winnt 4 SP6). That indicates that the right mouse button
+// An odd fact is that the argument grfKeyState in IDropTarget::Drop does not
+// contain mouse buttons (winnt 4 SP6). That indicates that the right mouse button
// is not considered relevant in a drag operation. Contrarily the file explorer
-// gives that button a special meaning: the user has to select the effect from
+// gives that button a special meaning: the user has to select the effect from
// a context menu on drop.
sal_Int8 dndOleKeysToAction( DWORD grfKeyState, sal_Int8 sourceActions);
-// The function maps a windows DROPEFFECTs to actions
+// The function maps a windows DROPEFFECTs to actions
// ( com::sun::star::datatransfer::dnd::DNDConstants).
-// The argument can be a combination of different DROPEFFECTS,
-// In that case the return value is also a combination of the
+// The argument can be a combination of different DROPEFFECTS,
+// In that case the return value is also a combination of the
// appropriate actions.
sal_Int8 dndOleDropEffectsToActions( DWORD dwEffect);
// The function maps actions ( com::sun::star::datatransfer::dnd::DNDConstants)
// to window DROPEFFECTs.
// The argument can be a combination of different actions
-// In that case the return value is also a combination of the
+// In that case the return value is also a combination of the
// appropriate DROPEFFECTS.
DWORD dndActionsToDropEffects( sal_Int8 actions);
-// If the argument constitutes only one action then it is mapped to the
+// If the argument constitutes only one action then it is mapped to the
// corresponding DROPEFFECT otherwise DROPEFFECT_MOVE is returned. This is
// why move is the default effect (no modifiers pressed, or right mouse button
// or Alt).
diff --git a/dtrans/source/win32/dnd/idroptarget.cxx b/dtrans/source/win32/dnd/idroptarget.cxx
index 5fa45b935391..e1324bcf6d89 100644
--- a/dtrans/source/win32/dnd/idroptarget.cxx
+++ b/dtrans/source/win32/dnd/idroptarget.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,7 +60,7 @@ HRESULT STDMETHODCALLTYPE IDropTargetImpl::QueryInterface( REFIID riid, void **
*ppvObject= static_cast<IUnknown*>( this);
else if ( riid == __uuidof( IDropTarget))
*ppvObject= static_cast<IDropTarget*>( this);
-
+
if(*ppvObject)
{
AddRef();
@@ -68,14 +68,14 @@ HRESULT STDMETHODCALLTYPE IDropTargetImpl::QueryInterface( REFIID riid, void **
}
else
return E_NOINTERFACE;
-
+
}
-
+
ULONG STDMETHODCALLTYPE IDropTargetImpl::AddRef( void)
{
return InterlockedIncrement( &m_nRefCount);
}
-
+
ULONG STDMETHODCALLTYPE IDropTargetImpl::Release( void)
{
LONG count= InterlockedDecrement( &m_nRefCount);
@@ -92,25 +92,25 @@ STDMETHODIMP IDropTargetImpl::DragEnter( IDataObject __RPC_FAR *pDataObj,
return m_rDropTarget.DragEnter( pDataObj, grfKeyState,
pt, pdwEffect);
}
-
+
STDMETHODIMP IDropTargetImpl::DragOver( DWORD grfKeyState,
POINTL pt,
DWORD *pdwEffect)
{
return m_rDropTarget.DragOver( grfKeyState, pt, pdwEffect);
}
-
+
STDMETHODIMP IDropTargetImpl::DragLeave( void)
{
return m_rDropTarget.DragLeave();
}
-
+
STDMETHODIMP IDropTargetImpl::Drop( IDataObject *pDataObj,
DWORD grfKeyState,
POINTL pt,
DWORD __RPC_FAR *pdwEffect)
{
- return m_rDropTarget.Drop( pDataObj, grfKeyState,
+ return m_rDropTarget.Drop( pDataObj, grfKeyState,
pt, pdwEffect);
}
diff --git a/dtrans/source/win32/dnd/idroptarget.hxx b/dtrans/source/win32/dnd/idroptarget.hxx
index 8fafd98f01db..2f958ca7d0ae 100644
--- a/dtrans/source/win32/dnd/idroptarget.hxx
+++ b/dtrans/source/win32/dnd/idroptarget.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -26,7 +26,7 @@
*
************************************************************************/
#ifndef _IDROPTARGET_HXX_
-#define _IDROPTARGET_HXX_
+#define _IDROPTARGET_HXX_
#include "target.hxx"
@@ -36,35 +36,35 @@ class IDropTargetImpl: public IDropTarget
// Calls to IDropTarget functions are delegated to a DropTarget.
DropTarget& m_rDropTarget;
- virtual ~IDropTargetImpl(); // delete is only called by IUnknown::Release
+ virtual ~IDropTargetImpl(); // delete is only called by IUnknown::Release
IDropTargetImpl( const IDropTargetImpl& );
IDropTargetImpl& operator=( const IDropTargetImpl& );
public:
IDropTargetImpl( DropTarget& pTarget);
// IDropTarget
- virtual HRESULT STDMETHODCALLTYPE QueryInterface(
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(
/* [in] */ REFIID riid,
/* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
-
+
virtual ULONG STDMETHODCALLTYPE AddRef( );
-
+
virtual ULONG STDMETHODCALLTYPE Release( );
- virtual HRESULT STDMETHODCALLTYPE DragEnter(
+ virtual HRESULT STDMETHODCALLTYPE DragEnter(
/* [unique][in] */ IDataObject __RPC_FAR *pDataObj,
/* [in] */ DWORD grfKeyState,
/* [in] */ POINTL pt,
/* [out][in] */ DWORD __RPC_FAR *pdwEffect);
-
- virtual HRESULT STDMETHODCALLTYPE DragOver(
+
+ virtual HRESULT STDMETHODCALLTYPE DragOver(
/* [in] */ DWORD grfKeyState,
/* [in] */ POINTL pt,
/* [out][in] */ DWORD __RPC_FAR *pdwEffect);
-
+
virtual HRESULT STDMETHODCALLTYPE DragLeave( ) ;
-
- virtual HRESULT STDMETHODCALLTYPE Drop(
+
+ virtual HRESULT STDMETHODCALLTYPE Drop(
/* [unique][in] */ IDataObject __RPC_FAR *pDataObj,
/* [in] */ DWORD grfKeyState,
/* [in] */ POINTL pt,
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index 7d714aed4a33..d411671cf45e 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,7 +77,7 @@ unsigned __stdcall DndOleSTAFunc(LPVOID pParams);
DragSource::DragSource( const Reference<XMultiServiceFactory>& sf):
m_serviceFactory( sf),
WeakComponentImplHelper3< XDragSource, XInitialization, XServiceInfo >(m_mutex),
-// m_pcurrentContext_impl(0),
+// m_pcurrentContext_impl(0),
m_hAppWindow(0),
m_MouseButton(0),
m_RunningDndOperationCount(0)
@@ -219,7 +219,7 @@ void SAL_CALL DragSource::startDrag(
DragSourceDropEvent dsde;
- dsde.DropAction = ACTION_NONE;
+ dsde.DropAction = ACTION_NONE;
dsde.DropSuccess = false;
try
@@ -297,7 +297,7 @@ HRESULT STDMETHODCALLTYPE DragSource::QueryContinueDrag(
{
if( ( m_MouseButton == MouseButton::RIGHT && !(grfKeyState & MK_RBUTTON) ) ||
( m_MouseButton == MouseButton::MIDDLE && !(grfKeyState & MK_MBUTTON) ) ||
- ( m_MouseButton == MouseButton::LEFT && !(grfKeyState & MK_LBUTTON) ) ||
+ ( m_MouseButton == MouseButton::LEFT && !(grfKeyState & MK_LBUTTON) ) ||
( m_MouseButton == 0 && !(grfKeyState & MK_LBUTTON) ) )
{
retVal= DRAGDROP_S_DROP;
diff --git a/dtrans/source/win32/dnd/source.hxx b/dtrans/source/win32/dnd/source.hxx
index feef33a18add..cb10927ee9cc 100644
--- a/dtrans/source/win32/dnd/source.hxx
+++ b/dtrans/source/win32/dnd/source.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dtrans/source/win32/dnd/sourcecontext.cxx b/dtrans/source/win32/dnd/sourcecontext.cxx
index d4d59f4d736c..ff100d106b66 100644
--- a/dtrans/source/win32/dnd/sourcecontext.cxx
+++ b/dtrans/source/win32/dnd/sourcecontext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dtrans/source/win32/dnd/sourcecontext.hxx b/dtrans/source/win32/dnd/sourcecontext.hxx
index a73159abe258..b1ca8b984beb 100644
--- a/dtrans/source/win32/dnd/sourcecontext.hxx
+++ b/dtrans/source/win32/dnd/sourcecontext.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,17 +64,17 @@ public:
SourceContext( DragSource* pSource, const Reference<XDragSourceListener>& listener);
~SourceContext();
- virtual void SAL_CALL addDragSourceListener( const Reference<XDragSourceListener >& dsl )
+ virtual void SAL_CALL addDragSourceListener( const Reference<XDragSourceListener >& dsl )
throw( RuntimeException);
- virtual void SAL_CALL removeDragSourceListener( const Reference<XDragSourceListener >& dsl )
+ virtual void SAL_CALL removeDragSourceListener( const Reference<XDragSourceListener >& dsl )
throw( RuntimeException);
- virtual sal_Int32 SAL_CALL getCurrentCursor( )
+ virtual sal_Int32 SAL_CALL getCurrentCursor( )
throw( RuntimeException);
- virtual void SAL_CALL setCursor( sal_Int32 cursorId )
+ virtual void SAL_CALL setCursor( sal_Int32 cursorId )
throw( RuntimeException);
- virtual void SAL_CALL setImage( sal_Int32 imageId )
+ virtual void SAL_CALL setImage( sal_Int32 imageId )
throw( RuntimeException);
- virtual void SAL_CALL transferablesFlavorsChanged( )
+ virtual void SAL_CALL transferablesFlavorsChanged( )
throw( RuntimeException);
diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx
index 1f67d3cb92e1..bff6778b17ca 100644
--- a/dtrans/source/win32/dnd/target.cxx
+++ b/dtrans/source/win32/dnd/target.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -132,11 +132,11 @@ void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments )
// to ensure that it is called from the same thread that created the Window
// otherwise meesages sent during DND won't reach the windows message queue.
// Calling AttachThreadInput first would resolve this problem but would block
- // the message queue of the calling thread. So if the current thread
+ // the message queue of the calling thread. So if the current thread
// (even if it's an STA thread) and the thread that created the window are not
// identical we need to create a new thread as we do when the calling thread is
// an MTA thread.
-
+
if( aArguments.getLength() > 0)
{
// Get the window handle from aArgument. It is needed for RegisterDragDrop.
diff --git a/dtrans/source/win32/dnd/target.hxx b/dtrans/source/win32/dnd/target.hxx
index e85bd89f2fb0..b7144d402f1f 100644
--- a/dtrans/source/win32/dnd/target.hxx
+++ b/dtrans/source/win32/dnd/target.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -97,7 +97,7 @@ private:
// If m_bActive == sal_True then events are fired to XDropTargetListener s,
// none otherwise. The default value is sal_True.
sal_Bool m_bActive;
- sal_Int8 m_nDefaultActions;
+ sal_Int8 m_nDefaultActions;
// This value is set when a XDropTargetListener calls accept or reject on
// the XDropTargetDropContext or XDropTargetDragContext.
@@ -109,7 +109,7 @@ private:
Reference<XTransferable> m_currentData;
// The current action is used to determine if the USER
// action has changed (dropActionChanged)
-// sal_Int8 m_userAction;
+// sal_Int8 m_userAction;
// Set by listeners when they call XDropTargetDropContext::dropComplete
sal_Bool m_bDropComplete;
// converts IDataObject objects to XTransferable objects.
diff --git a/dtrans/source/win32/dnd/targetdragcontext.cxx b/dtrans/source/win32/dnd/targetdragcontext.cxx
index 2f0d7fd9510b..19246901ae9e 100644
--- a/dtrans/source/win32/dnd/targetdragcontext.cxx
+++ b/dtrans/source/win32/dnd/targetdragcontext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,7 +46,7 @@ TargetDragContext::~TargetDragContext()
g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
}
-void SAL_CALL TargetDragContext::acceptDrag( sal_Int8 dragOperation )
+void SAL_CALL TargetDragContext::acceptDrag( sal_Int8 dragOperation )
throw( RuntimeException)
{
m_pDropTarget->_acceptDrag( dragOperation, static_cast<XDropTargetDragContext*>( this) );
diff --git a/dtrans/source/win32/dnd/targetdragcontext.hxx b/dtrans/source/win32/dnd/targetdragcontext.hxx
index fcb2efe3c920..dead1d94c8e7 100644
--- a/dtrans/source/win32/dnd/targetdragcontext.hxx
+++ b/dtrans/source/win32/dnd/targetdragcontext.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,7 +46,7 @@ class TargetDragContext: public WeakImplHelper1<XDropTargetDragContext>
// some calls to the functions of XDropTargetDragContext are delegated
// to non-interface functions of m_pDropTarget
DropTarget* m_pDropTarget;
-
+
TargetDragContext();
TargetDragContext( const TargetDragContext&);
TargetDragContext &operator= ( const TargetDragContext&);
@@ -54,7 +54,7 @@ public:
TargetDragContext( DropTarget* pTarget);
~TargetDragContext();
- virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation )
+ virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation )
throw( RuntimeException);
virtual void SAL_CALL rejectDrag( )
throw( RuntimeException);
diff --git a/dtrans/source/win32/dnd/targetdropcontext.cxx b/dtrans/source/win32/dnd/targetdropcontext.cxx
index 87bcddb87498..de8aac4944be 100644
--- a/dtrans/source/win32/dnd/targetdropcontext.cxx
+++ b/dtrans/source/win32/dnd/targetdropcontext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,19 +51,19 @@ TargetDropContext::~TargetDropContext()
g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
}
-void SAL_CALL TargetDropContext::acceptDrop( sal_Int8 dropOperation )
+void SAL_CALL TargetDropContext::acceptDrop( sal_Int8 dropOperation )
throw( RuntimeException)
{
m_pDropTarget->_acceptDrop( dropOperation, static_cast<XDropTargetDropContext*>( this) );
}
-void SAL_CALL TargetDropContext::rejectDrop( )
+void SAL_CALL TargetDropContext::rejectDrop( )
throw( RuntimeException)
{
m_pDropTarget->_rejectDrop( static_cast<XDropTargetDropContext*>( this) );
}
-
-void SAL_CALL TargetDropContext::dropComplete( sal_Bool success )
+
+void SAL_CALL TargetDropContext::dropComplete( sal_Bool success )
throw( RuntimeException)
{
m_pDropTarget->_dropComplete( success, static_cast<XDropTargetDropContext*>( this) );
diff --git a/dtrans/source/win32/dnd/targetdropcontext.hxx b/dtrans/source/win32/dnd/targetdropcontext.hxx
index f5cc4670a824..8e41af892f4f 100644
--- a/dtrans/source/win32/dnd/targetdropcontext.hxx
+++ b/dtrans/source/win32/dnd/targetdropcontext.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,21 +53,21 @@ public:
~TargetDropContext();
- // XDropTargetDragContext
- virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation )
+ // XDropTargetDragContext
+ virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation )
throw( RuntimeException);
- virtual void SAL_CALL rejectDrop( )
+ virtual void SAL_CALL rejectDrop( )
throw( RuntimeException);
-
-/* virtual Sequence< DataFlavor > SAL_CALL getCurrentDataFlavors( )
+
+/* virtual Sequence< DataFlavor > SAL_CALL getCurrentDataFlavors( )
throw( RuntimeException);
- virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& df )
+ virtual sal_Bool SAL_CALL isDataFlavorSupported( const DataFlavor& df )
throw( RuntimeException);
*/
// XDropTargetDropContext (inherits XDropTargetDragContext)
- virtual void SAL_CALL dropComplete( sal_Bool success )
+ virtual void SAL_CALL dropComplete( sal_Bool success )
throw( RuntimeException);
};
#endif
diff --git a/dtrans/source/win32/dtobj/APNDataObject.cxx b/dtrans/source/win32/dtobj/APNDataObject.cxx
index 80a8c1e737e6..1cae8652d310 100644
--- a/dtrans/source/win32/dtobj/APNDataObject.cxx
+++ b/dtrans/source/win32/dtobj/APNDataObject.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,8 +44,8 @@
// defines
//------------------------------------------------------------------------
-#define FREE_HGLOB_ON_RELEASE TRUE
-#define KEEP_HGLOB_ON_RELEASE FALSE
+#define FREE_HGLOB_ON_RELEASE TRUE
+#define KEEP_HGLOB_ON_RELEASE FALSE
//------------------------------------------------------------------------
// ctor
@@ -55,58 +55,58 @@ CAPNDataObject::CAPNDataObject( IDataObjectPtr rIDataObject ) :
m_rIDataObjectOrg( rIDataObject ),
m_hGlobal( NULL ),
m_nRefCnt( 0 )
-{
-
+{
+
OSL_ENSURE( m_rIDataObjectOrg.get( ), "constructing CAPNDataObject with empty data object" );
-
+
// we marshal the IDataObject interface pointer here so
- // that it can be unmarshaled multiple times when this
+ // that it can be unmarshaled multiple times when this
// class will be used from another apartment
IStreamPtr pStm;
HRESULT hr = CreateStreamOnHGlobal( 0, KEEP_HGLOB_ON_RELEASE, &pStm );
-
+
OSL_ENSURE( E_INVALIDARG != hr, "invalid args passed to CreateStreamOnHGlobal" );
if ( SUCCEEDED( hr ) )
- {
- HRESULT hr_marshal = CoMarshalInterface(
- pStm.get(),
- __uuidof(IDataObject),
+ {
+ HRESULT hr_marshal = CoMarshalInterface(
+ pStm.get(),
+ __uuidof(IDataObject),
static_cast<LPUNKNOWN>(m_rIDataObjectOrg.get()),
MSHCTX_LOCAL,
NULL,
MSHLFLAGS_TABLEWEAK );
-
+
OSL_ENSURE( CO_E_NOTINITIALIZED != hr_marshal, "COM is not initialized" );
- // marshalling may fail if COM is not initialized
+ // marshalling may fail if COM is not initialized
// for the calling thread which is a program time
// error or because of stream errors which are runtime
// errors for instance E_OUTOFMEMORY etc.
-
+
hr = GetHGlobalFromStream(pStm.get(), &m_hGlobal );
OSL_ENSURE( E_INVALIDARG != hr, "invalid stream passed to GetHGlobalFromStream" );
- // if the marshalling failed we free the
+ // if the marshalling failed we free the
// global memory again and set m_hGlobal
// to a defined value
if (FAILED(hr_marshal))
{
OSL_ENSURE(sal_False, "marshalling failed");
-
+
#if OSL_DEBUG_LEVEL > 0
HGLOBAL hGlobal =
#endif
- GlobalFree(m_hGlobal);
+ GlobalFree(m_hGlobal);
OSL_ENSURE(NULL == hGlobal, "GlobalFree failed");
m_hGlobal = NULL;
}
- }
+ }
}
CAPNDataObject::~CAPNDataObject( )
-{
+{
if (m_hGlobal)
{
IStreamPtr pStm;
@@ -119,7 +119,7 @@ CAPNDataObject::~CAPNDataObject( )
hr = CoReleaseMarshalData(pStm.get());
OSL_ENSURE(SUCCEEDED(hr), "CoReleaseMarshalData failed");
}
- }
+ }
}
//------------------------------------------------------------------------
@@ -127,7 +127,7 @@ CAPNDataObject::~CAPNDataObject( )
//------------------------------------------------------------------------
STDMETHODIMP CAPNDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
-{
+{
OSL_ASSERT( NULL != ppvObject );
if ( NULL == ppvObject )
@@ -143,7 +143,7 @@ STDMETHODIMP CAPNDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
hr = S_OK;
}
- return hr;
+ return hr;
}
//------------------------------------------------------------------------
@@ -161,7 +161,7 @@ STDMETHODIMP_(ULONG) CAPNDataObject::AddRef( )
STDMETHODIMP_(ULONG) CAPNDataObject::Release( )
{
- // we need a helper variable because it's not allowed to access
+ // we need a helper variable because it's not allowed to access
// a member variable after an object is destroyed
ULONG nRefCnt = static_cast< ULONG >( InterlockedDecrement( &m_nRefCnt ) );
@@ -176,16 +176,16 @@ STDMETHODIMP_(ULONG) CAPNDataObject::Release( )
//------------------------------------------------------------------------
STDMETHODIMP CAPNDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium )
-{
+{
HRESULT hr = m_rIDataObjectOrg->GetData( pFormatetc, pmedium );
-
+
if (RPC_E_WRONG_THREAD == hr)
{
IDataObjectPtr pIDOTmp;
hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp);
if (SUCCEEDED(hr))
- hr = pIDOTmp->GetData(pFormatetc, pmedium);
+ hr = pIDOTmp->GetData(pFormatetc, pmedium);
}
return hr;
}
@@ -205,7 +205,7 @@ STDMETHODIMP CAPNDataObject::EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC**
if (SUCCEEDED(hr))
hr = pIDOTmp->EnumFormatEtc(dwDirection, ppenumFormatetc);
- }
+ }
return hr;
}
@@ -218,12 +218,12 @@ STDMETHODIMP CAPNDataObject::QueryGetData( LPFORMATETC pFormatetc )
HRESULT hr = m_rIDataObjectOrg->QueryGetData( pFormatetc );
if (RPC_E_WRONG_THREAD == hr)
- {
+ {
IDataObjectPtr pIDOTmp;
hr = MarshalIDataObjectIntoCurrentApartment( &pIDOTmp );
if (SUCCEEDED(hr))
- hr = pIDOTmp->QueryGetData(pFormatetc);
+ hr = pIDOTmp->QueryGetData(pFormatetc);
}
return hr;
}
@@ -242,8 +242,8 @@ STDMETHODIMP CAPNDataObject::GetDataHere( LPFORMATETC pFormatetc, LPSTGMEDIUM pm
hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp);
if (SUCCEEDED(hr))
- hr = pIDOTmp->GetDataHere(pFormatetc, pmedium);
- }
+ hr = pIDOTmp->GetDataHere(pFormatetc, pmedium);
+ }
return hr;
}
@@ -262,7 +262,7 @@ STDMETHODIMP CAPNDataObject::GetCanonicalFormatEtc(LPFORMATETC pFormatectIn, LPF
if (SUCCEEDED(hr))
hr = pIDOTmp->GetCanonicalFormatEtc(pFormatectIn, pFormatetcOut);
- }
+ }
return hr;
}
@@ -280,8 +280,8 @@ STDMETHODIMP CAPNDataObject::SetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmediu
hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp);
if (SUCCEEDED(hr))
- hr = pIDOTmp->SetData(pFormatetc, pmedium, fRelease);
- }
+ hr = pIDOTmp->SetData(pFormatetc, pmedium, fRelease);
+ }
return hr;
}
@@ -299,8 +299,8 @@ STDMETHODIMP CAPNDataObject::DAdvise( LPFORMATETC pFormatetc, DWORD advf, LPADVI
hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp);
if (SUCCEEDED(hr))
- hr = pIDOTmp->DAdvise(pFormatetc, advf, pAdvSink, pdwConnection);
- }
+ hr = pIDOTmp->DAdvise(pFormatetc, advf, pAdvSink, pdwConnection);
+ }
return hr;
}
@@ -318,8 +318,8 @@ STDMETHODIMP CAPNDataObject::DUnadvise( DWORD dwConnection )
hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp);
if (SUCCEEDED(hr))
- hr = pIDOTmp->DUnadvise(dwConnection);
- }
+ hr = pIDOTmp->DUnadvise(dwConnection);
+ }
return hr;
}
@@ -337,8 +337,8 @@ STDMETHODIMP CAPNDataObject::EnumDAdvise( LPENUMSTATDATA * ppenumAdvise )
hr = MarshalIDataObjectIntoCurrentApartment(&pIDOTmp);
if (SUCCEEDED(hr))
- hr = pIDOTmp->EnumDAdvise(ppenumAdvise);
- }
+ hr = pIDOTmp->EnumDAdvise(ppenumAdvise);
+ }
return hr;
}
@@ -361,20 +361,20 @@ HRESULT CAPNDataObject::MarshalIDataObjectIntoCurrentApartment( IDataObject** pp
*ppIDataObj = NULL;
HRESULT hr = E_FAIL;
-
+
if (m_hGlobal)
{
IStreamPtr pStm;
hr = CreateStreamOnHGlobal(m_hGlobal, KEEP_HGLOB_ON_RELEASE, &pStm);
-
+
OSL_ENSURE(E_INVALIDARG != hr, "CreateStreamOnHGlobal with invalid args called");
if (SUCCEEDED(hr))
{
- hr = CoUnmarshalInterface(pStm.get(), __uuidof(IDataObject), (void**)ppIDataObj);
+ hr = CoUnmarshalInterface(pStm.get(), __uuidof(IDataObject), (void**)ppIDataObj);
OSL_ENSURE(CO_E_NOTINITIALIZED != hr, "COM is not initialized");
}
- }
+ }
return hr;
}
diff --git a/dtrans/source/win32/dtobj/APNDataObject.hxx b/dtrans/source/win32/dtobj/APNDataObject.hxx
index cd9bd2f9a5b0..23fce0f674e6 100644
--- a/dtrans/source/win32/dtobj/APNDataObject.hxx
+++ b/dtrans/source/win32/dtobj/APNDataObject.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,13 +39,13 @@
/*
an APartment Neutral dataobject wrapper; this wrapper of a IDataObject
pointer can be used from any apartment without RPC_E_WRONG_THREAD
- which normally occurs if an apartment tries to use an interface
+ which normally occurs if an apartment tries to use an interface
pointer of another apartment; we use containment to hold the original
DataObject
*/
class CAPNDataObject : public IDataObject
{
-public:
+public:
CAPNDataObject( IDataObjectPtr rIDataObject );
virtual ~CAPNDataObject( );
@@ -78,8 +78,8 @@ private:
private:
IDataObjectPtr m_rIDataObjectOrg;
- HGLOBAL m_hGlobal;
- LONG m_nRefCnt;
+ HGLOBAL m_hGlobal;
+ LONG m_nRefCnt;
// prevent copy and assignment
private:
diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index 5c051da5678d..630f08b2f955 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,7 +69,7 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::container;
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
namespace
@@ -81,7 +81,7 @@ namespace
sal_Bool isValidFlavor( const DataFlavor& aFlavor )
{
return ( aFlavor.MimeType.getLength( ) &&
- ( ( aFlavor.DataType == CPPUTYPE_SEQINT8 ) ||
+ ( ( aFlavor.DataType == CPPUTYPE_SEQINT8 ) ||
( aFlavor.DataType == CPPUTYPE_OUSTRING ) ) );
}
@@ -92,21 +92,21 @@ namespace
// ctor
//------------------------------------------------------------------------
-CDOTransferable::CDOTransferable(
+CDOTransferable::CDOTransferable(
const Reference< XMultiServiceFactory >& ServiceManager, IDataObjectPtr rDataObject ) :
m_rDataObject( rDataObject ),
m_SrvMgr( ServiceManager ),
m_DataFormatTranslator( m_SrvMgr ),
m_bUnicodeRegistered( sal_False ),
m_TxtFormatOnClipboard( CF_INVALID )
-{
+{
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
+Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
throw( UnsupportedFlavorException, IOException, RuntimeException )
{
OSL_ASSERT( isValidFlavor( aFlavor ) );
@@ -121,21 +121,21 @@ Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
OSL_ASSERT( CF_INVALID != fetc.getClipformat() );
//------------------------------------------------
- // get the data from clipboard in a byte stream
+ // get the data from clipboard in a byte stream
//------------------------------------------------
-
+
ByteSequence_t clipDataStream;
-
+
try
{
clipDataStream = getClipboardData( fetc );
}
catch( UnsupportedFlavorException& )
{
- if ( m_DataFormatTranslator.isUnicodeTextFormat( fetc.getClipformat( ) ) &&
+ if ( m_DataFormatTranslator.isUnicodeTextFormat( fetc.getClipformat( ) ) &&
m_bUnicodeRegistered )
{
- OUString aUnicodeText = synthesizeUnicodeText( );
+ OUString aUnicodeText = synthesizeUnicodeText( );
Any aAny = makeAny( aUnicodeText );
return aAny;
}
@@ -154,19 +154,19 @@ Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
// getTransferDataFlavors
//------------------------------------------------------------------------
-Sequence< DataFlavor > SAL_CALL CDOTransferable::getTransferDataFlavors( )
+Sequence< DataFlavor > SAL_CALL CDOTransferable::getTransferDataFlavors( )
throw( RuntimeException )
-{
- return m_FlavorList;
+{
+ return m_FlavorList;
}
//------------------------------------------------------------------------
// isDataFlavorSupported
-// returns true if we find a DataFlavor with the same MimeType and
+// returns true if we find a DataFlavor with the same MimeType and
// DataType
//------------------------------------------------------------------------
-sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
+sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
throw( RuntimeException )
{
OSL_ASSERT( isValidFlavor( aFlavor ) );
@@ -181,7 +181,7 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla
//------------------------------------------------------------------------
// 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
+// only once; if the client of this Transferable will hold a reference
// to it und the underlying clipboard content changes, the client does
// possible operate on a invalid list
// if there is only text on the clipboard we will also offer unicode text
@@ -197,7 +197,7 @@ void SAL_CALL CDOTransferable::initFlavorList( )
if ( SUCCEEDED( hr ) )
{
pEnumFormatEtc->Reset( );
-
+
FORMATETC fetc;
while ( S_FALSE != pEnumFormatEtc->Next( 1, &fetc, NULL ) )
{
@@ -206,9 +206,9 @@ void SAL_CALL CDOTransferable::initFlavorList( )
// we don't offer this format
if ( CF_LOCALE == fetc.cfFormat )
continue;
-
- DataFlavor aFlavor = formatEtcToDataFlavor( fetc );
-
+
+ DataFlavor aFlavor = formatEtcToDataFlavor( fetc );
+
// if text or oemtext is offered we also pretend to have unicode text
if ( m_DataFormatTranslator.isOemOrAnsiTextFormat( fetc.cfFormat ) &&
!m_bUnicodeRegistered )
@@ -219,7 +219,7 @@ void SAL_CALL CDOTransferable::initFlavorList( )
m_bUnicodeRegistered = sal_True;
// register unicode text as accompany format
- aFlavor = formatEtcToDataFlavor(
+ aFlavor = formatEtcToDataFlavor(
m_DataFormatTranslator.getFormatEtcForClipformat( CF_UNICODETEXT ) );
addSupportedFlavor( aFlavor );
}
@@ -233,12 +233,12 @@ void SAL_CALL CDOTransferable::initFlavorList( )
// see MSDN IEnumFORMATETC
CoTaskMemFree( fetc.ptd );
- }
- }
+ }
+ }
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
inline
@@ -255,20 +255,20 @@ void SAL_CALL CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor )
}
//------------------------------------------------------------------------
-// helper function
+// helper function
//------------------------------------------------------------------------
//inline
DataFlavor SAL_CALL CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFormatEtc )
-{
+{
DataFlavor aFlavor;
LCID lcid = 0;
-
+
// for non-unicode text format we must provid a locale to get
// the character-set of the text, if there is no locale on the
// clipboard we assume the text is in a charset appropriate for
// the current thread locale
- if ( (CF_TEXT == aFormatEtc.cfFormat) || (CF_OEMTEXT == aFormatEtc.cfFormat) )
+ if ( (CF_TEXT == aFormatEtc.cfFormat) || (CF_OEMTEXT == aFormatEtc.cfFormat) )
lcid = getLocaleFromClipboard( );
return m_DataFormatTranslator.getDataFlavorFromFormatEtc( aFormatEtc, lcid );
@@ -279,22 +279,22 @@ DataFlavor SAL_CALL CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFo
// clipboard the function returns the current thread locale
//------------------------------------------------------------------------
-LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( )
+LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( )
{
LCID lcid = GetThreadLocale( );
try
- {
+ {
CFormatEtc fetc = m_DataFormatTranslator.getFormatEtcForClipformat( CF_LOCALE );
ByteSequence_t aLCIDSeq = getClipboardData( fetc );
lcid = *(reinterpret_cast<LCID*>( aLCIDSeq.getArray( ) ) );
-
- // because of a Win95/98 Bug; there the high word
+
+ // because of a Win95/98 Bug; there the high word
// of a locale has the same value as the
// low word e.g. 0x07040704 that's not right
// correct is 0x00000704
- lcid &= 0x0000FFFF;
- }
+ lcid &= 0x0000FFFF;
+ }
catch(...)
{
// we take the default locale
@@ -310,27 +310,27 @@ LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( )
//------------------------------------------------------------------------
CDOTransferable::ByteSequence_t SAL_CALL CDOTransferable::getClipboardData( CFormatEtc& aFormatEtc )
-{
+{
STGMEDIUM stgmedium;
HRESULT hr = m_rDataObject->GetData( aFormatEtc, &stgmedium );
-
+
// in case of failure to get a WMF metafile handle, try to get a memory block
- if( FAILED( hr ) &&
- ( CF_METAFILEPICT == aFormatEtc.getClipformat() ) &&
+ if( FAILED( hr ) &&
+ ( CF_METAFILEPICT == aFormatEtc.getClipformat() ) &&
( TYMED_MFPICT == aFormatEtc.getTymed() ) )
{
CFormatEtc aTempFormat( aFormatEtc );
aTempFormat.setTymed( TYMED_HGLOBAL );
hr = m_rDataObject->GetData( aTempFormat, &stgmedium );
}
-
- if ( FAILED( hr ) )
+
+ if ( FAILED( hr ) )
{
- OSL_ASSERT( (hr != E_INVALIDARG) &&
+ OSL_ASSERT( (hr != E_INVALIDARG) &&
(hr != DV_E_DVASPECT) &&
(hr != DV_E_LINDEX) &&
(hr != DV_E_TYMED) );
-
+
if ( DV_E_FORMATETC == hr )
throw UnsupportedFlavorException( );
else if ( STG_E_MEDIUMFULL == hr )
@@ -338,61 +338,61 @@ CDOTransferable::ByteSequence_t SAL_CALL CDOTransferable::getClipboardData( CFor
else
throw RuntimeException( );
}
-
+
ByteSequence_t byteStream;
try
- {
+ {
if ( CF_ENHMETAFILE == aFormatEtc.getClipformat() )
- byteStream = WinENHMFPictToOOMFPict( stgmedium.hEnhMetaFile );
+ byteStream = WinENHMFPictToOOMFPict( stgmedium.hEnhMetaFile );
else if (CF_HDROP == aFormatEtc.getClipformat())
- byteStream = CF_HDROPToFileList(stgmedium.hGlobal);
+ byteStream = CF_HDROPToFileList(stgmedium.hGlobal);
else
{
clipDataToByteStream( aFormatEtc.getClipformat( ), stgmedium, byteStream );
-
+
// format conversion if necessary
if ( CF_DIB == aFormatEtc.getClipformat() )
byteStream = WinDIBToOOBMP( byteStream );
else if ( CF_METAFILEPICT == aFormatEtc.getClipformat() )
- byteStream = WinMFPictToOOMFPict( byteStream );
+ byteStream = WinMFPictToOOMFPict( byteStream );
}
ReleaseStgMedium( &stgmedium );
}
catch( CStgTransferHelper::CStgTransferException& )
- {
+ {
ReleaseStgMedium( &stgmedium );
throw IOException( );
- }
+ }
return byteStream;
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
OUString SAL_CALL CDOTransferable::synthesizeUnicodeText( )
-{
+{
ByteSequence_t aTextSequence;
- CFormatEtc fetc;
- LCID lcid = getLocaleFromClipboard( );
- sal_uInt32 cpForTxtCnvt = 0;
-
+ CFormatEtc fetc;
+ LCID lcid = getLocaleFromClipboard( );
+ sal_uInt32 cpForTxtCnvt = 0;
+
if ( CF_TEXT == m_TxtFormatOnClipboard )
{
fetc = m_DataFormatTranslator.getFormatEtcForClipformat( CF_TEXT );
aTextSequence = getClipboardData( fetc );
-
+
// determine the codepage used for text conversion
- cpForTxtCnvt = getWinCPFromLocaleId( lcid, LOCALE_IDEFAULTANSICODEPAGE ).toInt32( );
+ cpForTxtCnvt = getWinCPFromLocaleId( lcid, LOCALE_IDEFAULTANSICODEPAGE ).toInt32( );
}
else if ( CF_OEMTEXT == m_TxtFormatOnClipboard )
{
fetc = m_DataFormatTranslator.getFormatEtcForClipformat( CF_OEMTEXT );
aTextSequence = getClipboardData( fetc );
-
+
// determine the codepage used for text conversion
cpForTxtCnvt = getWinCPFromLocaleId( lcid, LOCALE_IDEFAULTCODEPAGE ).toInt32( );
}
@@ -407,15 +407,15 @@ OUString SAL_CALL CDOTransferable::synthesizeUnicodeText( )
sal::static_int_cast<sal_uInt32>(-1), // Huh ?
stgTransferHelper,
sal_False);
-
- CRawHGlobalPtr ptrHGlob(stgTransferHelper);
- sal_Unicode* pWChar = reinterpret_cast<sal_Unicode*>(ptrHGlob.GetMemPtr());
-
+
+ CRawHGlobalPtr ptrHGlob(stgTransferHelper);
+ sal_Unicode* pWChar = reinterpret_cast<sal_Unicode*>(ptrHGlob.GetMemPtr());
+
return OUString(pWChar);
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CDOTransferable::clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium, ByteSequence_t& aByteSequence )
@@ -446,25 +446,25 @@ void CDOTransferable::clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium,
throw UnsupportedFlavorException( );
break;
}
-
+
int nMemSize = memTransferHelper.memSize( cf );
aByteSequence.realloc( nMemSize );
- memTransferHelper.read( aByteSequence.getArray( ), nMemSize );
+ memTransferHelper.read( aByteSequence.getArray( ), nMemSize );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-inline
+inline
Any CDOTransferable::byteStreamToAny( ByteSequence_t& aByteStream, const Type& aRequestedDataType )
-{
+{
Any aAny;
- if ( aRequestedDataType == CPPUTYPE_OUSTRING )
- {
+ if ( aRequestedDataType == CPPUTYPE_OUSTRING )
+ {
OUString str = byteStreamToOUString( aByteStream );
- aAny = makeAny( str );
+ aAny = makeAny( str );
}
else
aAny = makeAny( aByteStream );
@@ -473,17 +473,17 @@ Any CDOTransferable::byteStreamToAny( ByteSequence_t& aByteStream, const Type& a
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-inline
+inline
OUString CDOTransferable::byteStreamToOUString( ByteSequence_t& aByteStream )
{
sal_Int32 nWChars;
sal_Int32 nMemSize = aByteStream.getLength( );
// if there is a trailing L"\0" substract 1 from length
- if ( 0 == aByteStream[ aByteStream.getLength( ) - 2 ] &&
+ if ( 0 == aByteStream[ aByteStream.getLength( ) - 2 ] &&
0 == aByteStream[ aByteStream.getLength( ) - 1 ] )
nWChars = static_cast< sal_Int32 >( nMemSize / sizeof( sal_Unicode ) ) - 1;
else
@@ -493,15 +493,15 @@ OUString CDOTransferable::byteStreamToOUString( ByteSequence_t& aByteStream )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
+sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
const DataFlavor& lhs, const DataFlavor& rhs )
{
if ( !m_rXMimeCntFactory.is( ) )
{
- m_rXMimeCntFactory = Reference< XMimeContentTypeFactory >( m_SrvMgr->createInstance(
+ m_rXMimeCntFactory = Reference< XMimeContentTypeFactory >( m_SrvMgr->createInstance(
OUString::createFromAscii( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY );
}
OSL_ASSERT( m_rXMimeCntFactory.is( ) );
@@ -528,20 +528,20 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-sal_Bool SAL_CALL CDOTransferable::cmpFullMediaType(
+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(
+sal_Bool SAL_CALL CDOTransferable::cmpAllContentTypeParameter(
const Reference< XMimeContentType >& xLhs, const Reference< XMimeContentType >& xRhs ) const
{
Sequence< OUString > xLhsFlavors = xLhs->getParameters( );
@@ -556,7 +556,7 @@ sal_Bool SAL_CALL CDOTransferable::cmpAllContentTypeParameter(
OUString pRhs;
for ( sal_Int32 i = 0; i < xLhsFlavors.getLength( ); i++ )
- {
+ {
pLhs = xLhs->getParameterValue( xLhsFlavors[i] );
pRhs = xRhs->getParameterValue( xLhsFlavors[i] );
@@ -594,13 +594,13 @@ sal_Bool SAL_CALL CDOTransferable::cmpAllContentTypeParameter(
{
if (m_rDataObject.is())
{
- IDataObject* pObj= m_rDataObject.get();
+ IDataObject* pObj= m_rDataObject.get();
pObj->AddRef();
retVal.setValue( &pObj, getCppuType((sal_uInt32*)0));
}
}
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 eec3c5bb34cd..bdf31dc4ba44 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.hxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,25 +62,25 @@ public:
// XTransferable
//------------------------------------------------------------------------
- virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
+ 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 );
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( )
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( )
throw( ::com::sun::star::uno::RuntimeException );
-
- virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
+
+ 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::lang::XMultiServiceFactory >& ServiceManager,
+ explicit CDOTransferable(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ServiceManager,
IDataObjectPtr rDataObject );
//------------------------------------------------------------------------
@@ -88,38 +88,38 @@ private:
//------------------------------------------------------------------------
void SAL_CALL initFlavorList( );
-
- void SAL_CALL addSupportedFlavor( const com::sun::star::datatransfer::DataFlavor& aFlavor );
+
+ void SAL_CALL addSupportedFlavor( const com::sun::star::datatransfer::DataFlavor& aFlavor );
com::sun::star::datatransfer::DataFlavor SAL_CALL formatEtcToDataFlavor( const FORMATETC& aFormatEtc );
ByteSequence_t SAL_CALL getClipboardData( CFormatEtc& aFormatEtc );
rtl::OUString SAL_CALL synthesizeUnicodeText( );
- void SAL_CALL clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium, ByteSequence_t& aByteSequence );
-
+ void SAL_CALL clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium, ByteSequence_t& aByteSequence );
+
::com::sun::star::uno::Any SAL_CALL byteStreamToAny( ByteSequence_t& aByteStream, const com::sun::star::uno::Type& aRequestedDataType );
- rtl::OUString SAL_CALL byteStreamToOUString( ByteSequence_t& aByteStream );
-
+ rtl::OUString SAL_CALL byteStreamToOUString( ByteSequence_t& aByteStream );
+
LCID SAL_CALL getLocaleFromClipboard( );
sal_Bool SAL_CALL compareDataFlavors( const com::sun::star::datatransfer::DataFlavor& lhs,
const com::sun::star::datatransfer::DataFlavor& rhs );
- sal_Bool SAL_CALL cmpFullMediaType( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentType >& xLhs,
+ sal_Bool SAL_CALL cmpFullMediaType( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentType >& xLhs,
const com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentType >& xRhs ) const;
- sal_Bool SAL_CALL cmpAllContentTypeParameter( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentType >& xLhs,
+ sal_Bool SAL_CALL cmpAllContentTypeParameter( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentType >& xLhs,
const com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentType >& xRhs ) const;
private:
- IDataObjectPtr m_rDataObject;
- com::sun::star::uno::Sequence< com::sun::star::datatransfer::DataFlavor > m_FlavorList;
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
- CDataFormatTranslator m_DataFormatTranslator;
+ IDataObjectPtr m_rDataObject;
+ com::sun::star::uno::Sequence< com::sun::star::datatransfer::DataFlavor > m_FlavorList;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
+ CDataFormatTranslator m_DataFormatTranslator;
com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentTypeFactory > m_rXMimeCntFactory;
- ::osl::Mutex m_aMutex;
- sal_Bool m_bUnicodeRegistered;
- CLIPFORMAT m_TxtFormatOnClipboard;
+ ::osl::Mutex m_aMutex;
+ sal_Bool m_bUnicodeRegistered;
+ CLIPFORMAT m_TxtFormatOnClipboard;
// non supported operations
private:
diff --git a/dtrans/source/win32/dtobj/DTransHelper.cxx b/dtrans/source/win32/dtobj/DTransHelper.cxx
index 34db85ffeed9..2b512092f0f1 100644
--- a/dtrans/source/win32/dtobj/DTransHelper.cxx
+++ b/dtrans/source/win32/dtobj/DTransHelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dtrans/source/win32/dtobj/DTransHelper.hxx b/dtrans/source/win32/dtobj/DTransHelper.hxx
index 0e6003211f90..0c8ee5b92182 100644
--- a/dtrans/source/win32/dtobj/DTransHelper.hxx
+++ b/dtrans/source/win32/dtobj/DTransHelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,9 +75,9 @@ public:
};
public:
- CStgTransferHelper(
- sal_Bool bAutoInit = sal_False,
- HGLOBAL hGlob = NULL,
+ CStgTransferHelper(
+ sal_Bool bAutoInit = sal_False,
+ HGLOBAL hGlob = NULL,
sal_Bool bDelStgOnRelease = sal_False );
~CStgTransferHelper( );
@@ -88,25 +88,25 @@ public:
HGLOBAL SAL_CALL getHGlobal( ) const;
void SAL_CALL getIStream( LPSTREAM* ppStream );
- void SAL_CALL init(
- SIZE_T newSize,
- sal_uInt32 uiFlags = GHND,
+ void SAL_CALL init(
+ SIZE_T newSize,
+ sal_uInt32 uiFlags = GHND,
sal_Bool bDelStgOnRelease = sal_False );
- void SAL_CALL init(
- HGLOBAL hGlob,
+ void SAL_CALL init(
+ HGLOBAL hGlob,
sal_Bool bDelStgOnRelease = sal_False );
// returns the size of the managed memory
sal_uInt32 SAL_CALL memSize( CLIPFORMAT cf = CF_INVALID ) const;
-
- // free the global memory and necessary
+
+ // free the global memory and necessary
// release the internal stream pointer
void SAL_CALL cleanup( );
private:
LPSTREAM m_lpStream;
- sal_Bool m_bDelStgOnRelease;
+ sal_Bool m_bDelStgOnRelease;
private:
CStgTransferHelper( const CStgTransferHelper& );
@@ -115,7 +115,7 @@ private:
//-------------------------------------------------------------------------
// something like an auto-pointer - allows access to the memory belonging
-// to a HGLOBAL and automatically unlocks a global memory at destruction
+// to a HGLOBAL and automatically unlocks a global memory at destruction
// time
//-------------------------------------------------------------------------
@@ -133,7 +133,7 @@ public:
m_pGlobMem( NULL )
{
}
-
+
//---------------------------------------------
// ctor
@@ -157,7 +157,7 @@ public:
}
//---------------------------------------------
- // lock the global memory (initializes a
+ // lock the global memory (initializes a
// pointer to this memory)
//---------------------------------------------
@@ -182,17 +182,17 @@ public:
GlobalUnlock( m_hGlob );
m_bIsLocked = FALSE;
m_pGlobMem = NULL;
-
+
return ( NO_ERROR == GetLastError( ) );
}
//---------------------------------------------
- // locks the global memory and returns a
+ // locks the global memory and returns a
// pointer to this memory
//---------------------------------------------
LPVOID GetMemPtr( )
- {
+ {
Lock( );
return m_pGlobMem;
}
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
index c832a7a24996..fe5845f2558e 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,7 @@
#if defined _MSC_VER
#pragma warning(pop)
#endif
-
+
//------------------------------------------------------------------------
// namespace directives
@@ -84,22 +84,22 @@ const OUString HTML_FORMAT_NAME_WINDOWS = OUString::createFromAscii( "HTML Forma
const OUString HTML_FORMAT_NAME_SOFFICE = OUString::createFromAscii( "HTML (HyperText Markup Language)" );
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFactory >& aServiceManager ) :
m_SrvMgr( aServiceManager )
{
m_XDataFormatTranslator = Reference< XDataFormatTranslator >(
- m_SrvMgr->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.DataFormatTranslator" ) ), UNO_QUERY );
+ m_SrvMgr->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.DataFormatTranslator" ) ), UNO_QUERY );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor& aDataFlavor ) const
-{
+{
sal_Int32 cf = CF_INVALID;
try
@@ -107,21 +107,21 @@ CFormatEtc CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor&
if( m_XDataFormatTranslator.is( ) )
{
Any aFormat = m_XDataFormatTranslator->getSystemDataTypeFromDataFlavor( aDataFlavor );
-
+
if ( aFormat.hasValue( ) )
{
if ( aFormat.getValueType( ) == CPPUTYPE_SALINT32 )
{
- aFormat >>= cf;
+ aFormat >>= cf;
OSL_ENSURE( CF_INVALID != cf, "Invalid Clipboard format delivered" );
}
else if ( aFormat.getValueType( ) == CPPUTYPE_OUSTRING )
{
OUString aClipFmtName;
aFormat >>= aClipFmtName;
-
+
OSL_ASSERT( aClipFmtName.getLength( ) );
- cf = RegisterClipboardFormatW( reinterpret_cast<LPCWSTR>(aClipFmtName.getStr( )) );
+ cf = RegisterClipboardFormatW( reinterpret_cast<LPCWSTR>(aClipFmtName.getStr( )) );
OSL_ENSURE( CF_INVALID != cf, "RegisterClipboardFormat failed" );
}
@@ -139,13 +139,13 @@ CFormatEtc CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor&
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& aFormatEtc, LCID lcid ) const
{
DataFlavor aFlavor;
-
+
try
{
CLIPFORMAT aClipformat = aFormatEtc.cfFormat;
@@ -154,12 +154,12 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& a
aAny <<= static_cast< sal_Int32 >( aClipformat );
if ( isOemOrAnsiTextFormat( aClipformat ) )
- {
+ {
aFlavor.MimeType = TEXT_PLAIN_CHARSET;
aFlavor.MimeType += getTextCharsetFromLCID( lcid, aClipformat );
aFlavor.HumanPresentableName = HPNAME_OEM_ANSI_TEXT;
- aFlavor.DataType = CPPUTYPE_SEQSALINT8;
+ aFlavor.DataType = CPPUTYPE_SEQSALINT8;
}
else if ( CF_INVALID != aClipformat )
{
@@ -173,7 +173,7 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& a
// failed, so we try to resolve via clipboard
// format name
OUString clipFormatName = getClipboardFormatName( aClipformat );
-
+
// if we could not get a clipboard format name an
// error must have occured or it is a standard
// clipboard format that we don't translate, e.g.
@@ -196,7 +196,7 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& a
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformatName( const OUString& aClipFmtName ) const
@@ -210,7 +210,7 @@ CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformatName( const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
OUString CDataFormatTranslator::getClipboardFormatName( CLIPFORMAT aClipformat ) const
@@ -224,7 +224,7 @@ OUString CDataFormatTranslator::getClipboardFormatName( CLIPFORMAT aClipformat )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT cf ) const
@@ -247,10 +247,10 @@ CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT
/*
hack: in order to paste urls copied by Internet Explorer
- with "copy link" we set the lindex member to 0
+ with "copy link" we set the lindex member to 0
but if we really want to support CFSTR_FILECONTENT and
the accompany format CFSTR_FILEDESCRIPTOR (FileGroupDescriptor)
- the client of the clipboard service has to provide a id
+ the client of the clipboard service has to provide a id
of which FileContents it wants to paste
see MSDN: "Handling Shell Data Transfer Scenarios"
*/
@@ -261,7 +261,7 @@ CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CDataFormatTranslator::isOemOrAnsiTextFormat( CLIPFORMAT cf ) const
@@ -270,7 +270,7 @@ sal_Bool SAL_CALL CDataFormatTranslator::isOemOrAnsiTextFormat( CLIPFORMAT cf )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CDataFormatTranslator::isUnicodeTextFormat( CLIPFORMAT cf ) const
@@ -279,16 +279,16 @@ sal_Bool SAL_CALL CDataFormatTranslator::isUnicodeTextFormat( CLIPFORMAT cf ) co
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-sal_Bool SAL_CALL CDataFormatTranslator::isTextFormat( CLIPFORMAT cf ) const
+sal_Bool SAL_CALL CDataFormatTranslator::isTextFormat( CLIPFORMAT cf ) const
{
return ( isOemOrAnsiTextFormat( cf ) || isUnicodeTextFormat( cf ) );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CDataFormatTranslator::isHTMLFormat( CLIPFORMAT cf ) const
@@ -298,17 +298,17 @@ sal_Bool SAL_CALL CDataFormatTranslator::isHTMLFormat( CLIPFORMAT cf ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CDataFormatTranslator::isTextHtmlFormat( CLIPFORMAT cf ) const
{
- OUString clipFormatName = getClipboardFormatName( cf );
+ OUString clipFormatName = getClipboardFormatName( cf );
return ( clipFormatName.equalsIgnoreAsciiCase( HTML_FORMAT_NAME_SOFFICE ) );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
OUString SAL_CALL CDataFormatTranslator::getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat ) const
@@ -317,22 +317,22 @@ OUString SAL_CALL CDataFormatTranslator::getTextCharsetFromLCID( LCID lcid, CLIP
OUString charset;
if ( CF_TEXT == aClipformat )
- {
- charset = getMimeCharsetFromLocaleId(
- lcid,
- LOCALE_IDEFAULTANSICODEPAGE,
+ {
+ charset = getMimeCharsetFromLocaleId(
+ lcid,
+ LOCALE_IDEFAULTANSICODEPAGE,
PRE_WINDOWS_CODEPAGE );
}
else if ( CF_OEMTEXT == aClipformat )
- {
- charset = getMimeCharsetFromLocaleId(
- lcid,
- LOCALE_IDEFAULTCODEPAGE,
- PRE_OEM_CODEPAGE );
+ {
+ charset = getMimeCharsetFromLocaleId(
+ lcid,
+ LOCALE_IDEFAULTCODEPAGE,
+ PRE_OEM_CODEPAGE );
}
else // CF_UNICODE
OSL_ASSERT( sal_False );
-
+
return charset;
}
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.hxx b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
index 58cf51a89f63..0ed9426bd69b 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.hxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,15 +57,15 @@ class CFormatEtc;
class CDataFormatTranslator
{
public:
- CDataFormatTranslator( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager );
+ CDataFormatTranslator( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager );
CFormatEtc getFormatEtcFromDataFlavor( const com::sun::star::datatransfer::DataFlavor& aDataFlavor ) const;
- com::sun::star::datatransfer::DataFlavor getDataFlavorFromFormatEtc(
+ com::sun::star::datatransfer::DataFlavor getDataFlavorFromFormatEtc(
const FORMATETC& aFormatEtc, LCID lcid = GetThreadLocale( ) ) const;
CFormatEtc SAL_CALL getFormatEtcForClipformat( CLIPFORMAT cf ) const;
CFormatEtc SAL_CALL getFormatEtcForClipformatName( const rtl::OUString& aClipFmtName ) const;
- rtl::OUString SAL_CALL getClipboardFormatName( CLIPFORMAT aClipformat ) const;
+ rtl::OUString SAL_CALL getClipboardFormatName( CLIPFORMAT aClipformat ) const;
sal_Bool SAL_CALL isHTMLFormat( CLIPFORMAT cf ) const;
sal_Bool SAL_CALL isTextHtmlFormat( CLIPFORMAT cf ) const;
@@ -73,12 +73,12 @@ public:
sal_Bool SAL_CALL isUnicodeTextFormat( CLIPFORMAT cf ) const;
sal_Bool SAL_CALL isTextFormat( CLIPFORMAT cf ) const;
-private:
+private:
rtl::OUString SAL_CALL getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat ) const;
private:
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
- com::sun::star::uno::Reference< com::sun::star::datatransfer::XDataFormatTranslator > m_XDataFormatTranslator;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
+ com::sun::star::uno::Reference< com::sun::star::datatransfer::XDataFormatTranslator > m_XDataFormatTranslator;
};
#endif
diff --git a/dtrans/source/win32/dtobj/DtObjFactory.cxx b/dtrans/source/win32/dtobj/DtObjFactory.cxx
index 0f69b389e8ce..581ef2b723c1 100644
--- a/dtrans/source/win32/dtobj/DtObjFactory.cxx
+++ b/dtrans/source/win32/dtobj/DtObjFactory.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,7 +66,7 @@ Reference< XTransferable > SAL_CALL CDTransObjFactory::createTransferableFromDat
pTransf->initFlavorList();
pTransf->release();
- return refDOTransf;
+ return refDOTransf;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dtobj/Fetc.cxx b/dtrans/source/win32/dtobj/Fetc.cxx
index f9bbe856436e..9443599ff479 100644
--- a/dtrans/source/win32/dtobj/Fetc.cxx
+++ b/dtrans/source/win32/dtobj/Fetc.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@
#include "..\misc\ImplHelper.hxx"
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc::CFormatEtc( )
@@ -59,7 +59,7 @@ CFormatEtc::CFormatEtc( const FORMATETC& aFormatEtc )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc::~CFormatEtc( )
@@ -68,7 +68,7 @@ CFormatEtc::~CFormatEtc( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc::CFormatEtc( CLIPFORMAT cf, DWORD tymed, DVTARGETDEVICE* ptd, DWORD dwAspect, LONG lindex )
@@ -77,11 +77,11 @@ CFormatEtc::CFormatEtc( CLIPFORMAT cf, DWORD tymed, DVTARGETDEVICE* ptd, DWORD d
m_FormatEtc.ptd = CopyTargetDevice( ptd );
m_FormatEtc.dwAspect = dwAspect;
m_FormatEtc.lindex = lindex;
- m_FormatEtc.tymed = tymed;
+ m_FormatEtc.tymed = tymed;
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc::CFormatEtc( const CFormatEtc& theOther )
@@ -94,7 +94,7 @@ CFormatEtc::CFormatEtc( const CFormatEtc& theOther )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc& CFormatEtc::operator=( const CFormatEtc& theOther )
@@ -114,7 +114,7 @@ CFormatEtc& CFormatEtc::operator=( const CFormatEtc& theOther )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc::operator FORMATETC*( )
@@ -123,7 +123,7 @@ CFormatEtc::operator FORMATETC*( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtc::operator FORMATETC( )
@@ -132,7 +132,7 @@ CFormatEtc::operator FORMATETC( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFormatEtc::getFORMATETC( LPFORMATETC lpFormatEtc )
@@ -144,7 +144,7 @@ void CFormatEtc::getFORMATETC( LPFORMATETC lpFormatEtc )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CLIPFORMAT CFormatEtc::getClipformat( ) const
@@ -153,7 +153,7 @@ CLIPFORMAT CFormatEtc::getClipformat( ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
DWORD CFormatEtc::getTymed( ) const
@@ -162,7 +162,7 @@ DWORD CFormatEtc::getTymed( ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFormatEtc::getTargetDevice( DVTARGETDEVICE** lpDvTargetDevice ) const
@@ -177,7 +177,7 @@ void CFormatEtc::getTargetDevice( DVTARGETDEVICE** lpDvTargetDevice ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
DWORD CFormatEtc::getDvAspect( ) const
@@ -186,7 +186,7 @@ DWORD CFormatEtc::getDvAspect( ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
LONG CFormatEtc::getLindex( ) const
@@ -195,7 +195,7 @@ LONG CFormatEtc::getLindex( ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFormatEtc::setClipformat( CLIPFORMAT cf )
@@ -204,7 +204,7 @@ void CFormatEtc::setClipformat( CLIPFORMAT cf )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFormatEtc::setTymed( DWORD tymed )
@@ -223,7 +223,7 @@ void CFormatEtc::setTargetDevice( DVTARGETDEVICE* ptd )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFormatEtc::setDvAspect( DWORD dwAspect )
@@ -232,7 +232,7 @@ void CFormatEtc::setDvAspect( DWORD dwAspect )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFormatEtc::setLindex( LONG lindex )
@@ -241,7 +241,7 @@ void CFormatEtc::setLindex( LONG lindex )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Int32 operator==( const CFormatEtc& lhs, const CFormatEtc& rhs )
@@ -250,7 +250,7 @@ sal_Int32 operator==( const CFormatEtc& lhs, const CFormatEtc& rhs )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Int32 operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs )
diff --git a/dtrans/source/win32/dtobj/Fetc.hxx b/dtrans/source/win32/dtobj/Fetc.hxx
index 8dfba3672ac9..9c6be8e2b799 100644
--- a/dtrans/source/win32/dtobj/Fetc.hxx
+++ b/dtrans/source/win32/dtobj/Fetc.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@
stl container elements must fulfill the following requirements:
1. they need a copy ctor and assignement operator(?)
2. they must be compareable
- because the FORMATETC structure has a pointer to a TARGETDEVICE
+ because the FORMATETC structure has a pointer to a TARGETDEVICE
structure we need a simple wrapper class to fulfill these needs
***********************************************************************/
diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx
index 2364a0a14341..00cd28c2a279 100644
--- a/dtrans/source/win32/dtobj/FetcList.cxx
+++ b/dtrans/source/win32/dtobj/FetcList.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,14 +58,14 @@ using namespace rtl;
using namespace std;
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
LCID CFormatRegistrar::m_TxtLocale = 0;
sal_uInt32 CFormatRegistrar::m_TxtCodePage = GetACP( );
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatEtcContainer::CFormatEtcContainer( )
@@ -74,29 +74,29 @@ CFormatEtcContainer::CFormatEtcContainer( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFormatEtcContainer::addFormatEtc( const CFormatEtc& fetc )
{
- m_FormatMap.push_back( CFormatEtc( fetc ) );
+ m_FormatMap.push_back( CFormatEtc( fetc ) );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFormatEtcContainer::removeFormatEtc( const CFormatEtc& fetc )
{
- FormatEtcMap_t::iterator iter =
+ FormatEtcMap_t::iterator iter =
find( m_FormatMap.begin(), m_FormatMap.end(), fetc );
-
+
if ( iter != m_FormatMap.end( ) )
m_FormatMap.erase( iter );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFormatEtcContainer::removeAllFormatEtc( )
@@ -105,40 +105,40 @@ void SAL_CALL CFormatEtcContainer::removeAllFormatEtc( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool CFormatEtcContainer::hasFormatEtc( const CFormatEtc& fetc ) const
-{
- FormatEtcMap_t::const_iterator iter =
+{
+ FormatEtcMap_t::const_iterator iter =
find( m_FormatMap.begin(), m_FormatMap.end(), fetc );
-
+
return ( iter != m_FormatMap.end( ) );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-
+
sal_Bool CFormatEtcContainer::hasElements( ) const
{
return ( m_FormatMap.size( ) > 0 );
}
-
+
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFormatEtcContainer::beginEnumFormatEtc( )
{
m_EnumIterator = m_FormatMap.begin( );
}
-
+
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-sal_uInt32 SAL_CALL CFormatEtcContainer::nextFormatEtc( LPFORMATETC lpFetc,
+sal_uInt32 SAL_CALL CFormatEtcContainer::nextFormatEtc( LPFORMATETC lpFetc,
sal_uInt32 aNum )
{
OSL_ASSERT( lpFetc );
@@ -157,15 +157,15 @@ sal_uInt32 SAL_CALL CFormatEtcContainer::nextFormatEtc( LPFORMATETC lpFetc,
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CFormatEtcContainer::skipFormatEtc( sal_uInt32 aNum )
{
FormatEtcMap_t::const_iterator iter_end = m_FormatMap.end( );
- for ( sal_uInt32 i = 0;
- (i < aNum) && (m_EnumIterator != iter_end);
- i++, ++m_EnumIterator )
+ for ( sal_uInt32 i = 0;
+ (i < aNum) && (m_EnumIterator != iter_end);
+ i++, ++m_EnumIterator )
;/* intentionally left empty */
return ( m_EnumIterator != m_FormatMap.end( ) );
@@ -176,15 +176,15 @@ sal_Bool SAL_CALL CFormatEtcContainer::skipFormatEtc( sal_uInt32 aNum )
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFormatRegistrar::CFormatRegistrar( const Reference< XMultiServiceFactory >& ServiceManager,
- const CDataFormatTranslator& aDataFormatTranslator ) :
+ const CDataFormatTranslator& aDataFormatTranslator ) :
m_DataFormatTranslator( aDataFormatTranslator ),
m_bHasSynthesizedLocale( sal_False ),
m_SrvMgr( ServiceManager )
-{
+{
}
// ----------------------------------------------------------------------------------------
@@ -192,26 +192,26 @@ CFormatRegistrar::CFormatRegistrar( const Reference< XMultiServiceFactory >& Ser
// an appropriate FORMATETC structure, for some formats like unicodetext,
// text and text/html we will offer an accompany format e.g.:
//
-// DataFlavor | Registered Clipformat | Registered accompany clipformat
+// DataFlavor | Registered Clipformat | Registered accompany clipformat
// -------------------------|---------------------------|-----------------------------------
-// text/plain;charset=ansi | CF_TEXT | CF_UNICODETEXT
-// | | CF_LOCALE (if charset != GetACP()
-// | |
-// text/plain;charset=oem | CF_OEMTEXT | CF_UNICODETEXT
-// | | CF_LOCALE (if charset != GetOEMCP()
-// | |
-// text/plain;charset=utf-16| CF_UNICODETEXT | CF_TEXT
-// | |
-// text/html | HTML (Hypertext ...) | HTML Format
-// | |
+// text/plain;charset=ansi | CF_TEXT | CF_UNICODETEXT
+// | | CF_LOCALE (if charset != GetACP()
+// | |
+// text/plain;charset=oem | CF_OEMTEXT | CF_UNICODETEXT
+// | | CF_LOCALE (if charset != GetOEMCP()
+// | |
+// text/plain;charset=utf-16| CF_UNICODETEXT | CF_TEXT
+// | |
+// text/html | HTML (Hypertext ...) | HTML Format
+// | |
//
-// if some tries to register different text formats with different charsets the last
+// 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(
+void SAL_CALL CFormatRegistrar::RegisterFormats(
const Reference< XTransferable >& aXTransferable, CFormatEtcContainer& aFormatEtcContainer )
-{
+{
Sequence< DataFlavor > aFlavorList = aXTransferable->getTransferDataFlavors( );
sal_Int32 nFlavors = aFlavorList.getLength( );
sal_Bool bUnicodeRegistered = sal_False;
@@ -221,7 +221,7 @@ void SAL_CALL CFormatRegistrar::RegisterFormats(
{
aFlavor = aFlavorList[i];
CFormatEtc fetc = m_DataFormatTranslator.getFormatEtcFromDataFlavor( aFlavor );
-
+
// maybe an internal format so we ignore it
if ( CF_INVALID == fetc.getClipformat( ) )
continue;
@@ -239,52 +239,52 @@ void SAL_CALL CFormatRegistrar::RegisterFormats(
// we register CF_TEXT for non unicode clients
if ( m_DataFormatTranslator.isUnicodeTextFormat( fetc.getClipformat() ) )
{
- aFormatEtcContainer.addFormatEtc( fetc ); // add CF_UNICODE
- aFormatEtcContainer.addFormatEtc(
+ aFormatEtcContainer.addFormatEtc( fetc ); // add CF_UNICODE
+ aFormatEtcContainer.addFormatEtc(
m_DataFormatTranslator.getFormatEtcForClipformat( CF_TEXT ) ); // add CF_TEXT
bUnicodeRegistered = sal_True;
}
- else if ( !hasUnicodeFlavor( aXTransferable ) )
+ else if ( !hasUnicodeFlavor( aXTransferable ) )
{
// we try to investigate the charset and make a valid
// windows codepage from this charset the default
// return value is the result of GetACP( )
OUString charset = getCharsetFromDataFlavor( aFlavor );
- sal_uInt32 txtCP = getWinCPFromMimeCharset( charset );
-
+ sal_uInt32 txtCP = getWinCPFromMimeCharset( charset );
+
// we try to get a Locale appropriate for this codepage
if ( findLocaleForTextCodePage( ) )
{
m_TxtCodePage = txtCP;
- aFormatEtcContainer.addFormatEtc(
+ aFormatEtcContainer.addFormatEtc(
m_DataFormatTranslator.getFormatEtcForClipformat( CF_UNICODETEXT ) );
-
+
if ( !IsOEMCP( m_TxtCodePage ) )
- aFormatEtcContainer.addFormatEtc(
+ aFormatEtcContainer.addFormatEtc(
m_DataFormatTranslator.getFormatEtcForClipformat( CF_TEXT ) );
else
- aFormatEtcContainer.addFormatEtc(
+ aFormatEtcContainer.addFormatEtc(
m_DataFormatTranslator.getFormatEtcForClipformat( CF_OEMTEXT ) );
- aFormatEtcContainer.addFormatEtc(
+ aFormatEtcContainer.addFormatEtc(
m_DataFormatTranslator.getFormatEtcForClipformat( CF_LOCALE ) );
-
- // we save the flavor so it's easier when
+
+ // we save the flavor so it's easier when
// queried for it in XTDataObject::GetData(...)
m_RegisteredTextFlavor = aFlavor;
m_bHasSynthesizedLocale = sal_True;
- }
+ }
}
}
else if ( m_DataFormatTranslator.isTextHtmlFormat( fetc.getClipformat( ) ) ) // Html (Hyper Text...)
{
// we add text/html ( HTML (HyperText Markup Language) )
aFormatEtcContainer.addFormatEtc( fetc );
-
+
// and HTML Format
OUString htmlFormat( OUString::createFromAscii( "HTML Format" ) );
- aFormatEtcContainer.addFormatEtc(
+ aFormatEtcContainer.addFormatEtc(
m_DataFormatTranslator.getFormatEtcForClipformatName( htmlFormat ) );
}
}
@@ -292,7 +292,7 @@ void SAL_CALL CFormatRegistrar::RegisterFormats(
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CFormatRegistrar::hasSynthesizedLocale( ) const
@@ -301,7 +301,7 @@ sal_Bool SAL_CALL CFormatRegistrar::hasSynthesizedLocale( ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
LCID SAL_CALL CFormatRegistrar::getSynthesizedLocale( ) const
@@ -310,7 +310,7 @@ LCID SAL_CALL CFormatRegistrar::getSynthesizedLocale( ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_uInt32 SAL_CALL CFormatRegistrar::getRegisteredTextCodePage( ) const
@@ -319,7 +319,7 @@ sal_uInt32 SAL_CALL CFormatRegistrar::getRegisteredTextCodePage( ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
DataFlavor SAL_CALL CFormatRegistrar::getRegisteredTextFlavor( ) const
@@ -328,7 +328,7 @@ DataFlavor SAL_CALL CFormatRegistrar::getRegisteredTextFlavor( ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CFormatRegistrar::isSynthesizeableFormat( const CFormatEtc& aFormatEtc ) const
@@ -339,7 +339,7 @@ sal_Bool SAL_CALL CFormatRegistrar::isSynthesizeableFormat( const CFormatEtc& aF
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
inline
@@ -351,7 +351,7 @@ sal_Bool SAL_CALL CFormatRegistrar::needsToSynthesizeAccompanyFormats( const CFo
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor& aFlavor )
@@ -360,22 +360,22 @@ OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor&
try
{
- Reference< XMimeContentTypeFactory > xMimeFac(
+ Reference< XMimeContentTypeFactory > xMimeFac(
m_SrvMgr->createInstance( OUString::createFromAscii( \
"com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY );
-
+
if( xMimeFac.is( ) )
{
Reference< XMimeContentType > xMimeType( xMimeFac->createMimeContentType( aFlavor.MimeType ) );
if ( xMimeType->hasParameter( TEXTPLAIN_PARAM_CHARSET ) )
charset = xMimeType->getParameterValue( TEXTPLAIN_PARAM_CHARSET );
- else
+ else
charset = getMimeCharsetFromWinCP( GetACP( ), PRE_WINDOWS_CODEPAGE );
}
}
catch(NoSuchElementException&)
{
- OSL_ENSURE( sal_False, "Unexpected" );
+ OSL_ENSURE( sal_False, "Unexpected" );
}
catch(...)
{
@@ -386,21 +386,21 @@ OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor&
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CFormatRegistrar::hasUnicodeFlavor( const Reference< XTransferable >& aXTransferable ) const
{
CFormatEtc fetc( CF_UNICODETEXT );
- DataFlavor aFlavor =
+ DataFlavor aFlavor =
m_DataFormatTranslator.getDataFlavorFromFormatEtc( fetc );
-
+
return aXTransferable->isDataFlavorSupported( aFlavor );
-}
+}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
inline
@@ -410,7 +410,7 @@ sal_Bool CFormatRegistrar::isEqualCurrentSystemCodePage( sal_uInt32 aCodePage )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CFormatRegistrar::findLocaleForTextCodePage( )
@@ -421,59 +421,59 @@ sal_Bool SAL_CALL CFormatRegistrar::findLocaleForTextCodePage( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CFormatRegistrar::isLocaleCodePage( LCID lcid, LCTYPE lctype, sal_uInt32 codepage )
-{
- char buff[6];
+{
+ char buff[6];
sal_uInt32 localeCodePage;
-
+
OSL_ASSERT( IsValidLocale( lcid, LCID_INSTALLED ) );
// get the ansi codepage of the current locale
- GetLocaleInfoA( lcid, lctype, buff, sizeof( buff ) );
+ GetLocaleInfoA( lcid, lctype, buff, sizeof( buff ) );
localeCodePage = atol( buff );
return ( localeCodePage == codepage );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
inline
-sal_Bool SAL_CALL CFormatRegistrar::isLocaleOemCodePage( LCID lcid, sal_uInt32 codepage )
+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 );
-}
+ return isLocaleCodePage( lcid, LOCALE_IDEFAULTANSICODEPAGE, codepage );
+}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
BOOL CALLBACK CFormatRegistrar::EnumLocalesProc( LPSTR lpLocaleStr )
{
// the lpLocaleStr parametere is hexadecimal
LCID lcid = strtol( lpLocaleStr, NULL, 16 );
-
- if ( isLocaleAnsiCodePage( lcid, CFormatRegistrar::m_TxtCodePage ) ||
+
+ if ( isLocaleAnsiCodePage( lcid, CFormatRegistrar::m_TxtCodePage ) ||
isLocaleOemCodePage( lcid, CFormatRegistrar::m_TxtCodePage ) )
- {
- CFormatRegistrar::m_TxtLocale = lcid;
+ {
+ CFormatRegistrar::m_TxtLocale = lcid;
return sal_False; // stop enumerating
}
-
+
return sal_True;
}
diff --git a/dtrans/source/win32/dtobj/FetcList.hxx b/dtrans/source/win32/dtobj/FetcList.hxx
index de5e00fa9c3a..51ead901b9de 100644
--- a/dtrans/source/win32/dtobj/FetcList.hxx
+++ b/dtrans/source/win32/dtobj/FetcList.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,7 +50,7 @@
/*****************************************************************
a simple container for FORMATECT structures
- instances of this class are not thread-safe
+ instances of this class are not thread-safe
*****************************************************************/
class CFormatEtcContainer
@@ -60,23 +60,23 @@ public:
// duplicates not allowed
void SAL_CALL addFormatEtc( const CFormatEtc& fetc );
-
- // removes the specified formatetc
+
+ // removes the specified formatetc
void SAL_CALL removeFormatEtc( const CFormatEtc& fetc );
-
+
// removes the formatetc at pos
void SAL_CALL removeAllFormatEtc( );
sal_Bool SAL_CALL hasFormatEtc( const CFormatEtc& fetc ) const;
-
+
sal_Bool SAL_CALL hasElements( ) const;
-
+
// begin enumeration
void SAL_CALL beginEnumFormatEtc( );
-
+
// copies the specified number of formatetc structures starting
// at the current enum position
- // the return value is the number of copied elements; if the
+ // the return value is the number of copied elements; if the
// current enum position is at the end the return value is 0
sal_uInt32 SAL_CALL nextFormatEtc( LPFORMATETC lpFetc, sal_uInt32 aNum = 1 );
@@ -86,7 +86,7 @@ public:
protected:
typedef std::vector< CFormatEtc > FormatEtcMap_t;
-private:
+private:
FormatEtcMap_t m_FormatMap;
FormatEtcMap_t::iterator m_EnumIterator;
};
@@ -95,10 +95,10 @@ private:
a helper class which converts data flavors to clipformats,
creates an appropriate formatetc structures and if possible
synthesizes clipboard formats if necessary, e.g. if text
- is provided a locale will also be provided;
+ is provided a locale will also be provided;
the class registers the formatetc within a CFormatEtcContainer
- instances of this class are not thread-safe and multiple
+ instances of this class are not thread-safe and multiple
instances of this class would use the same static variables
that's why this class should not be used by multiple threads,
only one thread of a process should use it
@@ -111,24 +111,24 @@ class CFormatRegistrar
{
public:
CFormatRegistrar( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ServiceManager,
- const CDataFormatTranslator& aDataFormatTranslator );
-
+ const CDataFormatTranslator& aDataFormatTranslator );
+
void SAL_CALL RegisterFormats( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable >& aXTransferable,
CFormatEtcContainer& aFormatEtcContainer );
-
+
sal_Bool SAL_CALL hasSynthesizedLocale( ) const;
LCID SAL_CALL getSynthesizedLocale( ) const;
sal_uInt32 SAL_CALL getRegisteredTextCodePage( ) const;
com::sun::star::datatransfer::DataFlavor SAL_CALL getRegisteredTextFlavor( ) const;
-
+
sal_Bool SAL_CALL isSynthesizeableFormat( const CFormatEtc& aFormatEtc ) const;
sal_Bool SAL_CALL needsToSynthesizeAccompanyFormats( const CFormatEtc& aFormatEtc ) const;
-private:
+private:
sal_Bool SAL_CALL isEqualCurrentSystemCodePage( sal_uInt32 aCodePage ) const;
rtl::OUString SAL_CALL getCharsetFromDataFlavor( const com::sun::star::datatransfer::DataFlavor& aFlavor );
-
- sal_Bool SAL_CALL hasUnicodeFlavor(
+
+ sal_Bool SAL_CALL hasUnicodeFlavor(
const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable >& aXTransferable ) const;
sal_Bool SAL_CALL findLocaleForTextCodePage( );
@@ -138,17 +138,17 @@ private:
static sal_Bool SAL_CALL isLocaleCodePage( LCID lcid, LCTYPE lctype, sal_uInt32 codepage );
static BOOL CALLBACK EnumLocalesProc( LPSTR lpLocaleStr );
-
-private:
- const CDataFormatTranslator& m_DataFormatTranslator;
- sal_Bool m_bHasSynthesizedLocale;
+
+private:
+ const CDataFormatTranslator& m_DataFormatTranslator;
+ sal_Bool m_bHasSynthesizedLocale;
com::sun::star::datatransfer::DataFlavor m_RegisteredTextFlavor;
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
-
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
+
static LCID m_TxtLocale;
static sal_uInt32 m_TxtCodePage;
-
+
private:
CFormatRegistrar( const CFormatRegistrar& );
CFormatRegistrar& operator=( const CFormatRegistrar& );
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index 235c63e298f9..0702ef4892d0 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -74,24 +74,24 @@ Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFi
{
OSL_ASSERT( aMetaFilePict.getLength( ) == sizeof( METAFILEPICT ) );
- Sequence< sal_Int8 > mfpictStream;
+ Sequence< sal_Int8 > mfpictStream;
METAFILEPICT* pMFPict = reinterpret_cast< METAFILEPICT* >( aMetaFilePict.getArray( ) );
HMETAFILE hMf = pMFPict->hMF;
sal_uInt32 nCount = GetMetaFileBitsEx( hMf, 0, NULL );
-
+
if ( nCount > 0 )
{
mfpictStream.realloc( nCount + sizeof( METAFILEHEADER ) );
METAFILEHEADER* pMFHeader = reinterpret_cast< METAFILEHEADER* >( mfpictStream.getArray( ) );
- SMALL_RECT aRect = { 0,
- 0,
- static_cast< short >( pMFPict->xExt ),
+ SMALL_RECT aRect = { 0,
+ 0,
+ static_cast< short >( pMFPict->xExt ),
static_cast< short >( pMFPict->yExt ) };
USHORT nInch;
switch( pMFPict->mm )
- {
+ {
case MM_TEXT:
nInch = 72;
break;
@@ -107,7 +107,7 @@ Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFi
case MM_LOENGLISH:
nInch = 254;
break;
-
+
case MM_HIENGLISH:
case MM_ISOTROPIC:
case MM_ANISOTROPIC:
@@ -134,20 +134,20 @@ Sequence< sal_Int8 > SAL_CALL WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFi
nCount = GetMetaFileBitsEx( pMFPict->hMF, nCount, pMFBuff + sizeof( METAFILEHEADER ) );
OSL_ASSERT( nCount > 0 );
}
-
+
return mfpictStream;
}
//-------------------------------------------------------------
-// convert a windows enhanced metafile to a openoffice metafile
+// convert a windows enhanced metafile to a openoffice metafile
//-------------------------------------------------------------
Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile )
{
- Sequence< sal_Int8 > aRet;
- UINT nSize = 0;
+ Sequence< sal_Int8 > aRet;
+ UINT nSize = 0;
- if( hEnhMetaFile &&
+ if( hEnhMetaFile &&
( ( nSize = GetEnhMetaFileBits( hEnhMetaFile, 0, NULL ) ) != 0 ) )
{
aRet.realloc( nSize );
@@ -165,8 +165,8 @@ Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile
HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 >& aOOMetaFilePict )
{
- HMETAFILEPICT hPict = NULL;
- HMETAFILE hMtf = SetMetaFileBitsEx( aOOMetaFilePict.getLength(), (sal_uChar*) aOOMetaFilePict.getConstArray() );
+ HMETAFILEPICT hPict = NULL;
+ HMETAFILE hMtf = SetMetaFileBitsEx( aOOMetaFilePict.getLength(), (sal_uChar*) aOOMetaFilePict.getConstArray() );
if( hMtf )
{
@@ -201,14 +201,14 @@ HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( Sequence< sal_Int8 >& aOOMetaFileP
Sequence< sal_Int8 > SAL_CALL WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB )
{
OSL_ASSERT( aWinDIB.getLength( ) > sizeof( BITMAPINFOHEADER ) );
-
+
Sequence< sal_Int8 > ooBmpStream;
ooBmpStream.realloc( aWinDIB.getLength( ) + sizeof(BITMAPFILEHEADER) );
-
- const BITMAPINFOHEADER *pBmpInfoHdr = (const BITMAPINFOHEADER*)aWinDIB.getConstArray();
- BITMAPFILEHEADER *pBmpFileHdr = reinterpret_cast< BITMAPFILEHEADER* >( ooBmpStream.getArray() );
- DWORD nOffset = sizeof( BITMAPFILEHEADER ) + sizeof( BITMAPINFOHEADER );
+
+ const BITMAPINFOHEADER *pBmpInfoHdr = (const BITMAPINFOHEADER*)aWinDIB.getConstArray();
+ BITMAPFILEHEADER *pBmpFileHdr = reinterpret_cast< BITMAPFILEHEADER* >( ooBmpStream.getArray() );
+ DWORD nOffset = sizeof( BITMAPFILEHEADER ) + sizeof( BITMAPINFOHEADER );
rtl_copyMemory( pBmpFileHdr + 1, pBmpInfoHdr, aWinDIB.getLength( ) );
@@ -216,12 +216,12 @@ Sequence< sal_Int8 > SAL_CALL WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB
nOffset += ( pBmpInfoHdr->biClrUsed ? pBmpInfoHdr->biClrUsed : ( 1 << pBmpInfoHdr->biBitCount ) ) << 2;
else if( ( BI_BITFIELDS == pBmpInfoHdr->biCompression ) && ( ( 16 == pBmpInfoHdr->biBitCount ) || ( 32 == pBmpInfoHdr->biBitCount ) ) )
nOffset += 12;
-
+
pBmpFileHdr->bfType = 'MB';
pBmpFileHdr->bfSize = 0; // maybe: nMemSize + sizeof(BITMAPFILEHEADER)
pBmpFileHdr->bfReserved1 = 0;
pBmpFileHdr->bfReserved2 = 0;
- pBmpFileHdr->bfOffBits = nOffset;
+ pBmpFileHdr->bfOffBits = nOffset;
return ooBmpStream;
}
@@ -232,12 +232,12 @@ Sequence< sal_Int8 > SAL_CALL WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB
Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp )
{
- OSL_ASSERT( aOOBmp.getLength( ) >
+ OSL_ASSERT( aOOBmp.getLength( ) >
( sizeof( BITMAPFILEHEADER ) + sizeof( BITMAPINFOHEADER ) ) );
Sequence< sal_Int8 > winDIBStream( aOOBmp.getLength( ) - sizeof( BITMAPFILEHEADER ) );
- rtl_copyMemory( winDIBStream.getArray( ),
+ rtl_copyMemory( winDIBStream.getArray( ),
aOOBmp.getArray( ) + sizeof( BITMAPFILEHEADER ),
aOOBmp.getLength( ) - sizeof( BITMAPFILEHEADER ) );
@@ -249,49 +249,49 @@ Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp )
// well known under MS Windows
// the MS HTML Format has a header before the real html data
//
-// Version:1.0 Version number of the clipboard. Staring is 0.9
-// StartHTML: Byte count from the beginning of the clipboard to the start
-// of the context, or -1 if no context
-// EndHTML: Byte count from the beginning of the clipboard to the end
-// of the context, or -1 if no context
-// StartFragment: Byte count from the beginning of the clipboard to the
-// start of the fragment
-// EndFragment: Byte count from the beginning of the clipboard to the
-// end of the fragment
-// StartSelection: Byte count from the beginning of the clipboard to the
-// start of the selection
-// EndSelection: Byte count from the beginning of the clipboard to the
-// end of the selection
+// Version:1.0 Version number of the clipboard. Staring is 0.9
+// StartHTML: Byte count from the beginning of the clipboard to the start
+// of the context, or -1 if no context
+// EndHTML: Byte count from the beginning of the clipboard to the end
+// of the context, or -1 if no context
+// StartFragment: Byte count from the beginning of the clipboard to the
+// start of the fragment
+// EndFragment: Byte count from the beginning of the clipboard to the
+// end of the fragment
+// StartSelection: Byte count from the beginning of the clipboard to the
+// start of the selection
+// EndSelection: Byte count from the beginning of the clipboard to the
+// end of the selection
//
// StartSelection and EndSelection are optional
// The fragment should be preceded and followed by the HTML comments
-// <!--StartFragment--> and <!--EndFragment--> (no space between !-- and the
+// <!--StartFragment--> and <!--EndFragment--> (no space between !-- and the
// text
//------------------------------------------------------------------------------
/*
Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextHtml )
{
OSL_ASSERT( aTextHtml.getLength( ) > 0 );
-
+
// check parameter
if ( !(aTextHtml.getLength( ) > 0) )
return Sequence< sal_Int8 >( );
- // we create a buffer with the approximated size of
+ // we create a buffer with the approximated size of
// the HTML Format header
char aHTMLFmtHdr[120];
-
+
rtl_zeroMemory( aHTMLFmtHdr, sizeof( aHTMLFmtHdr ) );
// fill the buffer with dummy values to calc the
// exact length
-
- wsprintf(
- aHTMLFmtHdr,
+
+ wsprintf(
+ aHTMLFmtHdr,
"Version:1.0\nStartHTML:%010d\r\nnEndHTML:%010d\r\nStartFragment:%010\r\nnEndFragment:%010d\r\n", 0, 0, 0, 0 );
sal_uInt32 lHTMLFmtHdr = rtl_str_getLength( aHTMLFmtHdr );
-
+
// the office allways writes the start
// and end html tag in upper cases and
// without spaces
@@ -306,8 +306,8 @@ Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextH
OString startBodyTag( "<BODY" );
OString endBodyTag( "</BODY" );
- OString textHtml(
- reinterpret_cast< const sal_Char* >( aTextHtml.getConstArray( ) ),
+ OString textHtml(
+ reinterpret_cast< const sal_Char* >( aTextHtml.getConstArray( ) ),
aTextHtml.getLength( ) );
sal_Int32 nStartHtml = textHtml.indexOf( startHtmlTag );
@@ -329,27 +329,27 @@ Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextH
// fill the html header
rtl_zeroMemory( aHTMLFmtHdr, sizeof( aHTMLFmtHdr ) );
- wsprintf(
- aHTMLFmtHdr,
+ wsprintf(
+ aHTMLFmtHdr,
"Version:1.0\nStartHTML:%010d\r\nEndHTML:%010d\r\nStartFragment:%010d\r\nEndFragment:%010d\r\n",
nStartHtml, nEndHtml, nStartFrgmt, nEndFrgmt );
-
+
// we add space for a trailing \0
aHTMLFmtSequence.realloc( lHTMLFmtHdr + aTextHtml.getLength( ) + 1 );
rtl_zeroMemory( aHTMLFmtSequence.getArray( ), aHTMLFmtSequence.getLength( ) );
-
+
// copy the HTML Format header
- rtl_copyMemory(
+ rtl_copyMemory(
static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) ),
static_cast< LPVOID >( aHTMLFmtHdr ), lHTMLFmtHdr );
-
+
// concat the text/html
rtl_copyMemory(
static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) + lHTMLFmtHdr ),
static_cast< LPVOID >( aTextHtml.getArray( ) ),
- aTextHtml.getLength( ) );
+ aTextHtml.getLength( ) );
}
-
+
return aHTMLFmtSequence;
}
*/
@@ -378,37 +378,37 @@ const std::string TAG_END_BODY = std::string("</BODY");
Sequence<sal_Int8> SAL_CALL TextHtmlToHTMLFormat(Sequence<sal_Int8>& aTextHtml)
{
OSL_ASSERT(aTextHtml.getLength() > 0);
-
+
if (!(aTextHtml.getLength() > 0))
return Sequence<sal_Int8>();
-
+
// fill the buffer with dummy values to calc the exact length
- std::string dummyHtmlHeader = GetHtmlFormatHeader(0, 0, 0, 0);
+ std::string dummyHtmlHeader = GetHtmlFormatHeader(0, 0, 0, 0);
size_t lHtmlFormatHeader = dummyHtmlHeader.length();
-
+
std::string textHtml(
- reinterpret_cast<const sal_Char*>(aTextHtml.getConstArray()),
+ reinterpret_cast<const sal_Char*>(aTextHtml.getConstArray()),
reinterpret_cast<const sal_Char*>(aTextHtml.getConstArray()) + aTextHtml.getLength());
-
+
std::string::size_type nStartHtml = textHtml.find(TAG_HTML) + lHtmlFormatHeader - 1; // we start one before '<HTML>' Word 2000 does also so
std::string::size_type nEndHtml = textHtml.find(TAG_END_HTML) + lHtmlFormatHeader + TAG_END_HTML.length() + 1; // our SOffice 5.2 wants 2 behind </HTML>?
-
+
// The body tag may have parameters so we need to search for the
// closing '>' manually e.g. <BODY param> #92840#
- std::string::size_type nStartFragment = textHtml.find(">", textHtml.find(TAG_BODY)) + lHtmlFormatHeader + 1;
+ std::string::size_type nStartFragment = textHtml.find(">", textHtml.find(TAG_BODY)) + lHtmlFormatHeader + 1;
std::string::size_type nEndFragment = textHtml.find(TAG_END_BODY) + lHtmlFormatHeader;
- std::string htmlFormat = GetHtmlFormatHeader(nStartHtml, nEndHtml, nStartFragment, nEndFragment);
+ std::string htmlFormat = GetHtmlFormatHeader(nStartHtml, nEndHtml, nStartFragment, nEndFragment);
htmlFormat += textHtml;
-
+
Sequence<sal_Int8> byteSequence(htmlFormat.length() + 1); // space the trailing '\0'
- rtl_zeroMemory(byteSequence.getArray(), byteSequence.getLength());
-
+ rtl_zeroMemory(byteSequence.getArray(), byteSequence.getLength());
+
rtl_copyMemory(
static_cast<void*>(byteSequence.getArray()),
static_cast<const void*>(htmlFormat.c_str()),
htmlFormat.length());
-
+
return byteSequence;
}
@@ -418,27 +418,27 @@ std::wstring getFileExtension(const std::wstring& aFilename)
if ((idx != std::wstring::npos))
{
return std::wstring(aFilename, idx);
- }
+ }
return std::wstring();
}
const std::wstring SHELL_LINK_FILE_EXTENSION = L".lnk";
bool isShellLink(const std::wstring& aFilename)
-{
+{
std::wstring ext = getFileExtension(aFilename);
- return (_wcsicmp(ext.c_str(), SHELL_LINK_FILE_EXTENSION.c_str()) == 0);
+ return (_wcsicmp(ext.c_str(), SHELL_LINK_FILE_EXTENSION.c_str()) == 0);
}
-
-/** Resolve a Windows Shell Link (lnk) file. If a resolution
+
+/** Resolve a Windows Shell Link (lnk) file. If a resolution
is not possible simply return the provided name of the
lnk file. */
-std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
+std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
{
OSL_ASSERT(isShellLink(aLnkFile));
-
+
std::wstring target = aLnkFile;
-
+
try
{
sal::systools::COMReference<IShellLinkA> pIShellLink;
@@ -446,34 +446,34 @@ std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<LPVOID*>(&pIShellLink));
if (FAILED(hr))
return target;
-
+
sal::systools::COMReference<IPersistFile> pIPersistFile =
- pIShellLink.QueryInterface<IPersistFile>(IID_IPersistFile);
-
+ pIShellLink.QueryInterface<IPersistFile>(IID_IPersistFile);
+
hr = pIPersistFile->Load(aLnkFile.c_str(), STGM_READ);
if (FAILED(hr))
return target;
-
+
hr = pIShellLink->Resolve(NULL, SLR_UPDATE | SLR_NO_UI);
if (FAILED(hr))
return target;
-
+
char pathA[MAX_PATH];
- WIN32_FIND_DATA wfd;
- hr = pIShellLink->GetPath(pathA, MAX_PATH, &wfd, SLGP_RAWPATH);
+ WIN32_FIND_DATA wfd;
+ hr = pIShellLink->GetPath(pathA, MAX_PATH, &wfd, SLGP_RAWPATH);
if (FAILED(hr))
- return target;
-
+ return target;
+
wchar_t pathW[MAX_PATH];
- MultiByteToWideChar(CP_ACP, 0, pathA, -1, pathW, MAX_PATH);
- target = pathW;
+ MultiByteToWideChar(CP_ACP, 0, pathA, -1, pathW, MAX_PATH);
+ target = pathW;
}
catch(sal::systools::ComError& ex)
{
OSL_ENSURE(false, ex.what());
ex = ex;
- }
- return target;
+ }
+ return target;
}
typedef std::vector<std::wstring> FileList_t;
@@ -484,54 +484,54 @@ typedef Sequence<sal_Int8> ByteSequence_t;
a double '\0' terminated string buffer */
size_t CalcSizeForStringListBuffer(const FileList_t& fileList)
{
- if (fileList.size() == 0)
- return 0;
-
- size_t size = 1; // one for the very final '\0'
+ if (fileList.size() == 0)
+ return 0;
+
+ size_t size = 1; // one for the very final '\0'
FileList_t::const_iterator iter_end = fileList.end();
- for (FileList_t::const_iterator iter = fileList.begin(); iter != iter_end; ++iter)
+ for (FileList_t::const_iterator iter = fileList.begin(); iter != iter_end; ++iter)
{
size += iter->length() + 1; // length including terminating '\0'
- }
+ }
return (size * sizeof(FileList_ValueType_t::value_type));
}
ByteSequence_t FileListToByteSequence(const FileList_t& fileList)
-{
+{
ByteSequence_t bseq;
- size_t size = CalcSizeForStringListBuffer(fileList);
-
+ size_t size = CalcSizeForStringListBuffer(fileList);
+
if (size > 0)
{
bseq.realloc(size);
wchar_t* p = reinterpret_cast<wchar_t*>(bseq.getArray());
ZeroMemory(p, size);
-
+
FileList_t::const_iterator iter;
FileList_t::const_iterator iter_end = fileList.end();
for (iter = fileList.begin(); iter != iter_end; ++iter)
{
wcsncpy(p, iter->c_str(), iter->length());
p += (iter->length() + 1);
- }
+ }
}
return bseq;
}
-
+
ByteSequence_t CF_HDROPToFileList(HGLOBAL hGlobal)
-{
- UINT nFiles = DragQueryFileW((HDROP)hGlobal, 0xFFFFFFFF, NULL, 0);
+{
+ UINT nFiles = DragQueryFileW((HDROP)hGlobal, 0xFFFFFFFF, NULL, 0);
FileList_t files;
-
+
for (UINT i = 0; i < nFiles; i++)
{
wchar_t buff[MAX_PATH];
- /*UINT size =*/ DragQueryFileW((HDROP)hGlobal, i, buff, MAX_PATH);
+ /*UINT size =*/ DragQueryFileW((HDROP)hGlobal, i, buff, MAX_PATH);
std::wstring filename = buff;
if (isShellLink(filename))
filename = getShellLinkTarget(filename);
- files.push_back(filename);
- }
+ files.push_back(filename);
+ }
return FileListToByteSequence(files);
}
diff --git a/dtrans/source/win32/dtobj/FmtFilter.hxx b/dtrans/source/win32/dtobj/FmtFilter.hxx
index 0e91710729fc..552b872fc1ef 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.hxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -72,7 +72,7 @@ com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( com::sun::star
/*------------------------------------------------------------------------
input:
- aTextHtml - a sequence of text/html which will be converted to the
+ aTextHtml - a sequence of text/html which will be converted to the
HTML Format; the HTML Format has header before the real html data
the Format is described in the MSDN Library under HTML Clipboard
Format
diff --git a/dtrans/source/win32/dtobj/MimeAttrib.hxx b/dtrans/source/win32/dtobj/MimeAttrib.hxx
index e9538ac7ae1f..0b73a64a5ded 100644
--- a/dtrans/source/win32/dtobj/MimeAttrib.hxx
+++ b/dtrans/source/win32/dtobj/MimeAttrib.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx
index 669ee78eff6d..06fc87d8587b 100644
--- a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx
+++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,8 +76,8 @@ int CalcBuffSizeForTextConversion( UINT code_page, LPCWSTR lpWideCharString, int
// the buffer
//------------------------------------------------------------------
-int MultiByteToWideCharEx( UINT cp_src,
- LPCSTR lpMultiByteString,
+int MultiByteToWideCharEx( UINT cp_src,
+ LPCSTR lpMultiByteString,
sal_uInt32 lenStr,
CStgTransferHelper& refDTransHelper,
BOOL bEnsureTrailingZero )
@@ -85,9 +85,9 @@ int MultiByteToWideCharEx( UINT cp_src,
OSL_ASSERT( IsValidCodePage( cp_src ) );
OSL_ASSERT( NULL != lpMultiByteString );
- // calculate the required buff size
+ // calculate the required buff size
int reqSize = CalcBuffSizeForTextConversion( cp_src, lpMultiByteString, lenStr );
-
+
if ( bEnsureTrailingZero )
reqSize += sizeof( sal_Unicode );
@@ -97,9 +97,9 @@ int MultiByteToWideCharEx( UINT cp_src,
// setup a global memory pointer
CRawHGlobalPtr ptrHGlob( refDTransHelper );
- // do the converssion an return
- return MultiByteToWideChar( cp_src,
- 0,
+ // do the converssion an return
+ return MultiByteToWideChar( cp_src,
+ 0,
lpMultiByteString,
lenStr,
static_cast< LPWSTR >( ptrHGlob.GetMemPtr( ) ),
@@ -112,8 +112,8 @@ int MultiByteToWideCharEx( UINT cp_src,
// the buffer
//------------------------------------------------------------------
-int WideCharToMultiByteEx( UINT cp_dest,
- LPCWSTR lpWideCharString,
+int WideCharToMultiByteEx( UINT cp_dest,
+ LPCWSTR lpWideCharString,
sal_uInt32 lenStr,
CStgTransferHelper& refDTransHelper,
BOOL bEnsureTrailingZero )
@@ -121,7 +121,7 @@ int WideCharToMultiByteEx( UINT cp_dest,
OSL_ASSERT( IsValidCodePage( cp_dest ) );
OSL_ASSERT( NULL != lpWideCharString );
- // calculate the required buff size
+ // calculate the required buff size
int reqSize = CalcBuffSizeForTextConversion( cp_dest, lpWideCharString, lenStr );
if ( bEnsureTrailingZero )
@@ -133,7 +133,7 @@ int WideCharToMultiByteEx( UINT cp_dest,
// setup a global memory pointer
CRawHGlobalPtr ptrHGlob( refDTransHelper );
- // do the converssion an return
+ // do the converssion an return
return WideCharToMultiByte( cp_dest,
0,
lpWideCharString,
diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
index 5f37e19ce4d6..f9b9369255f6 100644
--- a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
+++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,16 +47,16 @@
// deklarations
//------------------------------------------------------------------------
-int MultiByteToWideCharEx( UINT cp_src,
+int MultiByteToWideCharEx( UINT cp_src,
LPCSTR lpMultiByteString,
sal_uInt32 lenStr,
- CStgTransferHelper& refDTransHelper,
+ CStgTransferHelper& refDTransHelper,
BOOL bEnsureTrailingZero = TRUE );
-int WideCharToMultiByteEx( UINT cp_dest,
- LPCWSTR lpWideCharString,
+int WideCharToMultiByteEx( UINT cp_dest,
+ LPCWSTR lpWideCharString,
sal_uInt32 lenStr,
- CStgTransferHelper& refDTransHelper,
+ CStgTransferHelper& refDTransHelper,
BOOL bEnsureTrailingZero = TRUE );
#endif
diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx b/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
index fd12b6583626..adc6c1c36195 100644
--- a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,28 +44,28 @@ using com::sun::star::uno::RuntimeException;
using com::sun::star::uno::Reference;
-CXNotifyingDataObject::CXNotifyingDataObject(
- const IDataObjectPtr& aIDataObject,
+CXNotifyingDataObject::CXNotifyingDataObject(
+ const IDataObjectPtr& aIDataObject,
const Reference< XTransferable >& aXTransferable,
const Reference< XClipboardOwner >& aXClipOwner,
CWinClipbImpl* theWinClipImpl ) :
- m_nRefCnt( 0 ),
+ m_nRefCnt( 0 ),
m_aIDataObject( aIDataObject ),
m_XTransferable( aXTransferable ),
m_XClipboardOwner( aXClipOwner ),
m_pWinClipImpl( theWinClipImpl )
-{
+{
}
STDMETHODIMP CXNotifyingDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
-{
+{
if ( NULL == ppvObject )
return E_INVALIDARG;
HRESULT hr = E_NOINTERFACE;
*ppvObject = NULL;
- if ( ( __uuidof( IUnknown ) == iid ) ||
+ if ( ( __uuidof( IUnknown ) == iid ) ||
( __uuidof( IDataObject ) == iid ) )
{
*ppvObject = static_cast< IUnknown* >( this );
@@ -82,8 +82,8 @@ STDMETHODIMP_(ULONG) CXNotifyingDataObject::AddRef( )
}
STDMETHODIMP_(ULONG) CXNotifyingDataObject::Release( )
-{
- ULONG nRefCnt =
+{
+ ULONG nRefCnt =
static_cast< ULONG >( InterlockedDecrement( &m_nRefCnt ) );
if ( 0 == nRefCnt )
@@ -98,50 +98,50 @@ STDMETHODIMP_(ULONG) CXNotifyingDataObject::Release( )
}
STDMETHODIMP CXNotifyingDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium )
-{
- return m_aIDataObject->GetData(pFormatetc, pmedium);
+{
+ return m_aIDataObject->GetData(pFormatetc, pmedium);
}
-STDMETHODIMP CXNotifyingDataObject::EnumFormatEtc(
+STDMETHODIMP CXNotifyingDataObject::EnumFormatEtc(
DWORD dwDirection, IEnumFORMATETC** ppenumFormatetc )
-{
- return m_aIDataObject->EnumFormatEtc(dwDirection, ppenumFormatetc);
+{
+ return m_aIDataObject->EnumFormatEtc(dwDirection, ppenumFormatetc);
}
STDMETHODIMP CXNotifyingDataObject::QueryGetData( LPFORMATETC pFormatetc )
{
- return m_aIDataObject->QueryGetData(pFormatetc);
+ return m_aIDataObject->QueryGetData(pFormatetc);
}
STDMETHODIMP CXNotifyingDataObject::GetDataHere( LPFORMATETC lpFetc, LPSTGMEDIUM lpStgMedium )
{
- return m_aIDataObject->GetDataHere(lpFetc, lpStgMedium);
+ return m_aIDataObject->GetDataHere(lpFetc, lpStgMedium);
}
STDMETHODIMP CXNotifyingDataObject::GetCanonicalFormatEtc( LPFORMATETC lpFetc, LPFORMATETC lpCanonicalFetc )
{
- return m_aIDataObject->GetCanonicalFormatEtc(lpFetc, lpCanonicalFetc);
+ return m_aIDataObject->GetCanonicalFormatEtc(lpFetc, lpCanonicalFetc);
}
STDMETHODIMP CXNotifyingDataObject::SetData( LPFORMATETC lpFetc, LPSTGMEDIUM lpStgMedium, BOOL bRelease )
-{
- return m_aIDataObject->SetData( lpFetc, lpStgMedium, bRelease );
+{
+ return m_aIDataObject->SetData( lpFetc, lpStgMedium, bRelease );
}
-STDMETHODIMP CXNotifyingDataObject::DAdvise(
+STDMETHODIMP CXNotifyingDataObject::DAdvise(
LPFORMATETC lpFetc, DWORD advf, LPADVISESINK lpAdvSink, DWORD* pdwConnection )
-{
- return m_aIDataObject->DAdvise( lpFetc, advf, lpAdvSink, pdwConnection );
+{
+ return m_aIDataObject->DAdvise( lpFetc, advf, lpAdvSink, pdwConnection );
}
STDMETHODIMP CXNotifyingDataObject::DUnadvise( DWORD dwConnection )
-{
+{
return m_aIDataObject->DUnadvise( dwConnection );
}
STDMETHODIMP CXNotifyingDataObject::EnumDAdvise( LPENUMSTATDATA * ppenumAdvise )
{
- return m_aIDataObject->EnumDAdvise( ppenumAdvise );
+ return m_aIDataObject->EnumDAdvise( ppenumAdvise );
}
CXNotifyingDataObject::operator IDataObject*( )
@@ -154,13 +154,13 @@ void SAL_CALL CXNotifyingDataObject::lostOwnership( )
try
{
if (m_XClipboardOwner.is())
- m_XClipboardOwner->lostOwnership(
+ m_XClipboardOwner->lostOwnership(
static_cast<XClipboardEx*>(m_pWinClipImpl->m_pWinClipboard ), m_XTransferable);
}
catch(RuntimeException&)
{
OSL_ENSURE( sal_False, "RuntimeException caught" );
- }
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx b/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx
index 20b12f7009cd..f52e75f32e99 100644
--- a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,14 +60,14 @@ class CWinClipbImpl;
class CXNotifyingDataObject : public IDataObject
{
public:
- CXNotifyingDataObject(
- const IDataObjectPtr& aIDataObject,
+ CXNotifyingDataObject(
+ const IDataObjectPtr& aIDataObject,
const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable >& aXTransferable,
const com::sun::star::uno::Reference< com::sun::star::datatransfer::clipboard::XClipboardOwner >& aXClipOwner,
CWinClipbImpl* theWinClipImpl );
virtual ~CXNotifyingDataObject() {}
-
+
//-----------------------------------------------------------------
// ole interface implementation
//-----------------------------------------------------------------
@@ -93,12 +93,12 @@ public:
private:
void SAL_CALL lostOwnership( );
-private:
- sal_Int32 m_nRefCnt;
- IDataObjectPtr m_aIDataObject;
- const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > m_XTransferable;
- const com::sun::star::uno::Reference< com::sun::star::datatransfer::clipboard::XClipboardOwner > m_XClipboardOwner;
- CWinClipbImpl* m_pWinClipImpl;
+private:
+ sal_Int32 m_nRefCnt;
+ IDataObjectPtr m_aIDataObject;
+ const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > m_XTransferable;
+ const com::sun::star::uno::Reference< com::sun::star::datatransfer::clipboard::XClipboardOwner > m_XClipboardOwner;
+ CWinClipbImpl* m_pWinClipImpl;
friend class CWinClipbImpl;
};
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 16c0e0f0afd0..ef961fff1001 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -319,7 +319,7 @@ void SAL_CALL CXTDataObject::renderAnyDataAndSetupStgMedium(
stgmedium.hMetaFilePict = OOMFPictToWinMFPict( clipDataStream );
stgmedium.pUnkForRelease = NULL;
}
- else if( CF_ENHMETAFILE == fetc.cfFormat )
+ else if( CF_ENHMETAFILE == fetc.cfFormat )
{
stgmedium.tymed = TYMED_ENHMF;
stgmedium.hMetaFilePict = OOMFPictToWinENHMFPict( clipDataStream );
@@ -474,12 +474,12 @@ void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC&
Sequence< sal_Int8 > aHTMLFormatSequence = TextHtmlToHTMLFormat( aTextHtmlSequence );
sal_uInt32 nBytesToTransfer = aHTMLFormatSequence.getLength( );
-
- renderDataAndSetupStgMedium(
- reinterpret_cast< const sal_Int8* >( aHTMLFormatSequence.getArray( ) ),
- fetc,
- 0,
- nBytesToTransfer,
+
+ renderDataAndSetupStgMedium(
+ reinterpret_cast< const sal_Int8* >( aHTMLFormatSequence.getArray( ) ),
+ fetc,
+ 0,
+ nBytesToTransfer,
stgmedium );
}
@@ -487,12 +487,12 @@ void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC&
// IDataObject->EnumFormatEtc
//------------------------------------------------------------------------
-STDMETHODIMP CXTDataObject::EnumFormatEtc(
+STDMETHODIMP CXTDataObject::EnumFormatEtc(
DWORD dwDirection, IEnumFORMATETC** ppenumFormatetc )
{
- if ( NULL == ppenumFormatetc )
+ if ( NULL == ppenumFormatetc )
return E_INVALIDARG;
-
+
if ( DATADIR_SET == dwDirection )
return E_NOTIMPL;
@@ -505,7 +505,7 @@ STDMETHODIMP CXTDataObject::EnumFormatEtc(
{
*ppenumFormatetc = new CEnumFormatEtc( this, m_FormatEtcContainer );
if ( NULL != *ppenumFormatetc )
- static_cast< LPUNKNOWN >( *ppenumFormatetc )->AddRef( );
+ static_cast< LPUNKNOWN >( *ppenumFormatetc )->AddRef( );
hr = ( NULL != *ppenumFormatetc ) ? S_OK : E_OUTOFMEMORY;
}
@@ -600,9 +600,9 @@ inline
DataFlavor SAL_CALL CXTDataObject::formatEtcToDataFlavor( const FORMATETC& aFormatEtc ) const
{
DataFlavor aFlavor;
-
+
if ( m_FormatRegistrar.hasSynthesizedLocale( ) )
- aFlavor =
+ aFlavor =
m_DataFormatTranslator.getDataFlavorFromFormatEtc( aFormatEtc, m_FormatRegistrar.getSynthesizedLocale( ) );
else
aFlavor = m_DataFormatTranslator.getDataFlavorFromFormatEtc( aFormatEtc );
@@ -614,7 +614,7 @@ DataFlavor SAL_CALL CXTDataObject::formatEtcToDataFlavor( const FORMATETC& aForm
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
inline
@@ -635,28 +635,28 @@ void CXTDataObject::validateFormatEtc( LPFORMATETC lpFormatEtc ) const
!(lpFormatEtc->tymed & TYMED_ENHMF) )
throw CInvalidFormatEtcException( DV_E_TYMED );
- if ( lpFormatEtc->cfFormat == CF_METAFILEPICT &&
+ if ( lpFormatEtc->cfFormat == CF_METAFILEPICT &&
!(lpFormatEtc->tymed & TYMED_MFPICT) )
throw CInvalidFormatEtcException( DV_E_TYMED );
-
- if ( lpFormatEtc->cfFormat == CF_ENHMETAFILE &&
+
+ if ( lpFormatEtc->cfFormat == CF_ENHMETAFILE &&
!(lpFormatEtc->tymed & TYMED_ENHMF) )
throw CInvalidFormatEtcException( DV_E_TYMED );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
//inline
-void SAL_CALL CXTDataObject::setupStgMedium( const FORMATETC& fetc,
+void SAL_CALL CXTDataObject::setupStgMedium( const FORMATETC& fetc,
CStgTransferHelper& stgTransHlp,
STGMEDIUM& stgmedium )
{
stgmedium.pUnkForRelease = NULL;
if ( fetc.cfFormat == CF_METAFILEPICT )
- {
+ {
stgmedium.tymed = TYMED_MFPICT;
stgmedium.hMetaFilePict = static_cast< HMETAFILEPICT >( stgTransHlp.getHGlobal( ) );
}
@@ -676,21 +676,21 @@ void SAL_CALL CXTDataObject::setupStgMedium( const FORMATETC& fetc,
stgTransHlp.getIStream( &stgmedium.pstm );
}
else
- OSL_ASSERT( sal_False );
+ OSL_ASSERT( sal_False );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-inline
+inline
void SAL_CALL CXTDataObject::invalidateStgMedium( STGMEDIUM& stgmedium ) const
{
stgmedium.tymed = TYMED_NULL;
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
inline
@@ -720,7 +720,7 @@ inline void SAL_CALL CXTDataObject::InitializeFormatEtcContainer( )
{
if ( !m_bFormatEtcContainerInitialized )
{
- m_FormatRegistrar.RegisterFormats( m_XTransferable, m_FormatEtcContainer );
+ m_FormatRegistrar.RegisterFormats( m_XTransferable, m_FormatEtcContainer );
m_bFormatEtcContainerInitialized = sal_True;
}
}
@@ -754,7 +754,7 @@ STDMETHODIMP CEnumFormatEtc::QueryInterface( REFIID iid, LPVOID* ppvObject )
*ppvObject = NULL;
- if ( ( __uuidof( IUnknown ) == iid ) ||
+ if ( ( __uuidof( IUnknown ) == iid ) ||
( __uuidof( IEnumFORMATETC ) == iid ) )
{
*ppvObject = static_cast< IUnknown* >( this );
@@ -772,7 +772,7 @@ STDMETHODIMP CEnumFormatEtc::QueryInterface( REFIID iid, LPVOID* ppvObject )
STDMETHODIMP_(ULONG) CEnumFormatEtc::AddRef( )
{
// keep the dataobject alive
- m_lpUnkOuter->AddRef( );
+ m_lpUnkOuter->AddRef( );
return InterlockedIncrement( &m_nRefCnt );
}
@@ -782,7 +782,7 @@ STDMETHODIMP_(ULONG) CEnumFormatEtc::AddRef( )
STDMETHODIMP_(ULONG) CEnumFormatEtc::Release( )
{
- // release the outer dataobject
+ // release the outer dataobject
m_lpUnkOuter->Release( );
ULONG nRefCnt = InterlockedDecrement( &m_nRefCnt );
@@ -798,7 +798,7 @@ STDMETHODIMP_(ULONG) CEnumFormatEtc::Release( )
STDMETHODIMP CEnumFormatEtc::Next( ULONG nRequested, LPFORMATETC lpDest, ULONG* lpFetched )
{
- if ( ( nRequested < 1 ) ||
+ if ( ( nRequested < 1 ) ||
(( nRequested > 1 ) && ( NULL == lpFetched )) ||
IsBadWritePtr( lpDest, sizeof( FORMATETC ) * nRequested ) )
return E_INVALIDARG;
@@ -817,7 +817,7 @@ STDMETHODIMP CEnumFormatEtc::Next( ULONG nRequested, LPFORMATETC lpDest, ULONG*
STDMETHODIMP CEnumFormatEtc::Skip( ULONG celt )
{
- return m_FormatEtcContainer.skipFormatEtc( celt ) ? S_OK : S_FALSE;
+ return m_FormatEtcContainer.skipFormatEtc( celt ) ? S_OK : S_FALSE;
}
//----------------------------------------------------------------------------
@@ -838,10 +838,10 @@ STDMETHODIMP CEnumFormatEtc::Clone( IEnumFORMATETC** ppenum )
{
if ( NULL == ppenum )
return E_INVALIDARG;
-
+
*ppenum = new CEnumFormatEtc( m_lpUnkOuter, m_FormatEtcContainer );
if ( NULL != ppenum )
- static_cast< LPUNKNOWN >( *ppenum )->AddRef( );
+ static_cast< LPUNKNOWN >( *ppenum )->AddRef( );
return ( NULL != *ppenum ) ? S_OK : E_OUTOFMEMORY;
}
diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx
index 1958be4afcbe..2b6540d170d0 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,12 +58,12 @@
a clipboard client ask for the available formats on the clipboard
and decides if there is a format he can use
if there is one, he requests the data in this format
-
- - This class inherits from IDataObject an so can be placed on the
- OleClipboard. The class wrapps a transferable object which is the
+
+ - This class inherits from IDataObject an so can be placed on the
+ OleClipboard. The class wrapps a transferable object which is the
original DataSource
- DataFlavors offerd by this transferable will be translated into
- appropriate clipboard formats
+ appropriate clipboard formats
- if the transferable contains text data always text and unicodetext
will be offered or vice versa
- text data will be automaticaly converted between text und unicode text
@@ -80,7 +80,7 @@ public:
CXTDataObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager,
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& aXTransferable );
virtual ~CXTDataObject() {}
-
+
//-----------------------------------------------------------------
// ole interface implementation
//-----------------------------------------------------------------
@@ -103,15 +103,15 @@ public:
operator IDataObject*( );
-private:
- com::sun::star::datatransfer::DataFlavor SAL_CALL formatEtcToDataFlavor( const FORMATETC& aFormatEtc ) const;
-
+private:
+ com::sun::star::datatransfer::DataFlavor SAL_CALL formatEtcToDataFlavor( const FORMATETC& aFormatEtc ) const;
+
void SAL_CALL renderDataAndSetupStgMedium( const sal_Int8* lpStorage,
- const FORMATETC& fetc,
+ const FORMATETC& fetc,
sal_uInt32 nInitStgSize,
sal_uInt32 nBytesToTransfer,
STGMEDIUM& stgmedium );
-
+
void SAL_CALL renderLocaleAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
void SAL_CALL renderUnicodeAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
void SAL_CALL renderAnyDataAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
@@ -121,29 +121,29 @@ private:
void SAL_CALL renderSynthesizedTextAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
void SAL_CALL renderSynthesizedHtmlAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
- void SAL_CALL setupStgMedium( const FORMATETC& fetc,
- CStgTransferHelper& stgTransHlp,
+ void SAL_CALL setupStgMedium( const FORMATETC& fetc,
+ CStgTransferHelper& stgTransHlp,
STGMEDIUM& stgmedium );
-
- void validateFormatEtc( LPFORMATETC lpFormatEtc ) const;
+
+ void validateFormatEtc( LPFORMATETC lpFormatEtc ) const;
void SAL_CALL invalidateStgMedium( STGMEDIUM& stgmedium ) const;
HRESULT SAL_CALL translateStgExceptionCode( HRESULT hr ) const;
inline void SAL_CALL InitializeFormatEtcContainer( );
-private:
- LONG m_nRefCnt;
+private:
+ LONG m_nRefCnt;
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > m_XTransferable;
- CFormatEtcContainer m_FormatEtcContainer;
+ CFormatEtcContainer m_FormatEtcContainer;
sal_Bool m_bFormatEtcContainerInitialized;
- CDataFormatTranslator m_DataFormatTranslator;
- CFormatRegistrar m_FormatRegistrar;
+ CDataFormatTranslator m_DataFormatTranslator;
+ CFormatRegistrar m_FormatRegistrar;
};
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
class CEnumFormatEtc : public IEnumFORMATETC
@@ -151,22 +151,22 @@ class CEnumFormatEtc : public IEnumFORMATETC
public:
CEnumFormatEtc( LPUNKNOWN lpUnkOuter, const CFormatEtcContainer& aFormatEtcContainer );
virtual ~CEnumFormatEtc() {}
-
- // IUnknown
+
+ // IUnknown
STDMETHODIMP QueryInterface( REFIID iid, LPVOID* ppvObject );
STDMETHODIMP_( ULONG ) AddRef( );
STDMETHODIMP_( ULONG ) Release( );
- //IEnumFORMATETC
+ //IEnumFORMATETC
STDMETHODIMP Next( ULONG nRequested, LPFORMATETC lpDest, ULONG* lpFetched );
STDMETHODIMP Skip( ULONG celt );
STDMETHODIMP Reset( );
STDMETHODIMP Clone( IEnumFORMATETC** ppenum );
private:
- LONG m_nRefCnt;
+ LONG m_nRefCnt;
LPUNKNOWN m_lpUnkOuter;
- CFormatEtcContainer m_FormatEtcContainer;
+ CFormatEtcContainer m_FormatEtcContainer;
};
typedef CEnumFormatEtc *PCEnumFormatEtc;
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index e27cefcc3f22..ce828d611e52 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,14 +54,14 @@
#define IMPL_NAME "com.sun.star.datatransfer.DataFormatTranslator"
#define MODULE_PRIVATE
-#define CPPUTYPE_SEQSALINT8 getCppuType( (const Sequence< sal_Int8 >*) 0 )
-#define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8
-#define CPPUTYPE_OUSTR getCppuType( (const ::rtl::OUString*) 0 )
+#define CPPUTYPE_SEQSALINT8 getCppuType( (const Sequence< sal_Int8 >*) 0 )
+#define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8
+#define CPPUTYPE_OUSTR getCppuType( (const ::rtl::OUString*) 0 )
#define CPPUTYPE_SALINT32 getCppuType( ( sal_Int32 * ) 0 )
-#define OUSTR( str ) OUString::createFromAscii( #str )
+#define OUSTR( str ) OUString::createFromAscii( #str )
#define OUSTR_( str ) OUString::createFromAscii( str )
#define EMPTY_OUSTR OUString::createFromAscii( "" )
-//#define PRIVATE_OO OUString::createFromAscii( "application/x-openoffice;" "windows_formatname=" )
+//#define PRIVATE_OO OUString::createFromAscii( "application/x-openoffice;" "windows_formatname=" )
const rtl::OUString Windows_FormatName = rtl::OUString::createFromAscii("windows_formatname");
const com::sun::star::uno::Type CppuType_ByteSequence = ::getCppuType((const com::sun::star::uno::Sequence<sal_Int8>*)0);
@@ -124,7 +124,7 @@ FormatEntry::FormatEntry(
aStandardFormatId = std_clipboard_format_id;
}
-
+
//------------------------------------------------------------------------
// ctor
//------------------------------------------------------------------------
@@ -132,7 +132,7 @@ FormatEntry::FormatEntry(
CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFactory >& rSrvMgr ) :
m_SrvMgr( rSrvMgr )
{
- initTranslationTable( );
+ initTranslationTable( );
}
//------------------------------------------------------------------------
@@ -240,7 +240,7 @@ OUString SAL_CALL CDataFormatTranslator::getImplementationName( )
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
sal_Bool SAL_CALL CDataFormatTranslator::supportsService( const OUString& ServiceName )
@@ -256,7 +256,7 @@ sal_Bool SAL_CALL CDataFormatTranslator::supportsService( const OUString& Servic
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
Sequence< OUString > SAL_CALL CDataFormatTranslator::getSupportedServiceNames( )
@@ -275,23 +275,23 @@ Sequence< OUString > SAL_CALL CDataFormatTranslator::getSupportedServiceNames( )
// -------------------------------------------------
void SAL_CALL CDataFormatTranslator::initTranslationTable()
-{
+{
//SOT_FORMATSTR_ID_DIF
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-dif;windows_formatname=\"DIF\"", "DIF", "DIF", CF_DIF, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-dif;windows_formatname=\"DIF\"", "DIF", "DIF", CF_DIF, CPPUTYPE_DEFAULT));
// SOT_FORMAT_BITMAP
m_TranslTable.push_back(FormatEntry("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", "Bitmap", CF_DIB, CPPUTYPE_DEFAULT));
- // SOT_FORMAT_STRING
+ // SOT_FORMAT_STRING
m_TranslTable.push_back(FormatEntry("text/plain;charset=utf-16", "Unicode-Text", "", CF_UNICODETEXT, CppuType_String));
// Format Locale - for internal use
m_TranslTable.push_back(FormatEntry("application/x-openoffice-locale;windows_formatname=\"Locale\"", "Locale", "Locale", CF_LOCALE, CPPUTYPE_DEFAULT));
// SOT_FORMAT_WMF
m_TranslTable.push_back(FormatEntry("application/x-openoffice-wmf;windows_formatname=\"Image WMF\"", "Windows MetaFile", "Image WMF", CF_METAFILEPICT, CPPUTYPE_DEFAULT));
- // SOT_FORMAT_EMF
+ // SOT_FORMAT_EMF
m_TranslTable.push_back(FormatEntry("application/x-openoffice-emf;windows_formatname=\"Image EMF\"", "Windows Enhanced MetaFile", "Image EMF", CF_ENHMETAFILE, CPPUTYPE_DEFAULT));
- // SOT_FORMAT_FILE_LIST
+ // SOT_FORMAT_FILE_LIST
m_TranslTable.push_back(FormatEntry("application/x-openoffice-filelist;windows_formatname=\"FileList\"", "FileList", "FileList", CF_HDROP, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SYLK
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-sylk;windows_formatname=\"Sylk\"", "Sylk", "Sylk", CF_SYLK, CPPUTYPE_DEFAULT ) );
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-sylk;windows_formatname=\"Sylk\"", "Sylk", "Sylk", CF_SYLK, CPPUTYPE_DEFAULT ) );
// SOT_FORMAT_GDIMETAFILE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"", "GDIMetaFile", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMAT_PRIVATE
@@ -301,19 +301,19 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
// SOT_FORMAT_RTF
m_TranslTable.push_back(FormatEntry("text/richtext", "Rich Text Format", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_DRAWING
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"", "Drawing Format", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"", "Drawing Format", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_SVXB
m_TranslTable.push_back(FormatEntry("application/x-openoffice-svbx;windows_formatname=\"SVXB (StarView Bitmap/Animation)\"", "SVXB (StarView Bitmap/Animation)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_SVIM
m_TranslTable.push_back(FormatEntry("application/x-openoffice-svim;windows_formatname=\"SVIM (StarView ImageMap)\"", "SVIM (StarView ImageMap)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_XFA
m_TranslTable.push_back(FormatEntry("application/x-openoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr)\"", "XFA (XOutDev FillAttr)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
- // SOT_FORMATSTR_ID_EDITENGINE
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-editengine;windows_formatname=\"EditEngineFormat\"", "EditEngineFormat", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ // SOT_FORMATSTR_ID_EDITENGINE
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-editengine;windows_formatname=\"EditEngineFormat\"", "EditEngineFormat", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_INTERNALLINK_STATE
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-internallink-state;windows_formatname=\"StatusInfo vom SvxInternalLink\"", "StatusInfo vom SvxInternalLink", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-internallink-state;windows_formatname=\"StatusInfo vom SvxInternalLink\"", "StatusInfo vom SvxInternalLink", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_SOLK
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-solk;windows_formatname=\"SOLK (StarOffice Link)\"", "SOLK (StarOffice Link)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-solk;windows_formatname=\"SOLK (StarOffice Link)\"", "SOLK (StarOffice Link)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK
m_TranslTable.push_back(FormatEntry("application/x-openoffice-netscape-bookmark;windows_formatname=\"Netscape Bookmark\"", "Netscape Bookmark", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_TREELISTBOX
@@ -321,7 +321,7 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
// SOT_FORMATSTR_ID_NATIVE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-native;windows_formatname=\"Native\"", "Native", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_OWNERLINK
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-ownerlink;windows_formatname=\"OwnerLink\"", "OwnerLink", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-ownerlink;windows_formatname=\"OwnerLink\"", "OwnerLink", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_STARSERVER
m_TranslTable.push_back(FormatEntry("application/x-openoffice-starserver;windows_formatname=\"StarServerFormat\"", "StarServerFormat", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_STAROBJECT
@@ -361,7 +361,7 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
// SOT_FORMATSTR_ID_STARCHART
m_TranslTable.push_back(FormatEntry("application/x-openoffice-starchart;windows_formatname=\"StarChartDocument\"", "StarChartDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_STARCHART_40
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-starchart-40;windows_formatname=\"StarChartDocument 4.0\"", "StarChartDocument 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-starchart-40;windows_formatname=\"StarChartDocument 4.0\"", "StarChartDocument 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
// SOT_FORMATSTR_ID_STARCHART_50
m_TranslTable.push_back(FormatEntry("application/x-openoffice-starchart-50;windows_formatname=\"StarChart 5.0\"", "StarChart 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STARIMAGE
@@ -369,7 +369,7 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
//SOT_FORMATSTR_ID_STARIMAGE_40
m_TranslTable.push_back(FormatEntry("application/x-openoffice-starimage-40;windows_formatname=\"StarImageDocument 4.0\"", "StarImageDocument 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STARIMAGE_50
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-starimage-50;windows_formatname=\"StarImage 5.0\"", "StarImage 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-starimage-50;windows_formatname=\"StarImage 5.0\"", "StarImage 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STARMATH
m_TranslTable.push_back(FormatEntry("application/x-openoffice-starmath;windows_formatname=\"StarMath\"", "StarMath", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STARMATH_40
@@ -377,7 +377,7 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
//SOT_FORMATSTR_ID_STARMATH_50
m_TranslTable.push_back(FormatEntry("application/x-openoffice-starmath-50;windows_formatname=\"StarMath 5.0\"", "StarMath 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-starobject-paintdoc;windows_formatname=\"StarObjectPaintDocument\"", "StarObjectPaintDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-starobject-paintdoc;windows_formatname=\"StarObjectPaintDocument\"", "StarObjectPaintDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_FILLED_AREA
m_TranslTable.push_back(FormatEntry("application/x-openoffice-filled-area;windows_formatname=\"FilledArea\"", "FilledArea", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_HTML
@@ -389,32 +389,32 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
//SOT_FORMATSTR_ID_CNT_MSGATTACHFILE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-msgattachfile;windows_formatname=\"CNT_MSGATTACHFILE_FORMAT\"", "CNT_MSGATTACHFILE_FORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_BIFF_5
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-biff5;windows_formatname=\"Biff5\"", "Biff5", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-biff5;windows_formatname=\"Biff5\"", "Biff5", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_BIFF__5
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-biff-5;windows_formatname=\"Biff 5\"", "Biff 5", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-biff-5;windows_formatname=\"Biff 5\"", "Biff 5", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_BIFF_8
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-biff-8;windows_formatname=\"Biff8\"", "Biff8", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-biff-8;windows_formatname=\"Biff8\"", "Biff8", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SYLK_BIGCAPS
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-sylk-bigcaps;windows_formatname=\"SYLK\"", "SYLK", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-sylk-bigcaps;windows_formatname=\"SYLK\"", "SYLK", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_LINK
m_TranslTable.push_back(FormatEntry("application/x-openoffice-link;windows_formatname=\"Link\"", "Link", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STARDRAW_TABBAR
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-stardraw-tabbar;windows_formatname=\"StarDraw TabBar\"", "StarDraw TabBar", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-stardraw-tabbar;windows_formatname=\"StarDraw TabBar\"", "StarDraw TabBar", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SONLK
m_TranslTable.push_back(FormatEntry("application/x-openoffice-sonlk;windows_formatname=\"SONLK (StarOffice Navi Link)\"", "SONLK (StarOffice Navi Link)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_MSWORD_DOC
- m_TranslTable.push_back(FormatEntry("application/msword", "MSWordDoc", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/msword", "MSWordDoc", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STAR_FRAMESET_DOC
m_TranslTable.push_back(FormatEntry("application/x-openoffice-star-frameset-doc;windows_formatname=\"StarFrameSetDocument\"", "StarFrameSetDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_OFFICE_DOC
m_TranslTable.push_back(FormatEntry("application/x-openoffice-office-doc;windows_formatname=\"OfficeDocument\"", "OfficeDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_NOTES_DOCINFO
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-notes-docinfo;windows_formatname=\"NotesDocInfo\"", "NotesDocInfo", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-notes-docinfo;windows_formatname=\"NotesDocInfo\"", "NotesDocInfo", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_NOTES_HNOTE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-notes-hnote;windows_formatname=\"NoteshNote\"", "NoteshNote", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_NOTES_NATIVE
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-notes-native;windows_formatname=\"Native\"", "Native", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
- //SOT_FORMATSTR_ID_SFX_DOC
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-notes-native;windows_formatname=\"Native\"", "Native", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ //SOT_FORMATSTR_ID_SFX_DOC
m_TranslTable.push_back(FormatEntry("application/x-openoffice-sfx-doc;windows_formatname=\"SfxDocument\"", "SfxDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_EVDF
m_TranslTable.push_back(FormatEntry("application/x-openoffice-evdf;windows_formatname=\"EVDF (Explorer View Dummy Format)\"", "EVDF (Explorer View Dummy Format)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
@@ -423,9 +423,9 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
//SOT_FORMATSTR_ID_IDF
m_TranslTable.push_back(FormatEntry("application/x-openoffice-idf;windows_formatname=\"IDF (Iconview Dummy Format)\"", "IDF (Iconview Dummy Format)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_EFTP
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-eftp;windows_formatname=\"EFTP (Explorer Ftp File)\"", "EFTP (Explorer Ftp File)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-eftp;windows_formatname=\"EFTP (Explorer Ftp File)\"", "EFTP (Explorer Ftp File)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_EFD
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-efd;windows_formatname=\"EFD (Explorer Ftp Dir)\"", "EFD (Explorer Ftp Dir)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-efd;windows_formatname=\"EFD (Explorer Ftp Dir)\"", "EFD (Explorer Ftp Dir)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH
m_TranslTable.push_back(FormatEntry("application/x-openoffice-svx-formfieldexch;windows_formatname=\"SvxFormFieldExch\"", "SvxFormFieldExch", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_EXTENDED_TABBAR
@@ -433,13 +433,13 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
//SOT_FORMATSTR_ID_SBA_DATAEXCHANGE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-dataexchange;windows_formatname=\"SBA-DATAFORMAT\"", "SBA-DATAFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-fielddataexchange;windows_formatname=\"SBA-FIELDFORMAT\"", "SBA-FIELDFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-fielddataexchange;windows_formatname=\"SBA-FIELDFORMAT\"", "SBA-FIELDFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SBA_PRIVATE_URL
m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-private-url;windows_formatname=\"SBA-PRIVATEURLFORMAT\"", "SBA-PRIVATEURLFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SBA_TABED
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-tabed;windows_formatname=\"Tabed\"", "Tabed", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-tabed;windows_formatname=\"Tabed\"", "Tabed", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SBA_TABID
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-tabid;windows_formatname=\"Tabid\"", "Tabid", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-tabid;windows_formatname=\"Tabid\"", "Tabid", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SBA_JOIN
m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-join;windows_formatname=\"SBA-JOINFORMAT\"", "SBA-JOINFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_OBJECTDESCRIPTOR
@@ -453,27 +453,27 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
//SOT_FORMATSTR_ID_EMBEDDED_OBJ
m_TranslTable.push_back(FormatEntry("application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star Embedded Object (XML)\"", "Star Embedded Object (XML)", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_FILECONTENT
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-filecontent;windows_formatname=\"" CFSTR_FILECONTENTS "\"", CFSTR_FILECONTENTS, NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-filecontent;windows_formatname=\"" CFSTR_FILECONTENTS "\"", CFSTR_FILECONTENTS, NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR
m_TranslTable.push_back(FormatEntry("application/x-openoffice-filegrpdescriptor;windows_formatname=\"" CFSTR_FILEDESCRIPTOR "\"", CFSTR_FILEDESCRIPTOR, NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_FILENAME
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-filename;windows_formatname=\"" CFSTR_FILENAME "\"", CFSTR_FILENAME, NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-filename;windows_formatname=\"" CFSTR_FILENAME "\"", CFSTR_FILENAME, NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SD_OLE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-sd-ole;windows_formatname=\"SD-OLE\"", "SD-OLE", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-embedded-obj-ole;windows_formatname=\"Embedded Object\"", "Embedded Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-embedded-obj-ole;windows_formatname=\"Embedded Object\"", "Embedded Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_EMBED_SOURCE_OLE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-embed-source-ole;windows_formatname=\"Embed Source\"", "Embed Source", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-objectdescriptor-ole;windows_formatname=\"Object Descriptor\"", "Object Descriptor", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-objectdescriptor-ole;windows_formatname=\"Object Descriptor\"", "Object Descriptor", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR_OLE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-linkdescriptor-ole;windows_formatname=\"Link Source Descriptor\"", "Link Source Descriptor", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_LINK_SOURCE_OLE
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-link-source-ole;windows_formatname=\"Link Source\"", "Link Source", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-link-source-ole;windows_formatname=\"Link Source\"", "Link Source", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-ctrldataexchange;windows_formatname=\"SBA-CTRLFORMAT\"", "SBA-CTRLFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_OUTPLACE_OBJ
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-outplace-obj;windows_formatname=\"OutPlace Object\"", "OutPlace Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-outplace-obj;windows_formatname=\"OutPlace Object\"", "OutPlace Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_CNT_OWN_CLIP
m_TranslTable.push_back(FormatEntry("application/x-openoffice-cnt-own-clip;windows_formatname=\"CntOwnClipboard\"", "CntOwnClipboard", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_INET_IMAGE
@@ -481,19 +481,19 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
//SOT_FORMATSTR_ID_NETSCAPE_IMAGE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-netscape-image;windows_formatname=\"Netscape Image Format\"", "Netscape Image Format", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_SBA_FORMEXCHANGE
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-formexchange;windows_formatname=\"SBA_FORMEXCHANGE\"", "SBA_FORMEXCHANGE", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); //SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-formexchange;windows_formatname=\"SBA_FORMEXCHANGE\"", "SBA_FORMEXCHANGE", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); //SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE
m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-reportexchange;windows_formatname=\"SBA_REPORTEXCHANGE\"", "SBA_REPORTEXCHANGE", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR
m_TranslTable.push_back(FormatEntry("application/x-openoffice-uniformresourcelocator;windows_formatname=\"UniformResourceLocator\"", "UniformResourceLocator", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50
m_TranslTable.push_back(FormatEntry("application/x-openoffice-starchartdocument-50;windows_formatname=\"StarChartDocument 5.0\"", "StarChartDocument 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_GRAPHOBJ
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-graphobj;windows_formatname=\"Graphic Object\"", "Graphic Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
- //SOT_FORMATSTR_ID_STARWRITER_60
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-graphobj;windows_formatname=\"Graphic Object\"", "Graphic Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ //SOT_FORMATSTR_ID_STARWRITER_60
m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.writer", "Writer 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STARWRITERWEB_60
m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.writer.web", "Writer/Web 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
- //SOT_FORMATSTR_ID_STARWRITERGLOB_60
+ //SOT_FORMATSTR_ID_STARWRITERGLOB_60
m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.writer.global", "Writer/Global 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_STARWDRAW_60
m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.draw", "Draw 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
@@ -512,7 +512,7 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
//SOT_FORMATSTR_ID_DUMMY3
m_TranslTable.push_back(FormatEntry("application/x-openoffice-dummy3;windows_formatname=\"SO_DUMMYFORMAT_3\"", "SO_DUMMYFORMAT_3", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_DUMMY4
- m_TranslTable.push_back(FormatEntry("application/x-openoffice-dummy4;windows_formatname=\"SO_DUMMYFORMAT_4\"", "SO_DUMMYFORMAT_4", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("application/x-openoffice-dummy4;windows_formatname=\"SO_DUMMYFORMAT_4\"", "SO_DUMMYFORMAT_4", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
}
// -------------------------------------------------
diff --git a/dtrans/source/win32/ftransl/ftransl.hxx b/dtrans/source/win32/ftransl/ftransl.hxx
index 7adbfdae61a2..d3da0f8c8698 100644
--- a/dtrans/source/win32/ftransl/ftransl.hxx
+++ b/dtrans/source/win32/ftransl/ftransl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,8 +69,8 @@ struct FormatEntry
);
com::sun::star::datatransfer::DataFlavor aDataFlavor;
- rtl::OUString aNativeFormatName;
- sal_Int32 aStandardFormatId;
+ rtl::OUString aNativeFormatName;
+ sal_Int32 aStandardFormatId;
};
//------------------------------------------------
@@ -99,7 +99,7 @@ public:
// XServiceInfo
//------------------------------------------------
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
@@ -124,8 +124,8 @@ private:
com::sun::star::datatransfer::DataFlavor SAL_CALL mkDataFlv( const rtl::OUString& cnttype, const rtl::OUString& hpname, ::com::sun::star::uno::Type dtype );
private:
- std::vector< FormatEntry > m_TranslTable;
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
+ std::vector< FormatEntry > m_TranslTable;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
};
diff --git a/dtrans/source/win32/ftransl/ftransl.xml b/dtrans/source/win32/ftransl/ftransl.xml
index 28cddad4bbab..0e23f39aed4d 100644
--- a/dtrans/source/win32/ftransl/ftransl.xml
+++ b/dtrans/source/win32/ftransl/ftransl.xml
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name> ftransl </module-name>
+ <module-name> ftransl </module-name>
<component-description>
<author> Tino Rachui </author>
- <name> com.sun.star.comp.datatransfer.DataFormatTranslator </name>
+ <name> com.sun.star.comp.datatransfer.DataFormatTranslator </name>
<description>
The win32 implementation of the datatransfer service.
</description>
- <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
- <language> c++ </language>
+ <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
+ <language> c++ </language>
<status value="beta"/>
- <supported-service> com.sun.star.datatransfer.DataFormatTranslator </supported-service>
- <service-dependency> ... </service-dependency>
- <type> com.sun.star.datatransfer.XDataFormatTranslator </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.uno.TypeClass </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.registry.XRegistryKey </type>
- <type> com.sun.star.container.XSet </type>
+ <supported-service> com.sun.star.datatransfer.DataFormatTranslator </supported-service>
+ <service-dependency> ... </service-dependency>
+ <type> com.sun.star.datatransfer.XDataFormatTranslator </type>
+ <type> com.sun.star.lang.XMultiServiceFactory </type>
+ <type> com.sun.star.lang.XSingleServiceFactory </type>
+ <type> com.sun.star.lang.XServiceInfo </type>
+ <type> com.sun.star.lang.XTypeProvider </type>
+ <type> com.sun.star.uno.TypeClass </type>
+ <type> com.sun.star.uno.XWeak </type>
+ <type> com.sun.star.uno.XAggregation </type>
+ <type> com.sun.star.registry.XRegistryKey </type>
+ <type> com.sun.star.container.XSet </type>
</component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper </runtime-module-dependency>
- <runtime-module-dependency> cppu2 </runtime-module-dependency>
- <runtime-module-dependency> sal2 </runtime-module-dependency>
+ <project-build-dependency> cppuhelper </project-build-dependency>
+ <project-build-dependency> cppu </project-build-dependency>
+ <project-build-dependency> sal </project-build-dependency>
+ <runtime-module-dependency> cppuhelper </runtime-module-dependency>
+ <runtime-module-dependency> cppu2 </runtime-module-dependency>
+ <runtime-module-dependency> sal2 </runtime-module-dependency>
</module-description>
diff --git a/dtrans/source/win32/ftransl/ftranslentry.cxx b/dtrans/source/win32/ftransl/ftranslentry.cxx
index 3d5bd247a199..092f740900b7 100644
--- a/dtrans/source/win32/ftransl/ftranslentry.cxx
+++ b/dtrans/source/win32/ftransl/ftranslentry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@
#include "precompiled_dtrans.hxx"
//-----------------------------------------------------------------
-// includes of other projects
+// includes of other projects
//-----------------------------------------------------------------
#include <cppuhelper/factory.hxx>
#include <com/sun/star/container/XSet.hpp>
@@ -46,36 +46,36 @@
// the service names
#define SERVICE_NAME "com.sun.star.datatransfer.DataFormatTranslator"
-// the implementation names
+// the implementation names
#define IMPL_NAME "com.sun.star.datatransfer.DataFormatTranslator"
// the registry key names
// a key under which this service will be registered, Format: -> "/ImplName/UNO/SERVICES/ServiceName"
-// < Implementation-Name ></UNO/SERVICES/>< Service-Name >
+// < Implementation-Name ></UNO/SERVICES/>< Service-Name >
#define REGKEY_NAME "/com.sun.star.datatransfer.DataFormatTranslator/UNO/SERVICES/com.sun.star.datatransfer.DataFormatTranslator"
//-----------------------------------------------------------------------------------------------------------
// namespace directives
//-----------------------------------------------------------------------------------------------------------
-using namespace ::rtl ;
-using namespace ::cppu ;
-using namespace ::com::sun::star::uno ;
-using namespace ::com::sun::star::registry ;
+using namespace ::rtl ;
+using namespace ::cppu ;
+using namespace ::com::sun::star::uno ;
+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
+ // so we should give it to every UNO-Implementation component
//-----------------------------------------------------------------------------------------------------------
Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
@@ -85,10 +85,10 @@ namespace
}
//-----------------------------------------------------------------------------------------------------------
-// the 3 important functions which will be exported
+// the 3 important functions which will be exported
//-----------------------------------------------------------------------------------------------------------
-extern "C"
+extern "C"
{
//----------------------------------------------------------------------
@@ -116,13 +116,13 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
{
try
{
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
+ Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( REGKEY_NAME ) ) );
bRetVal = sal_True;
}
catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
+ {
+ OSL_ENSURE(sal_False, "InvalidRegistryException caught");
bRetVal = sal_False;
}
}
@@ -131,7 +131,7 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
}
//----------------------------------------------------------------------
-// component_getFactory
+// component_getFactory
// returns a factory to create XFilePicker-Services
//----------------------------------------------------------------------
@@ -142,8 +142,8 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) );
-
+ aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) );
+
Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
OUString::createFromAscii( pImplName ),
@@ -153,7 +153,7 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
{
xFactory->acquire();
pRet = xFactory.get();
- }
+ }
}
return pRet;
diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx
index a04c588977d1..30886d72d456 100644
--- a/dtrans/source/win32/misc/ImplHelper.cxx
+++ b/dtrans/source/win32/misc/ImplHelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,7 +66,7 @@ using ::rtl::OUString;
using ::rtl::OString;
//------------------------------------------------------------------------
-// returns a windows codepage appropriate to the
+// returns a windows codepage appropriate to the
// given mime charset parameter value
//------------------------------------------------------------------------
@@ -76,10 +76,10 @@ sal_uInt32 SAL_CALL getWinCPFromMimeCharset( const OUString& charset )
if ( charset.getLength( ) )
{
- OString osCharset(
+ OString osCharset(
charset.getStr( ), charset.getLength( ), RTL_TEXTENCODING_ASCII_US );
- rtl_TextEncoding txtEnc =
+ rtl_TextEncoding txtEnc =
rtl_getTextEncodingFromMimeCharset( osCharset.getStr( ) );
sal_uInt32 winChrs = rtl_getBestWindowsCharsetFromTextEncoding( txtEnc );
@@ -87,10 +87,10 @@ sal_uInt32 SAL_CALL getWinCPFromMimeCharset( const OUString& charset )
CHARSETINFO chrsInf;
sal_Bool bRet = TranslateCharsetInfo( (DWORD*)winChrs, &chrsInf, TCI_SRCCHARSET ) ?
sal_True : sal_False;
-
+
// if one of the above functions fails
// we will return the current ANSI codepage
- // of this thread
+ // of this thread
if ( bRet )
winCP = chrsInf.ciACP;
}
@@ -106,10 +106,10 @@ sal_uInt32 SAL_CALL getWinCPFromMimeCharset( const OUString& charset )
OUString SAL_CALL getWinCPFromLocaleId( LCID lcid, LCTYPE lctype )
{
OSL_ASSERT( IsValidLocale( lcid, LCID_SUPPORTED ) );
-
- // we set an default value
+
+ // we set an default value
OUString winCP;
-
+
// set an default value
if ( LOCALE_IDEFAULTCODEPAGE == lctype )
{
@@ -125,14 +125,14 @@ OUString SAL_CALL getWinCPFromLocaleId( LCID lcid, LCTYPE lctype )
// we use the GetLocaleInfoA because don't want to provide
// a unicode wrapper function for Win9x in sal/systools
char buff[6];
- sal_Int32 nResult = GetLocaleInfoA(
+ sal_Int32 nResult = GetLocaleInfoA(
lcid, lctype | LOCALE_USE_CP_ACP, buff, sizeof( buff ) );
-
+
OSL_ASSERT( nResult );
if ( nResult )
{
- sal_Int32 len = MultiByteToWideChar(
+ sal_Int32 len = MultiByteToWideChar(
CP_ACP, 0, buff, -1, NULL, 0 );
OSL_ASSERT( len > 0 );
@@ -141,7 +141,7 @@ OUString SAL_CALL getWinCPFromLocaleId( LCID lcid, LCTYPE lctype )
if ( NULL != lpwchBuff.get( ) )
{
- len = MultiByteToWideChar(
+ len = MultiByteToWideChar(
CP_ACP, 0, buff, -1, reinterpret_cast<LPWSTR>(lpwchBuff.get( )), len );
winCP = OUString( lpwchBuff.get( ), (len - 1) );
@@ -153,7 +153,7 @@ OUString SAL_CALL getWinCPFromLocaleId( LCID lcid, LCTYPE lctype )
//--------------------------------------------------
// returns a mime charset parameter value appropriate
-// to the given codepage, optional a prefix can be
+// to the given codepage, optional a prefix can be
// given, e.g. "windows-" or "cp"
//--------------------------------------------------
@@ -163,7 +163,7 @@ OUString SAL_CALL getMimeCharsetFromWinCP( sal_uInt32 cp, const OUString& aPrefi
}
//--------------------------------------------------
-// returns a mime charset parameter value appropriate
+// 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"
//--------------------------------------------------
@@ -186,10 +186,10 @@ sal_Bool SAL_CALL IsOEMCP( sal_uInt32 codepage )
775, 850, 852, 855, 857, 860,
861, 862, 863, 864, 865, 866,
869, 874, 932, 936, 949, 950, 1361 };
-
+
for ( sal_Int8 i = 0; i < ( sizeof( arrOEMCP )/sizeof( sal_uInt32 ) ); ++i )
if ( arrOEMCP[i] == codepage )
- return sal_True;
+ return sal_True;
return sal_False;
}
@@ -280,14 +280,14 @@ DVTARGETDEVICE* SAL_CALL CopyTargetDevice( DVTARGETDEVICE* ptdSrc )
if ( NULL != ptdSrc )
{
ptdDest = static_cast< DVTARGETDEVICE* >( CoTaskMemAlloc( ptdSrc->tdSize ) );
- rtl_copyMemory( ptdDest, ptdSrc, static_cast< size_t >( ptdSrc->tdSize ) );
+ rtl_copyMemory( ptdDest, ptdSrc, static_cast< size_t >( ptdSrc->tdSize ) );
}
}
#ifdef __MINGW32__
han.Reset();
#else
__except( EXCEPTION_EXECUTE_HANDLER )
- {
+ {
}
#endif
@@ -316,9 +316,9 @@ DVTARGETDEVICE* SAL_CALL CopyTargetDevice( DVTARGETDEVICE* ptdSrc )
// petcSrc pointer to source FORMATETC
//
// Return Value:
-// 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
+// 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 )
@@ -339,15 +339,15 @@ sal_Bool SAL_CALL CopyFormatEtc( LPFORMATETC petcDest, LPFORMATETC petcSrc )
{
petcDest->cfFormat = petcSrc->cfFormat;
-
+
petcDest->ptd = NULL;
if ( NULL != petcSrc->ptd )
petcDest->ptd = CopyTargetDevice(petcSrc->ptd);
-
+
petcDest->dwAspect = petcSrc->dwAspect;
petcDest->lindex = petcSrc->lindex;
petcDest->tymed = petcSrc->tymed;
-
+
bRet = sal_True;
}
}
@@ -368,9 +368,9 @@ sal_Bool SAL_CALL CopyFormatEtc( LPFORMATETC petcDest, LPFORMATETC petcSrc )
//-------------------------------------------------------------------------
// returns:
-// 1 for exact match,
-// 0 for no match,
-// -1 for partial match (which is defined to mean the left is a subset
+// 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).
//-------------------------------------------------------------------------
@@ -390,7 +390,7 @@ sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLhs, const FORMATETC*
#endif
if ( pFetcLhs != pFetcRhs )
- if ( ( pFetcLhs->cfFormat != pFetcRhs->cfFormat ) ||
+ if ( ( pFetcLhs->cfFormat != pFetcRhs->cfFormat ) ||
( pFetcLhs->lindex != pFetcRhs->lindex ) ||
!CompareTargetDevice( pFetcLhs->ptd, pFetcRhs->ptd ) )
{
@@ -467,10 +467,10 @@ sal_Bool SAL_CALL CompareTargetDevice( DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE*
// one ot the two is NULL
else if ( ( NULL != ptdRight ) && ( NULL != ptdLeft ) )
+
+ if ( ptdLeft->tdSize == ptdRight->tdSize )
- if ( ptdLeft->tdSize == ptdRight->tdSize )
-
- if ( rtl_compareMemory( ptdLeft, ptdRight, ptdLeft->tdSize ) == 0 )
+ if ( rtl_compareMemory( ptdLeft, ptdRight, ptdLeft->tdSize ) == 0 )
bRet = sal_True;
}
#ifdef __MINGW32__
diff --git a/dtrans/source/win32/misc/ImplHelper.hxx b/dtrans/source/win32/misc/ImplHelper.hxx
index 9255eb195561..ea2416f001c7 100644
--- a/dtrans/source/win32/misc/ImplHelper.hxx
+++ b/dtrans/source/win32/misc/ImplHelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,11 +59,11 @@ DVTARGETDEVICE* SAL_CALL CopyTargetDevice(DVTARGETDEVICE* ptdSrc);
// some codepage helper functions
//--------------------------------------------------
-// returns a windows codepage appropriate to the
+// returns a windows codepage appropriate to the
// given mime charset parameter value
//--------------------------------------------------
-sal_uInt32 SAL_CALL getWinCPFromMimeCharset(
+sal_uInt32 SAL_CALL getWinCPFromMimeCharset(
const rtl::OUString& charset );
//--------------------------------------------------
@@ -71,25 +71,25 @@ sal_uInt32 SAL_CALL getWinCPFromMimeCharset(
// given locale and locale type
//--------------------------------------------------
-rtl::OUString SAL_CALL getWinCPFromLocaleId(
+rtl::OUString SAL_CALL getWinCPFromLocaleId(
LCID lcid, LCTYPE lctype );
//--------------------------------------------------
// returns a mime charset parameter value appropriate
-// to the given codepage, optional a prefix can be
+// to the given codepage, optional a prefix can be
// given, e.g. "windows-" or "cp"
//--------------------------------------------------
-rtl::OUString SAL_CALL getMimeCharsetFromWinCP(
+rtl::OUString SAL_CALL getMimeCharsetFromWinCP(
sal_uInt32 cp, const rtl::OUString& aPrefix );
//--------------------------------------------------
-// returns a mime charset parameter value appropriate
+// 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"
//--------------------------------------------------
-rtl::OUString SAL_CALL getMimeCharsetFromLocaleId(
+rtl::OUString SAL_CALL getMimeCharsetFromLocaleId(
LCID lcid, LCTYPE lctype, const rtl::OUString& aPrefix );
//-----------------------------------------------------
diff --git a/dtrans/source/win32/misc/WinClip.hxx b/dtrans/source/win32/misc/WinClip.hxx
index 139eac50cfff..4858f0cef329 100644
--- a/dtrans/source/win32/misc/WinClip.hxx
+++ b/dtrans/source/win32/misc/WinClip.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dtrans/source/win32/mtaole/MtaOleClipb.cxx b/dtrans/source/win32/mtaole/MtaOleClipb.cxx
index d72eb0451332..2636208b9df0 100644
--- a/dtrans/source/win32/mtaole/MtaOleClipb.cxx
+++ b/dtrans/source/win32/mtaole/MtaOleClipb.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,14 +36,14 @@
the ole clipboard, which runs only in an sta thread.
The consequence is that callback from the ole clipboard are in the
context of this sta thread. In the soffice applications this may lead
- to problems because they all use the one and only mutex called
+ to problems because they all use the one and only mutex called
SolarMutex.
- In order to transfer clipboard requests to our sta thread we use a
+ In order to transfer clipboard requests to our sta thread we use a
hidden window an forward these requests via window messages.
*/
#ifdef _MSC_VER
-#pragma warning( disable : 4786 ) // identifier was truncated to 'number'
+#pragma warning( disable : 4786 ) // identifier was truncated to 'number'
// characters in the debug information
#endif
@@ -62,7 +62,7 @@
#endif
//----------------------------------------------------------------
-// namespace directives
+// namespace directives
//----------------------------------------------------------------
using osl::Condition;
@@ -71,7 +71,7 @@ using osl::MutexGuard;
using osl::ClearableMutexGuard;
//----------------------------------------------------------------
-// defines
+// defines
//----------------------------------------------------------------
namespace /* private */
@@ -84,26 +84,26 @@ namespace /* private */
//--------------------------------------------------------
const sal_uInt32 MSG_SETCLIPBOARD = WM_USER + 0x0001;
- const sal_uInt32 MSG_GETCLIPBOARD = WM_USER + 0x0002;
- const sal_uInt32 MSG_REGCLIPVIEWER = WM_USER + 0x0003;
- const sal_uInt32 MSG_FLUSHCLIPBOARD = WM_USER + 0x0004;
- const sal_uInt32 MSG_SHUTDOWN = WM_USER + 0x0005;
+ const sal_uInt32 MSG_GETCLIPBOARD = WM_USER + 0x0002;
+ const sal_uInt32 MSG_REGCLIPVIEWER = WM_USER + 0x0003;
+ const sal_uInt32 MSG_FLUSHCLIPBOARD = WM_USER + 0x0004;
+ const sal_uInt32 MSG_SHUTDOWN = WM_USER + 0x0005;
- const sal_uInt32 MAX_WAITTIME = 10000; // msec
- const sal_uInt32 MAX_WAIT_SHUTDOWN = 10000; // msec
- const sal_uInt32 MAX_CLIPEVENT_PROCESSING_TIME = 5000; // msec
+ const sal_uInt32 MAX_WAITTIME = 10000; // msec
+ const sal_uInt32 MAX_WAIT_SHUTDOWN = 10000; // msec
+ const sal_uInt32 MAX_CLIPEVENT_PROCESSING_TIME = 5000; // msec
const sal_Bool MANUAL_RESET = sal_True;
const sal_Bool AUTO_RESET = sal_False;
const sal_Bool INIT_NONSIGNALED = sal_False;
-
+
//------------------------------------------------------
- /* Cannot use osl conditions because they are blocking
+ /* 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
- communication between inter-thread marshalled COM
+ communication between inter-thread marshalled COM
pointers.
- COM Proxy-Stub communication uses SendMessages for
+ COM Proxy-Stub communication uses SendMessages for
synchronization purposes.
*/
class Win32Condition
@@ -113,55 +113,55 @@ namespace /* private */
Win32Condition()
{
m_hEvent = CreateEvent(
- 0, /* no security */
- true, /* manual reset */
+ 0, /* no security */
+ true, /* manual reset */
false, /* initial state not signaled */
- 0); /* automatic name */
+ 0); /* automatic name */
}
-
- // dtor
+
+ // dtor
~Win32Condition()
{
CloseHandle(m_hEvent);
}
-
+
// wait infinite for event be signaled
// leave messages sent through
void wait()
{
while(1)
{
- DWORD dwResult =
+ DWORD dwResult =
MsgWaitForMultipleObjects(1, &m_hEvent, FALSE, INFINITE, QS_SENDMESSAGE);
-
- switch (dwResult)
+
+ switch (dwResult)
{
case WAIT_OBJECT_0:
- return;
+ return;
case WAIT_OBJECT_0 + 1:
{
- /* PeekMessage processes all messages in the SendMessage
+ /* PeekMessage processes all messages in the SendMessage
queue that's what we want, messages from the PostMessage
queue stay untouched */
- MSG msg;
+ MSG msg;
PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
-
+
break;
- }
+ }
}
}
}
-
+
// reset the event
void set()
{
SetEvent(m_hEvent);
}
-
+
private:
HANDLE m_hEvent;
-
+
// prevent copy/assignment
private:
Win32Condition(const Win32Condition&);
@@ -174,14 +174,14 @@ namespace /* private */
struct MsgCtx
{
- Win32Condition aCondition;
- HRESULT hr;
+ Win32Condition aCondition;
+ HRESULT hr;
};
-
+
} /* namespace private */
//----------------------------------------------------------------
-// static member initialization
+// static member initialization
//----------------------------------------------------------------
CMtaOleClipboard* CMtaOleClipboard::s_theMtaOleClipboardInst = NULL;
@@ -195,13 +195,13 @@ HRESULT MarshalIDataObjectInStream( IDataObject* pIDataObject, LPSTREAM* ppStrea
{
OSL_ASSERT( NULL != pIDataObject );
OSL_ASSERT( NULL != ppStream );
-
+
*ppStream = NULL;
return CoMarshalInterThreadInterfaceInStream(
__uuidof(IDataObject), //The IID of inteface to be marshaled
- pIDataObject, //The interface pointer
- ppStream //IStream pointer
- );
+ pIDataObject, //The interface pointer
+ ppStream //IStream pointer
+ );
}
//--------------------------------------------------------------------
@@ -213,12 +213,12 @@ HRESULT UnmarshalIDataObjectAndReleaseStream( LPSTREAM lpStream, IDataObject** p
{
OSL_ASSERT( NULL != lpStream );
OSL_ASSERT( NULL != ppIDataObject );
-
+
*ppIDataObject = NULL;
return CoGetInterfaceAndReleaseStream(
- lpStream,
- __uuidof(IDataObject),
- reinterpret_cast<LPVOID*>(ppIDataObject));
+ lpStream,
+ __uuidof(IDataObject),
+ reinterpret_cast<LPVOID*>(ppIDataObject));
}
//--------------------------------------------------------------------
@@ -251,8 +251,8 @@ public:
~CAutoComInit( )
{
/*
- we only call CoUninitialize when
- CoInitailize returned S_FALSE, what
+ we only call CoUninitialize when
+ CoInitailize returned S_FALSE, what
means that com was already initialize
for that thread so we keep the balance
if CoInitialize returned S_OK what means
@@ -272,10 +272,10 @@ private:
// ctor
//--------------------------------------------------------------------
-CMtaOleClipboard::CMtaOleClipboard( ) :
+CMtaOleClipboard::CMtaOleClipboard( ) :
m_hOleThread( NULL ),
m_uOleThreadId( 0 ),
- m_hEvtThrdReady( NULL ),
+ m_hEvtThrdReady( NULL ),
m_hwndMtaOleReqWnd( NULL ),
m_MtaOleReqWndClassAtom( 0 ),
m_hwndNextClipViewer( NULL ),
@@ -284,15 +284,15 @@ CMtaOleClipboard::CMtaOleClipboard( ) :
m_hClipboardChangedEvent( m_hClipboardChangedNotifierEvents[0] ),
m_hTerminateClipboardChangedNotifierEvent( m_hClipboardChangedNotifierEvents[1] ),
m_ClipboardChangedEventCount( 0 )
-{
+{
// signals that the thread was successfully setup
- m_hEvtThrdReady = CreateEventA( 0, MANUAL_RESET, INIT_NONSIGNALED, NULL );
-
+ m_hEvtThrdReady = CreateEventA( 0, MANUAL_RESET, INIT_NONSIGNALED, NULL );
+
OSL_ASSERT( NULL != m_hEvtThrdReady );
s_theMtaOleClipboardInst = this;
- m_hOleThread = (HANDLE)_beginthreadex(
+ m_hOleThread = (HANDLE)_beginthreadex(
NULL, 0, CMtaOleClipboard::oleThreadProc, this, 0, &m_uOleThreadId );
OSL_ASSERT( NULL != m_hOleThread );
@@ -318,7 +318,7 @@ CMtaOleClipboard::CMtaOleClipboard( ) :
//--------------------------------------------------------------------
CMtaOleClipboard::~CMtaOleClipboard( )
-{
+{
// block calling threads out
if ( NULL != m_hEvtThrdReady )
ResetEvent( m_hEvtThrdReady );
@@ -327,7 +327,7 @@ CMtaOleClipboard::~CMtaOleClipboard( )
m_bRunClipboardNotifierThread = sal_False;
SetEvent( m_hTerminateClipboardChangedNotifierEvent );
- sal_uInt32 dwResult = WaitForSingleObject(
+ sal_uInt32 dwResult = WaitForSingleObject(
m_hClipboardChangedNotifierThread, MAX_WAIT_SHUTDOWN );
OSL_ENSURE( dwResult == WAIT_OBJECT_0, "clipboard notifier thread could not terminate" );
@@ -342,10 +342,10 @@ CMtaOleClipboard::~CMtaOleClipboard( )
CloseHandle( m_hClipboardChangedNotifierEvents[1] );
// end the thread
- // because DestroyWindow can only be called
+ // because DestroyWindow can only be called
// from within the thread that created the window
- sendMessage( MSG_SHUTDOWN,
- static_cast< WPARAM >( 0 ),
+ sendMessage( MSG_SHUTDOWN,
+ static_cast< WPARAM >( 0 ),
static_cast< LPARAM >( 0 ) );
// wait for thread shutdown
@@ -368,7 +368,7 @@ CMtaOleClipboard::~CMtaOleClipboard( )
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
HRESULT CMtaOleClipboard::flushClipboard( )
@@ -382,19 +382,19 @@ HRESULT CMtaOleClipboard::flushClipboard( )
OSL_ENSURE( GetCurrentThreadId( ) != m_uOleThreadId, \
"flushClipboard from within clipboard sta thread called" );
- MsgCtx aMsgCtx;
-
- postMessage( MSG_FLUSHCLIPBOARD,
- static_cast< WPARAM >( 0 ),
- reinterpret_cast< LPARAM >( &aMsgCtx ) );
+ MsgCtx aMsgCtx;
+ postMessage( MSG_FLUSHCLIPBOARD,
+ static_cast< WPARAM >( 0 ),
+ reinterpret_cast< LPARAM >( &aMsgCtx ) );
+
aMsgCtx.aCondition.wait( /* infinite */ );
-
+
return aMsgCtx.hr;
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject )
@@ -412,25 +412,25 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject )
LPSTREAM lpStream;
HRESULT hr = E_FAIL;
-
+
*ppIDataObject = NULL;
-
- MsgCtx aMsgCtx;
-
+
+ MsgCtx aMsgCtx;
+
postMessage( MSG_GETCLIPBOARD,
reinterpret_cast< WPARAM >( &lpStream ),
reinterpret_cast< LPARAM >( &aMsgCtx ) );
-
+
aMsgCtx.aCondition.wait( /* infinite */ );
hr = aMsgCtx.hr;
-
+
if ( SUCCEEDED( hr ) )
{
hr = UnmarshalIDataObjectAndReleaseStream( lpStream, ppIDataObject );
OSL_ENSURE( SUCCEEDED( hr ), "unmarshalling clipboard data object failed" );
}
-
+
return hr;
}
@@ -440,21 +440,21 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject )
//--------------------------------------------------------------------
HRESULT CMtaOleClipboard::setClipboard( IDataObject* pIDataObject )
-{
+{
if ( !WaitForThreadReady( ) )
{
OSL_ENSURE( sal_False, "clipboard sta thread not ready" );
return E_FAIL;
}
-
+
CAutoComInit comAutoInit;
-
+
OSL_ENSURE( GetCurrentThreadId( ) != m_uOleThreadId, "setClipboard from within the clipboard sta thread called" );
-
+
// because we marshall this request
// into the sta thread we better
- // acquire the interface here so
- // that the object will not be
+ // acquire the interface here so
+ // that the object will not be
// destroyed before the ole clipboard
// can acquire it
// remember: pIDataObject may be NULL
@@ -463,12 +463,12 @@ HRESULT CMtaOleClipboard::setClipboard( IDataObject* pIDataObject )
if ( pIDataObject )
pIDataObject->AddRef( );
- postMessage(
- MSG_SETCLIPBOARD,
- reinterpret_cast< WPARAM >( pIDataObject ),
+ postMessage(
+ MSG_SETCLIPBOARD,
+ reinterpret_cast< WPARAM >( pIDataObject ),
0 );
-
- // because this is an asynchronous function
+
+ // because this is an asynchronous function
// the return value is useless
return S_OK;
}
@@ -489,14 +489,14 @@ sal_Bool CMtaOleClipboard::registerClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncC
OSL_ENSURE( GetCurrentThreadId( ) != m_uOleThreadId, "registerClipViewer from within the OleThread called" );
- MsgCtx aMsgCtx;
+ MsgCtx aMsgCtx;
postMessage( MSG_REGCLIPVIEWER,
reinterpret_cast<WPARAM>( pfncClipViewerCallback ),
reinterpret_cast<LPARAM>( &aMsgCtx ) );
-
+
aMsgCtx.aCondition.wait( /* infinite */ );
-
+
return bRet;
}
@@ -505,7 +505,7 @@ sal_Bool CMtaOleClipboard::registerClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncC
//--------------------------------------------------------------------
sal_Bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncClipViewerCallback )
-{
+{
sal_Bool bRet = sal_True;
// we need exclusive access because the clipboard changed notifier
@@ -515,7 +515,7 @@ sal_Bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfn
// register if not yet done
if ( ( NULL != pfncClipViewerCallback ) && ( NULL == m_pfncClipViewerCallback ) )
{
- // SetClipboardViewer sends a WM_DRAWCLIPBOARD message we ignore
+ // SetClipboardViewer sends a WM_DRAWCLIPBOARD message we ignore
// this message if we register ourself as clip viewer
m_bInRegisterClipViewer = sal_True;
m_hwndNextClipViewer = SetClipboardViewer( m_hwndMtaOleReqWnd );
@@ -535,38 +535,38 @@ sal_Bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfn
// unregister if input parameter is NULL and we previously registered
// as clipboard viewer
ChangeClipboardChain( m_hwndMtaOleReqWnd, m_hwndNextClipViewer );
- m_hwndNextClipViewer = NULL;
+ m_hwndNextClipViewer = NULL;
}
return bRet;
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
LRESULT CMtaOleClipboard::onSetClipboard( IDataObject* pIDataObject )
-{
+{
return static_cast<LRESULT>( OleSetClipboard( pIDataObject ) );
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
LRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream )
-{
+{
OSL_ASSERT(NULL != ppStream);
IDataObjectPtr pIDataObject;
-
+
// forward the request to the OleClipboard
HRESULT hr = OleGetClipboard( &pIDataObject );
if ( SUCCEEDED( hr ) )
{
hr = MarshalIDataObjectInStream(pIDataObject.get(), ppStream);
OSL_ENSURE(SUCCEEDED(hr), "marshalling cliboard data object failed");
- }
+ }
return static_cast<LRESULT>(hr);
}
@@ -575,7 +575,7 @@ LRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream )
//--------------------------------------------------------------------
LRESULT CMtaOleClipboard::onFlushClipboard( )
-{
+{
return static_cast<LRESULT>( OleFlushClipboard( ) );
}
@@ -590,11 +590,11 @@ LRESULT CMtaOleClipboard::onChangeCBChain( HWND hWndRemove, HWND hWndNext )
else if ( IsWindow( m_hwndNextClipViewer ) )
{
// forward the message to the next one
- DWORD dwResult;
- SendMessageTimeoutA(
- m_hwndNextClipViewer,
- WM_CHANGECBCHAIN,
- reinterpret_cast<WPARAM>(hWndRemove),
+ DWORD dwResult;
+ SendMessageTimeoutA(
+ m_hwndNextClipViewer,
+ WM_CHANGECBCHAIN,
+ reinterpret_cast<WPARAM>(hWndRemove),
reinterpret_cast<LPARAM>(hWndNext),
SMTO_BLOCK,
MAX_CLIPEVENT_PROCESSING_TIME,
@@ -615,7 +615,7 @@ LRESULT CMtaOleClipboard::onDrawClipboard( )
if ( !m_bInRegisterClipViewer )
{
ClearableMutexGuard aGuard( m_ClipboardChangedEventCountMutex );
-
+
m_ClipboardChangedEventCount++;
SetEvent( m_hClipboardChangedEvent );
@@ -626,9 +626,9 @@ LRESULT CMtaOleClipboard::onDrawClipboard( )
if ( IsWindow( m_hwndNextClipViewer ) )
{
DWORD dwResult;
- SendMessageTimeoutA(
- m_hwndNextClipViewer,
- WM_DRAWCLIPBOARD,
+ SendMessageTimeoutA(
+ m_hwndNextClipViewer,
+ WM_DRAWCLIPBOARD,
static_cast< WPARAM >( 0 ),
static_cast< LPARAM >( 0 ),
SMTO_BLOCK,
@@ -640,7 +640,7 @@ LRESULT CMtaOleClipboard::onDrawClipboard( )
}
//--------------------------------------------------------------------
-// SendMessage so we don't need to supply the HWND if we send
+// SendMessage so we don't need to supply the HWND if we send
// something to our wrapped window
//--------------------------------------------------------------------
@@ -650,7 +650,7 @@ LRESULT CMtaOleClipboard::sendMessage( UINT msg, WPARAM wParam, LPARAM lParam )
}
//--------------------------------------------------------------------
-// PostMessage so we don't need to supply the HWND if we send
+// PostMessage so we don't need to supply the HWND if we send
// something to our wrapped window
//--------------------------------------------------------------------
@@ -667,18 +667,18 @@ sal_Bool CMtaOleClipboard::postMessage( UINT msg, WPARAM wParam, LPARAM lParam )
LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
LRESULT lResult = 0;
-
+
// get a connection to the class-instance via the static member
CMtaOleClipboard* pImpl = CMtaOleClipboard::s_theMtaOleClipboardInst;
OSL_ASSERT( NULL != pImpl );
-
+
switch( uMsg )
{
- case MSG_SETCLIPBOARD:
- {
+ case MSG_SETCLIPBOARD:
+ {
IDataObject* pIDataObject = reinterpret_cast< IDataObject* >( wParam );
pImpl->onSetClipboard( pIDataObject );
-
+
// in setClipboard we did acquire the
// interface pointer in order to prevent
// destruction of the object before the
@@ -692,8 +692,8 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARA
break;
case MSG_GETCLIPBOARD:
- {
- MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
+ {
+ MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
OSL_ASSERT( aMsgCtx );
aMsgCtx->hr = pImpl->onGetClipboard( reinterpret_cast< LPSTREAM* >(wParam) );
@@ -701,19 +701,19 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARA
}
break;
- case MSG_FLUSHCLIPBOARD:
- {
- MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
+ case MSG_FLUSHCLIPBOARD:
+ {
+ MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
OSL_ASSERT( aMsgCtx );
- aMsgCtx->hr = pImpl->onFlushClipboard( );
+ aMsgCtx->hr = pImpl->onFlushClipboard( );
aMsgCtx->aCondition.set( );
}
break;
case MSG_REGCLIPVIEWER:
- {
- MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
+ {
+ MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
OSL_ASSERT( aMsgCtx );
pImpl->onRegisterClipViewer( reinterpret_cast<CMtaOleClipboard::LPFNC_CLIPVIEWER_CALLBACK_t>(wParam) );
@@ -722,7 +722,7 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARA
break;
case WM_CHANGECBCHAIN:
- lResult = pImpl->onChangeCBChain(
+ lResult = pImpl->onChangeCBChain(
reinterpret_cast< HWND >( wParam ), reinterpret_cast< HWND >( lParam ) );
break;
@@ -735,53 +735,53 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARA
break;
// force the sta thread to end
- case WM_DESTROY:
+ case WM_DESTROY:
PostQuitMessage( 0 );
break;
default:
lResult = DefWindowProcA( hWnd, uMsg, wParam, lParam );
break;
- }
-
+ }
+
return lResult;
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
void CMtaOleClipboard::createMtaOleReqWnd( )
{
WNDCLASSEXA wcex;
-
+
HINSTANCE hInst = GetModuleHandleA( CLIPSRV_DLL_NAME );
OSL_ENSURE( NULL != hInst, "The name of the clipboard service dll must have changed" );
ZeroMemory( &wcex, sizeof( WNDCLASSEXA ) );
- wcex.cbSize = sizeof(WNDCLASSEXA);
- wcex.style = 0;
- wcex.lpfnWndProc = static_cast< WNDPROC >( CMtaOleClipboard::mtaOleReqWndProc );
- wcex.cbClsExtra = 0;
- wcex.cbWndExtra = 0;
- wcex.hInstance = hInst;
- wcex.hIcon = NULL;
- wcex.hCursor = NULL;
- wcex.hbrBackground = NULL;
- wcex.lpszMenuName = NULL;
- wcex.lpszClassName = g_szWndClsName;
- wcex.hIconSm = NULL;
+ wcex.cbSize = sizeof(WNDCLASSEXA);
+ wcex.style = 0;
+ wcex.lpfnWndProc = static_cast< WNDPROC >( CMtaOleClipboard::mtaOleReqWndProc );
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 0;
+ wcex.hInstance = hInst;
+ wcex.hIcon = NULL;
+ wcex.hCursor = NULL;
+ wcex.hbrBackground = NULL;
+ wcex.lpszMenuName = NULL;
+ wcex.lpszClassName = g_szWndClsName;
+ wcex.hIconSm = NULL;
m_MtaOleReqWndClassAtom = RegisterClassExA( &wcex );
if ( 0 != m_MtaOleReqWndClassAtom )
- m_hwndMtaOleReqWnd = CreateWindowA(
+ m_hwndMtaOleReqWnd = CreateWindowA(
g_szWndClsName, NULL, 0, 0, 0, 0, 0, NULL, NULL, hInst, NULL );
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
unsigned int CMtaOleClipboard::run( )
@@ -802,9 +802,9 @@ unsigned int CMtaOleClipboard::run( )
SetEvent( m_hEvtThrdReady );
// pumping messages
- MSG msg;
+ MSG msg;
while( GetMessageA( &msg, NULL, 0, 0 ) )
- DispatchMessageA( &msg );
+ DispatchMessageA( &msg );
nRet = 0;
}
@@ -817,20 +817,20 @@ unsigned int CMtaOleClipboard::run( )
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
{
- CMtaOleClipboard* pInst =
+ CMtaOleClipboard* pInst =
reinterpret_cast<CMtaOleClipboard*>( pParam );
OSL_ASSERT( NULL != pInst );
-
+
return pInst->run( );
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID pParam )
@@ -843,7 +843,7 @@ unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID
// assuming we don't need a lock for
// a boolean variable like m_bRun...
while ( pInst->m_bRunClipboardNotifierThread )
- {
+ {
// wait for clipboard changed or terminate event
WaitForMultipleObjects( 2, pInst->m_hClipboardChangedNotifierEvents, false, INFINITE );
@@ -863,18 +863,18 @@ unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID
// notify all clipboard listener
if ( pInst->m_pfncClipViewerCallback )
pInst->m_pfncClipViewerCallback( );
- }
+ }
else
aGuard.clear( );
- }
-
+ }
+
CoUninitialize( );
return ( 0 );
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
inline
@@ -884,7 +884,7 @@ sal_Bool CMtaOleClipboard::WaitForThreadReady( ) const
if ( NULL != m_hEvtThrdReady )
{
- DWORD dwResult = WaitForSingleObject(
+ DWORD dwResult = WaitForSingleObject(
m_hEvtThrdReady, MAX_WAITTIME );
bRet = ( dwResult == WAIT_OBJECT_0 );
}
diff --git a/dtrans/source/win32/workbench/XTDo.cxx b/dtrans/source/win32/workbench/XTDo.cxx
index 050cc349a41d..42a6ae833d02 100644
--- a/dtrans/source/win32/workbench/XTDo.cxx
+++ b/dtrans/source/win32/workbench/XTDo.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,8 +64,8 @@ using namespace ::std;
//------------------------------------------------------------------------
/*
in the constructor we enumerate all formats offered by the transferable
- and convert the formats into formatetc structures
- if the transferable supports text in different charsets we use either
+ and convert the formats into formatetc structures
+ if the transferable supports text in different charsets we use either
the charset equal to the charset of the current thread or an arbitrary
charset supported by the transferable and the system
if the transferable supports only unicodetext we offer in addition to
@@ -75,8 +75,8 @@ using namespace ::std;
*/
CXTDataObject::CXTDataObject( ) :
m_nRefCnt( 0 )
-{
-
+{
+
}
//------------------------------------------------------------------------
@@ -84,7 +84,7 @@ CXTDataObject::CXTDataObject( ) :
//------------------------------------------------------------------------
STDMETHODIMP CXTDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
-{
+{
OSL_ASSERT( NULL != ppvObject );
if ( NULL == ppvObject )
@@ -133,7 +133,7 @@ STDMETHODIMP_(ULONG) CXTDataObject::Release( )
}
/*------------------------------------------------------------------------
-
+
IDataObject->GetData
we deliver data only into global memory
@@ -144,11 +144,11 @@ STDMETHODIMP_(ULONG) CXTDataObject::Release( )
problems (windows needs '\0' terminated strings
2.2. we expect unicode data as Sequence< sal_Unicode > and all other
text and raw data as Sequence< sal_Int8 >
-
+
------------------------------------------------------------------------*/
STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium )
-{
+{
if ( ( NULL == pFormatetc ) || ( NULL == pmedium ) )
return E_INVALIDARG;
@@ -167,7 +167,7 @@ STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium
hr = S_OK;
}
-
+
return hr;
}
@@ -179,7 +179,7 @@ STDMETHODIMP CXTDataObject::EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC** p
{
if ( ( NULL == ppenumFormatetc ) || ( DATADIR_SET == dwDirection ) )
return E_INVALIDARG;
-
+
*ppenumFormatetc = NULL;
HRESULT hr = E_FAIL;
@@ -312,7 +312,7 @@ STDMETHODIMP CEnumFormatEtc::QueryInterface( REFIID iid, LPVOID* ppvObject )
STDMETHODIMP_(ULONG) CEnumFormatEtc::AddRef( )
{
// keep the dataobject alive
- m_pUnkDataObj->AddRef( );
+ m_pUnkDataObj->AddRef( );
return InterlockedIncrement( &m_nRefCnt );
}
@@ -322,7 +322,7 @@ STDMETHODIMP_(ULONG) CEnumFormatEtc::AddRef( )
STDMETHODIMP_(ULONG) CEnumFormatEtc::Release( )
{
- // release the outer dataobject
+ // release the outer dataobject
m_pUnkDataObj->Release( );
// we need a helper variable because it's
@@ -347,9 +347,9 @@ STDMETHODIMP CEnumFormatEtc::Next( ULONG celt, LPFORMATETC rgelt, ULONG* pceltFe
ULONG ulFetched = 0;
ULONG ulToFetch = celt;
HRESULT hr = S_FALSE;
-
+
while( m_nCurrPos < 1 )
- {
+ {
rgelt->cfFormat = CF_TEXT;
rgelt->ptd = NULL;
rgelt->dwAspect = DVASPECT_CONTENT;
@@ -361,15 +361,15 @@ STDMETHODIMP CEnumFormatEtc::Next( ULONG celt, LPFORMATETC rgelt, ULONG* pceltFe
--ulToFetch;
++ulFetched;
}
-
+
if ( ulFetched == celt )
hr = S_OK;
if ( NULL != pceltFetched )
- {
+ {
*pceltFetched = ulFetched;
}
-
+
return hr;
}
@@ -380,7 +380,7 @@ STDMETHODIMP CEnumFormatEtc::Next( ULONG celt, LPFORMATETC rgelt, ULONG* pceltFe
STDMETHODIMP CEnumFormatEtc::Skip( ULONG celt )
{
HRESULT hr = S_FALSE;
-
+
/*
if ( ( m_nCurrPos + celt ) < m_nClipFormats )
{
@@ -414,9 +414,9 @@ STDMETHODIMP CEnumFormatEtc::Clone( IEnumFORMATETC** ppenum )
return E_INVALIDARG;
HRESULT hr = E_FAIL;
-
+
*ppenum = NULL;
-
+
CEnumFormatEtc* pCEnumFEtc = new CEnumFormatEtc( m_pUnkDataObj );
if ( NULL != pCEnumFEtc )
{
diff --git a/dtrans/source/win32/workbench/XTDo.hxx b/dtrans/source/win32/workbench/XTDo.hxx
index e37b4beefc2f..e3eff6f408b2 100644
--- a/dtrans/source/win32/workbench/XTDo.hxx
+++ b/dtrans/source/win32/workbench/XTDo.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,12 +57,12 @@ class EnumFormatEtc;
a clipboard client ask for the available formats on the clipboard
and decides if there is a format he can use
if there is one, he requests the data in this format
-
- - This class inherits from IDataObject an so can be placed on the
- OleClipboard. The class wrapps a transferable object which is the
+
+ - This class inherits from IDataObject an so can be placed on the
+ OleClipboard. The class wrapps a transferable object which is the
original DataSource
- DataFlavors offerd by this transferable will be translated into
- appropriate clipboard formats
+ appropriate clipboard formats
- if the transferable contains text data always text and unicodetext
will be offered or vice versa
- text data will be automaticaly converted between text und unicode text
@@ -75,7 +75,7 @@ class CXTDataObject : public IDataObject
{
public:
CXTDataObject( );
-
+
//-----------------------------------------------------------------
// ole interface implementation
//-----------------------------------------------------------------
@@ -101,33 +101,33 @@ public:
private:
private:
- LONG m_nRefCnt;
+ LONG m_nRefCnt;
};
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
class CEnumFormatEtc : public IEnumFORMATETC
{
public:
CEnumFormatEtc( LPUNKNOWN pUnkDataObj );
-
- // IUnknown
+
+ // IUnknown
STDMETHODIMP QueryInterface( REFIID iid, LPVOID* ppvObject );
STDMETHODIMP_( ULONG ) AddRef( );
STDMETHODIMP_( ULONG ) Release( );
- //IEnumFORMATETC
+ //IEnumFORMATETC
STDMETHODIMP Next( ULONG celt, LPFORMATETC rgelt, ULONG* pceltFetched );
STDMETHODIMP Skip( ULONG celt );
STDMETHODIMP Reset( );
STDMETHODIMP Clone( IEnumFORMATETC** ppenum );
private:
- LONG m_nRefCnt;
- LPUNKNOWN m_pUnkDataObj;
- ULONG m_nCurrPos;
+ LONG m_nRefCnt;
+ LPUNKNOWN m_pUnkDataObj;
+ ULONG m_nCurrPos;
};
typedef CEnumFormatEtc *PCEnumFormatEtc;
diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx
index 65118eed7fbd..f548c03fd1ca 100644
--- a/dtrans/source/win32/workbench/test_wincb.cxx
+++ b/dtrans/source/win32/workbench/test_wincb.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,14 +31,14 @@
//_________________________________________________________________________________________________________________________
-// interface includes
+// interface includes
//_________________________________________________________________________________________________________________________
#include "..\misc\ImplHelper.hxx"
//_________________________________________________________________________________________________________________________
-// other includes
+// other includes
//_________________________________________________________________________________________________________________________
#include <cppuhelper/servicefactory.hxx>
#include <com/sun/star/datatransfer/XTransferable.hpp>
@@ -80,27 +80,27 @@
#define EVT_NONAME ""
//------------------------------------------------------------
-// namesapces
+// namesapces
//------------------------------------------------------------
-using namespace ::rtl;
+using namespace ::rtl;
using namespace ::std;
using namespace ::cppu;
using namespace ::com::sun::star::datatransfer;
using namespace ::com::sun::star::datatransfer::clipboard;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
-using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::lang;
//------------------------------------------------------------
-// globales
+// globales
//------------------------------------------------------------
Reference< XTransferable > rXTransfRead;
-HANDLE g_hEvtThreadWakeup;
+HANDLE g_hEvtThreadWakeup;
//------------------------------------------------------------
-//
+//
//------------------------------------------------------------
class CClipboardListener : public WeakImplHelper1 < XClipboardListener >
@@ -111,7 +111,7 @@ public:
//-------------------------------------------------
// XClipboardListener
//-------------------------------------------------
-
+
virtual void SAL_CALL disposing( const EventObject& Source ) throw(RuntimeException);
virtual void SAL_CALL changedContents( const ClipboardEvent& event ) throw( RuntimeException );
};
@@ -131,39 +131,39 @@ void SAL_CALL CClipboardListener::changedContents( const ClipboardEvent& event )
}
//------------------------------------------------------------
-//
+//
//------------------------------------------------------------
class CTransferable : public WeakImplHelper2< XClipboardOwner, XTransferable >
{
-public:
+public:
CTransferable( );
-
+
//-------------------------------------------------
// XTransferable
//-------------------------------------------------
- virtual Any SAL_CALL getTransferData( const DataFlavor& aFlavor )
+ 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 )
+ virtual void SAL_CALL lostOwnership( const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans )
throw(RuntimeException);
-
+
private:
Sequence< DataFlavor > m_FlavorList;
OUString m_Data;
};
//----------------------------------------------------------------
-// ctor
+// ctor
//----------------------------------------------------------------
CTransferable::CTransferable( ) :
@@ -171,10 +171,10 @@ CTransferable::CTransferable( ) :
m_Data( OUString::createFromAscii( "Ich habe mir ein neues Fahrrad gekauft!" ) )
{
DataFlavor df;
-
+
//df.MimeType = L"text/plain;charset=utf-16";
//df.DataType = getCppuType( ( OUString* )0 );
-
+
df.MimeType = L"text/plain;charset=Windows1252";
df.DataType = getCppuType( (Sequence< sal_Int8 >*)0 );
@@ -182,12 +182,12 @@ CTransferable::CTransferable( ) :
}
//----------------------------------------------------------------
-// getTransferData
+// getTransferData
//----------------------------------------------------------------
-Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
+Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
throw(UnsupportedFlavorException, IOException, RuntimeException)
-{
+{
Any anyData;
/*
@@ -196,9 +196,9 @@ Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
*/
if ( aFlavor.MimeType.equalsIgnoreCase( m_FlavorList[0].MimeType ) )
{
- OString text(
- m_Data.getStr( ),
- m_Data.getLength( ),
+ OString text(
+ m_Data.getStr( ),
+ m_Data.getLength( ),
RTL_TEXTENCODING_ASCII_US );
Sequence< sal_Int8 > textStream( text.getLength( ) + 1 );
@@ -206,7 +206,7 @@ Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
rtl_copyMemory( textStream.getArray( ), text.getStr( ), textStream.getLength( ) );
anyData = makeAny( textStream );
- }
+ }
else
throw UnsupportedFlavorException( );
@@ -214,54 +214,54 @@ Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
}
//----------------------------------------------------------------
-// getTransferDataFlavors
+// getTransferDataFlavors
//----------------------------------------------------------------
-Sequence< DataFlavor > SAL_CALL CTransferable::getTransferDataFlavors( )
+Sequence< DataFlavor > SAL_CALL CTransferable::getTransferDataFlavors( )
throw(RuntimeException)
{
return m_FlavorList;
}
//----------------------------------------------------------------
-// isDataFlavorSupported
+// isDataFlavorSupported
//----------------------------------------------------------------
-sal_Bool SAL_CALL CTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
+sal_Bool SAL_CALL CTransferable::isDataFlavorSupported( const DataFlavor& aFlavor )
throw(RuntimeException)
{
sal_Int32 nLength = m_FlavorList.getLength( );
-
+
for ( sal_Int32 i = 0; i < nLength; ++i )
- if ( m_FlavorList[i].MimeType == aFlavor.MimeType )
- return sal_True;
+ if ( m_FlavorList[i].MimeType == aFlavor.MimeType )
+ return sal_True;
return sal_False;
}
//----------------------------------------------------------------
-// lostOwnership
+// lostOwnership
//----------------------------------------------------------------
-void SAL_CALL CTransferable::lostOwnership(
- const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans )
+void SAL_CALL CTransferable::lostOwnership(
+ const Reference< XClipboard >& xClipboard, const Reference< XTransferable >& xTrans )
throw(RuntimeException)
{
//MessageBox( NULL, TEXT("No longer clipboard owner"), TEXT("Info"), MB_OK | MB_ICONINFORMATION );
}
//----------------------------------------------------------------
-// main
+// main
//----------------------------------------------------------------
int SAL_CALL main( int nArgc, char* Argv[] )
{
- // create a multi-threaded apartment; we can test only
+ // create a multi-threaded apartment; we can test only
// with a multithreaded apartment because for a single
// threaded apartment we need a message loop to deliver
// messages to our XTDataObject
//HRESULT hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
- HRESULT hr = CoInitialize( NULL );
+ HRESULT hr = CoInitialize( NULL );
char buff[6];
@@ -290,7 +290,7 @@ int SAL_CALL main( int nArgc, char* Argv[] )
Reference< XTransferable > rXTransf( static_cast< XTransferable* >( new CTransferable ) );
- Reference< XClipboard >
+ Reference< XClipboard >
xClipboard( g_xFactory->createInstance( OUString( WINCLIPBOARD_SERVICE_NAME ) ), UNO_QUERY );
if ( !xClipboard.is( ) )
{
@@ -300,7 +300,7 @@ int SAL_CALL main( int nArgc, char* Argv[] )
Reference< XClipboardNotifier > xClipNotifier( xClipboard, UNO_QUERY );
Reference< XClipboardListener > rXClipListener( static_cast< XClipboardListener* >( new CClipboardListener() ) );
- xClipNotifier->addClipboardListener( rXClipListener );
+ xClipNotifier->addClipboardListener( rXClipListener );
MessageBox( NULL, TEXT("Go"), TEXT("INFO"), MB_OK|MB_ICONINFORMATION);
@@ -316,7 +316,7 @@ int SAL_CALL main( int nArgc, char* Argv[] )
*/
MessageBox( NULL, TEXT("Stop"), TEXT("INFO"), MB_OK|MB_ICONINFORMATION);
-
+
// flush the clipboard content
Reference< XFlushableClipboard > rXFlushableClip( xClipboard, UNO_QUERY );
rXFlushableClip->flushClipboard( );
@@ -325,7 +325,7 @@ int SAL_CALL main( int nArgc, char* Argv[] )
xClipNotifier->removeClipboardListener( rXClipListener );
rXClipListener = Reference< XClipboardListener >( );
xClipNotifier = Reference< XClipboardNotifier >( );
-
+
//--------------------------------------------------
// shutdown the service manager
//--------------------------------------------------
@@ -335,7 +335,7 @@ int SAL_CALL main( int nArgc, char* Argv[] )
if ( !xComponent.is() )
OSL_ENSURE(sal_False, "Error shuting down");
-
+
// Dispose and clear factory
xComponent->dispose();
xComponent = Reference< XComponent >( );
@@ -345,7 +345,7 @@ int SAL_CALL main( int nArgc, char* Argv[] )
CoUninitialize( );
- return 0;
+ return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/workbench/testmarshal.cxx b/dtrans/source/win32/workbench/testmarshal.cxx
index a07d7fb4401e..264e6751ada2 100644
--- a/dtrans/source/win32/workbench/testmarshal.cxx
+++ b/dtrans/source/win32/workbench/testmarshal.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,11 +31,11 @@
//_________________________________________________________________________________________________________________________
-// interface includes
+// interface includes
//_________________________________________________________________________________________________________________________
//_________________________________________________________________________________________________________________________
-// other includes
+// other includes
//_________________________________________________________________________________________________________________________
#include <rtl/ustring.hxx>
#include <sal/types.h>
@@ -68,17 +68,17 @@
#define RAW_MARSHALING
//------------------------------------------------------------
-// namesapces
+// namesapces
//------------------------------------------------------------
-using namespace ::rtl;
+using namespace ::rtl;
using namespace ::std;
//------------------------------------------------------------
-// globales
+// globales
//------------------------------------------------------------
-HANDLE g_hEvtThreadWakeup;
+HANDLE g_hEvtThreadWakeup;
#ifdef RAW_MARSHALING
HGLOBAL g_hGlob;
@@ -92,21 +92,21 @@ HANDLE g_hEvtThreadWakeup;
unsigned int _stdcall ThreadProc(LPVOID pParam)
{
// setup another apartment
- HRESULT hr = OleInitialize( NULL );
+ HRESULT hr = OleInitialize( NULL );
WaitForSingleObject( g_hEvtThreadWakeup, INFINITE );
IDataObject* pIDo;
#ifdef RAW_MARSHALING
-
+
IStream* pStm = NULL;
hr = CreateStreamOnHGlobal( g_hGlob, FALSE, &pStm );
if ( SUCCEEDED( hr ) )
{
- hr = CoUnmarshalInterface(
- pStm,
- __uuidof( IDataObject ),
+ hr = CoUnmarshalInterface(
+ pStm,
+ __uuidof( IDataObject ),
(void**)&pIDo );
hr = pStm->Release( );
@@ -114,7 +114,7 @@ unsigned int _stdcall ThreadProc(LPVOID pParam)
#else
- hr = CoGetInterfaceAndReleaseStream(
+ hr = CoGetInterfaceAndReleaseStream(
g_pStm,
__uuidof( IDataObject ),
(void**)&pIDo
@@ -126,7 +126,7 @@ unsigned int _stdcall ThreadProc(LPVOID pParam)
hr = pIDo->EnumFormatEtc( DATADIR_GET, &pIEEtc );
hr = OleIsCurrentClipboard( pIDo );
-
+
hr = OleFlushClipboard( );
OleUninitialize( );
@@ -137,16 +137,16 @@ unsigned int _stdcall ThreadProc(LPVOID pParam)
//################################################################
//----------------------------------------------------------------
-// main
+// main
//----------------------------------------------------------------
int SAL_CALL main( int nArgc, char* Argv[] )
{
- HRESULT hr = OleInitialize( NULL );
+ HRESULT hr = OleInitialize( NULL );
- g_hEvtThreadWakeup = CreateEvent( 0,
- EVT_MANUAL_RESET,
- EVT_INIT_NONSIGNALED,
+ g_hEvtThreadWakeup = CreateEvent( 0,
+ EVT_MANUAL_RESET,
+ EVT_INIT_NONSIGNALED,
EVT_NONAME );
unsigned uThreadId;
@@ -166,18 +166,18 @@ int SAL_CALL main( int nArgc, char* Argv[] )
if ( SUCCEEDED( hr ) )
{
#ifdef RAW_MARSHALING
-
+
IStream* pStm = NULL;
hr = CreateStreamOnHGlobal( 0, FALSE, &pStm );
if ( SUCCEEDED( hr ) )
{
- hr = CoMarshalInterface(
- pStm,
- __uuidof( IDataObject ),
- pIDo,
- MSHCTX_INPROC,
- 0,
+ hr = CoMarshalInterface(
+ pStm,
+ __uuidof( IDataObject ),
+ pIDo,
+ MSHCTX_INPROC,
+ 0,
MSHLFLAGS_NORMAL );
if ( SUCCEEDED( hr ) )
hr = GetHGlobalFromStream( pStm, &g_hGlob );
@@ -187,7 +187,7 @@ int SAL_CALL main( int nArgc, char* Argv[] )
#else
- hr = CoMarshalInterThreadInterfaceInStream(
+ hr = CoMarshalInterThreadInterfaceInStream(
__uuidof( IDataObject ),
pIDo,
&g_pStm );
@@ -197,7 +197,7 @@ int SAL_CALL main( int nArgc, char* Argv[] )
if ( SUCCEEDED( hr ) )
{
// wakeup the thread and waiting util it ends
- SetEvent( g_hEvtThreadWakeup );
+ SetEvent( g_hEvtThreadWakeup );
#ifdef WAIT_MSGLOOP
@@ -205,10 +205,10 @@ int SAL_CALL main( int nArgc, char* Argv[] )
while( bContinue )
{
- DWORD dwResult = WaitForMultipleObjects(
- 1,
- &hThread,
- TRUE,
+ DWORD dwResult = WaitForMultipleObjects(
+ 1,
+ &hThread,
+ TRUE,
0 );
if ( WAIT_OBJECT_0 == dwResult )
@@ -218,29 +218,29 @@ int SAL_CALL main( int nArgc, char* Argv[] )
else
{
MSG msg;
- while( PeekMessage(
- &msg,
- NULL,
- 0,
- 0,
+ while( PeekMessage(
+ &msg,
+ NULL,
+ 0,
+ 0,
PM_REMOVE ) )
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
- }
+ }
} // while
#endif
} // if
} // if
-
+
OleFlushClipboard( );
OleUninitialize( );
-
- return 0;
+
+ return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */