diff options
Diffstat (limited to 'dtrans/source/win32/clipb/WinClipbImpl.cxx')
-rw-r--r-- | dtrans/source/win32/clipb/WinClipbImpl.cxx | 58 |
1 files changed, 29 insertions, 29 deletions
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 ); |