diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-11 14:44:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-12 10:14:47 +0200 |
commit | 0e286f768ed028ce91bb4730010363dac30acec6 (patch) | |
tree | 7336a8b7ec05c5677a42e789fea6c14b477b7d0c /dtrans/source | |
parent | fdo#46808, use constructor for datatransfer::MimeContentTypeFactory (diff) | |
download | core-0e286f768ed028ce91bb4730010363dac30acec6.tar.gz core-0e286f768ed028ce91bb4730010363dac30acec6.zip |
fdo#46808, use constructor for datatransfer::DataFormatTranslator
Change-Id: I68fd87ae71f764099b00b05a29cf5194d24da58d
Diffstat (limited to 'dtrans/source')
21 files changed, 54 insertions, 56 deletions
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx index e232cb462639..86eb6179a3dd 100644 --- a/dtrans/source/cnttype/mcnttfactory.cxx +++ b/dtrans/source/cnttype/mcnttfactory.cxx @@ -52,8 +52,7 @@ namespace // ctor //------------------------------------------------------------------------ -CMimeContentTypeFactory::CMimeContentTypeFactory( const Reference< XMultiServiceFactory >& rSrvMgr ) : - m_SrvMgr( rSrvMgr ) +CMimeContentTypeFactory::CMimeContentTypeFactory() { } diff --git a/dtrans/source/cnttype/mcnttfactory.hxx b/dtrans/source/cnttype/mcnttfactory.hxx index a64f89033043..94721d9e21cb 100644 --- a/dtrans/source/cnttype/mcnttfactory.hxx +++ b/dtrans/source/cnttype/mcnttfactory.hxx @@ -33,7 +33,7 @@ class CMimeContentTypeFactory : public { public: - CMimeContentTypeFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSrvMgr ); + CMimeContentTypeFactory(); //------------------------------------------------ // XMimeContentTypeFactory @@ -57,7 +57,6 @@ public: private: ::osl::Mutex m_aMutex; - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr; }; diff --git a/dtrans/source/cnttype/mctfentry.cxx b/dtrans/source/cnttype/mctfentry.cxx index 913fc037882e..096a942512b4 100644 --- a/dtrans/source/cnttype/mctfentry.cxx +++ b/dtrans/source/cnttype/mctfentry.cxx @@ -57,9 +57,9 @@ namespace // so we should give it to every UNO-Implementation component //----------------------------------------------------------------------------------------------------------- - Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) + Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& ) { - return Reference< XInterface >( static_cast< XMimeContentTypeFactory* >( new CMimeContentTypeFactory( rServiceManager ) ) ); + return Reference< XInterface >( static_cast< XMimeContentTypeFactory* >( new CMimeContentTypeFactory() ) ); } } diff --git a/dtrans/source/generic/clipboardmanager.hxx b/dtrans/source/generic/clipboardmanager.hxx index 11d94a764512..7da462dbd4bc 100644 --- a/dtrans/source/generic/clipboardmanager.hxx +++ b/dtrans/source/generic/clipboardmanager.hxx @@ -40,10 +40,10 @@ typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::su namespace dtrans { - class ClipboardManager : public ::cppu::WeakComponentImplHelper3 < \ - ::com::sun::star::datatransfer::clipboard::XClipboardManager, \ - ::com::sun::star::lang::XEventListener, \ - ::com::sun::star::lang::XServiceInfo > + class ClipboardManager : public ::cppu::WeakComponentImplHelper3 < + ::com::sun::star::datatransfer::clipboard::XClipboardManager, + ::com::sun::star::lang::XEventListener, + ::com::sun::star::lang::XServiceInfo > { ClipboardMap m_aClipboardMap; ::osl::Mutex m_aMutex; diff --git a/dtrans/source/inc/DtObjFactory.hxx b/dtrans/source/inc/DtObjFactory.hxx index e196a498f070..3427236b40f2 100644 --- a/dtrans/source/inc/DtObjFactory.hxx +++ b/dtrans/source/inc/DtObjFactory.hxx @@ -22,17 +22,17 @@ #define _DTOBJFACTORY_HXX_ #include <com/sun/star/datatransfer/XTransferable.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <systools/win32/comtools.hxx> class CDTransObjFactory { public: - virtual IDataObjectPtr SAL_CALL createDataObjFromTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager, + virtual IDataObjectPtr SAL_CALL createDataObjFromTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable >& refXTransferable ); virtual com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > SAL_CALL createTransferableFromDataObj( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager, IDataObjectPtr pIDataObject ); + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, IDataObjectPtr pIDataObject ); }; #endif diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index 841d601bbcbc..167e889b39de 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx @@ -120,7 +120,7 @@ Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( ) throw( Runtime CDTransObjFactory objFactory; // remeber pIDo destroys itself due to the smart pointer - rClipContent = objFactory.createTransferableFromDataObj( m_pWinClipboard->m_SrvMgr, pIDo ); + rClipContent = objFactory.createTransferableFromDataObj( m_pWinClipboard->m_xContext, pIDo ); } return rClipContent; @@ -143,7 +143,7 @@ void SAL_CALL CWinClipbImpl::setContents( ClearableMutexGuard aGuard( m_ClipContentMutex ); m_pCurrentClipContent = new CXNotifyingDataObject( - objFactory.createDataObjFromTransferable( m_pWinClipboard->m_SrvMgr , xTransferable ), + objFactory.createDataObjFromTransferable( m_pWinClipboard->m_xContext , xTransferable ), xTransferable, xClipboardOwner, this ); diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 88661c4a3d99..7bf96872e34e 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -59,9 +59,9 @@ namespace // ctor //------------------------------------------------------------------------ /*XEventListener,*/ -CWinClipboard::CWinClipboard( const Reference< XMultiServiceFactory >& rServiceManager, const OUString& aClipboardName ) : +CWinClipboard::CWinClipboard( const Reference< XComponentContext >& rxContext, const OUString& aClipboardName ) : WeakComponentImplHelper3< XSystemClipboard, XFlushableClipboard, XServiceInfo >( m_aCbListenerMutex ), - m_SrvMgr( rServiceManager ) + m_xContext( rxContext ) { m_pImpl.reset( new CWinClipbImpl( aClipboardName, this ) ); } diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx b/dtrans/source/win32/clipb/WinClipboard.hxx index a5edc97a2589..65688d526513 100644 --- a/dtrans/source/win32/clipb/WinClipboard.hxx +++ b/dtrans/source/win32/clipb/WinClipboard.hxx @@ -32,6 +32,7 @@ #include <com/sun/star/datatransfer/clipboard/XSystemClipboard.hpp> #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <osl/conditn.hxx> #include <memory> @@ -68,7 +69,7 @@ class CWinClipboard : ::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::uno::XComponentContext >& rxContext, const ::rtl::OUString& aClipboardName ); //------------------------------------------------ @@ -134,8 +135,8 @@ private: void SAL_CALL notifyAllClipboardListener( ); private: - ::std::auto_ptr< CWinClipbImpl > m_pImpl; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr; + ::std::auto_ptr< CWinClipbImpl > m_pImpl; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; friend class CWinClipbImpl; }; diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx index f8973a9f2e83..695fba7ac3b5 100644 --- a/dtrans/source/win32/clipb/wcbentry.cxx +++ b/dtrans/source/win32/clipb/wcbentry.cxx @@ -18,6 +18,7 @@ */ #include <cppuhelper/factory.hxx> +#include <comphelper/processfactory.hxx> #include <com/sun/star/container/XSet.hpp> #include <osl/diagnose.h> #include "WinClipboard.hxx" @@ -58,7 +59,7 @@ namespace Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) { - return Reference< XInterface >( static_cast< XClipboard* >( new CWinClipboard( rServiceManager, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "" ) ) ) ) ); + return Reference< XInterface >( static_cast< XClipboard* >( new CWinClipboard( comphelper::getComponentContext(rServiceManager), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "" ) ) ) ) ); } } diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx index 6a45cbee6289..c463dee880b5 100644 --- a/dtrans/source/win32/dnd/dndentry.cxx +++ b/dtrans/source/win32/dnd/dndentry.cxx @@ -18,6 +18,7 @@ */ #include <cppuhelper/factory.hxx> +#include <comphelper/processfactory.hxx> #include <com/sun/star/container/XSet.hpp> #include <osl/diagnose.h> @@ -34,13 +35,13 @@ rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; Reference< XInterface > SAL_CALL createDragSource( const Reference< XMultiServiceFactory >& rServiceManager ) { - DragSource* pSource= new DragSource( rServiceManager ); + DragSource* pSource= new DragSource( comphelper::getComponentContext(rServiceManager) ); return Reference<XInterface>( static_cast<XInitialization*>(pSource), UNO_QUERY); } Reference< XInterface > SAL_CALL createDropTarget( const Reference< XMultiServiceFactory >& rServiceManager ) { - DropTarget* pTarget= new DropTarget( rServiceManager ); + DropTarget* pTarget= new DropTarget( comphelper::getComponentContext(rServiceManager) ); return Reference<XInterface>( static_cast<XInitialization*>(pTarget), UNO_QUERY); } diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx index 2b4cd8314baa..bc3ad7f591f3 100644 --- a/dtrans/source/win32/dnd/source.cxx +++ b/dtrans/source/win32/dnd/source.cxx @@ -67,9 +67,9 @@ unsigned __stdcall DndOleSTAFunc(LPVOID pParams); //---------------------------------------------------- /** Ctor */ -DragSource::DragSource( const Reference<XMultiServiceFactory>& sf): +DragSource::DragSource( const Reference<XComponentContext>& rxContext): WeakComponentImplHelper3< XDragSource, XInitialization, XServiceInfo >(m_mutex), - m_serviceFactory( sf), + m_xContext( rxContext ), // m_pcurrentContext_impl(0), m_hAppWindow(0), m_MouseButton(0), @@ -131,7 +131,7 @@ void DragSource::StartDragImpl( //<-- TRA m_spDataObject= m_aDataConverter.createDataObjFromTransferable( - m_serviceFactory, trans); + m_xContext, trans); // Obtain the id of the thread that created the window DWORD processId; diff --git a/dtrans/source/win32/dnd/source.hxx b/dtrans/source/win32/dnd/source.hxx index 5690b04b493c..736e2bc9f4c0 100644 --- a/dtrans/source/win32/dnd/source.hxx +++ b/dtrans/source/win32/dnd/source.hxx @@ -51,7 +51,7 @@ class DragSource: public IDropSource { - Reference<XMultiServiceFactory> m_serviceFactory; + Reference<XComponentContext> m_xContext; HWND m_hAppWindow; // The mouse button that set off the drag and drop operation @@ -89,7 +89,7 @@ public: sal_Int8 m_sourceActions; public: - DragSource(const Reference<XMultiServiceFactory>& sf); + DragSource(const Reference<XComponentContext>& rxContext); virtual ~DragSource(); // XInitialization diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index cb9430ec0b2a..4afce4bf271e 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -46,7 +46,7 @@ extern Reference< XTransferable > g_XTransferable; extern rtl_StandardModuleCount g_moduleCount; DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams); -DropTarget::DropTarget( const Reference<XMultiServiceFactory>& sf): +DropTarget::DropTarget( const Reference<XComponentContext>& rxContext): WeakComponentImplHelper3<XInitialization,XDropTarget, XServiceInfo>(m_mutex), m_hWnd( NULL), m_threadIdWindow(0), @@ -54,7 +54,7 @@ DropTarget::DropTarget( const Reference<XMultiServiceFactory>& sf): m_hOleThread(0), m_oleThreadId( 0), m_pDropTarget( NULL), - m_serviceFactory( sf), + m_xContext( rxContext ), m_bActive(sal_True), m_nDefaultActions(ACTION_COPY|ACTION_MOVE|ACTION_LINK|ACTION_DEFAULT), m_nCurrentDropAction( ACTION_NONE), @@ -340,7 +340,7 @@ HRESULT DropTarget::DragEnter( IDataObject *pDataObj, { // Convert the IDataObject to a XTransferable m_currentData= m_aDataConverter.createTransferableFromDataObj( - m_serviceFactory, IDataObjectPtr(pDataObj)); + m_xContext, IDataObjectPtr(pDataObj)); } //<-- TRA diff --git a/dtrans/source/win32/dnd/target.hxx b/dtrans/source/win32/dnd/target.hxx index d78e3afa4a8b..16e5b8921ec4 100644 --- a/dtrans/source/win32/dnd/target.hxx +++ b/dtrans/source/win32/dnd/target.hxx @@ -85,7 +85,7 @@ private: // this class. IDropTarget* m_pDropTarget; - Reference<XMultiServiceFactory> m_serviceFactory; + Reference<XComponentContext> m_xContext; // If m_bActive == sal_True then events are fired to XDropTargetListener s, // none otherwise. The default value is sal_True. sal_Bool m_bActive; @@ -116,7 +116,7 @@ private: DropTarget &operator= (DropTarget&); public: - DropTarget(const Reference<XMultiServiceFactory>& sf); + DropTarget(const Reference<XComponentContext>& rxContext); virtual ~DropTarget(); // Overrides WeakComponentImplHelper::disposing which is called by diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index b2bbb0323228..bf615f12ef28 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -76,10 +76,10 @@ namespace //------------------------------------------------------------------------ CDOTransferable::CDOTransferable( - const Reference< XMultiServiceFactory >& ServiceManager, IDataObjectPtr rDataObject ) : + const Reference< XComponentContext >& rxContext, IDataObjectPtr rDataObject ) : m_rDataObject( rDataObject ), - m_SrvMgr( ServiceManager ), - m_DataFormatTranslator( m_SrvMgr ), + m_xContext( rxContext ), + m_DataFormatTranslator( rxContext ), m_bUnicodeRegistered( sal_False ), m_TxtFormatOnClipboard( CF_INVALID ) { @@ -493,7 +493,7 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors( { if ( !m_rXMimeCntFactory.is( ) ) { - m_rXMimeCntFactory = MimeContentTypeFactory::create( comphelper::getComponentContext(m_SrvMgr) ); + m_rXMimeCntFactory = MimeContentTypeFactory::create( m_xContext ); } sal_Bool bRet = sal_False; diff --git a/dtrans/source/win32/dtobj/DOTransferable.hxx b/dtrans/source/win32/dtobj/DOTransferable.hxx index 2b423a5bb2a7..4634216aebe1 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.hxx +++ b/dtrans/source/win32/dtobj/DOTransferable.hxx @@ -63,7 +63,7 @@ public: private: // should be created only by CDTransObjFactory explicit CDOTransferable( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ServiceManager, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, IDataObjectPtr rDataObject ); //------------------------------------------------------------------------ @@ -97,7 +97,7 @@ private: 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; + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; CDataFormatTranslator m_DataFormatTranslator; com::sun::star::uno::Reference< com::sun::star::datatransfer::XMimeContentTypeFactory > m_rXMimeCntFactory; ::osl::Mutex m_aMutex; diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index c3ba9624e90a..4a9ca7ae0362 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -27,6 +27,8 @@ #include "DTransHelper.hxx" #include <rtl/string.h> #include "Fetc.hxx" +#include <com/sun/star/datatransfer/DataFormatTranslator.hpp> + #if defined _MSC_VER #pragma warning(push,1) @@ -66,11 +68,9 @@ const OUString HTML_FORMAT_NAME_SOFFICE ("HTML (HyperText Markup Language)"); // //------------------------------------------------------------------------ -CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFactory >& aServiceManager ) : - m_SrvMgr( aServiceManager ) +CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext ) { - m_XDataFormatTranslator = Reference< XDataFormatTranslator >( - m_SrvMgr->createInstance( OUString("com.sun.star.datatransfer.DataFormatTranslator") ), UNO_QUERY ); + m_XDataFormatTranslator = DataFormatTranslator::create( rxContext ); } //------------------------------------------------------------------------ diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.hxx b/dtrans/source/win32/dtobj/DataFmtTransl.hxx index c585bc265de5..7cb0684a526d 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.hxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.hxx @@ -23,7 +23,7 @@ #include <com/sun/star/datatransfer/XDataFormatTranslator.hpp> #include <com/sun/star/datatransfer/XTransferable.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <sal/types.h> #include <rtl/ustring.hxx> @@ -44,7 +44,7 @@ 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::uno::XComponentContext >& rxContext ); CFormatEtc getFormatEtcFromDataFlavor( const com::sun::star::datatransfer::DataFlavor& aDataFlavor ) const; com::sun::star::datatransfer::DataFlavor getDataFlavorFromFormatEtc( @@ -64,7 +64,6 @@ 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; }; diff --git a/dtrans/source/win32/dtobj/DtObjFactory.cxx b/dtrans/source/win32/dtobj/DtObjFactory.cxx index 07328796880e..9909dfa489b5 100644 --- a/dtrans/source/win32/dtobj/DtObjFactory.cxx +++ b/dtrans/source/win32/dtobj/DtObjFactory.cxx @@ -35,16 +35,16 @@ using namespace com::sun::star::lang; // implementation //------------------------------------------------------------------------ -IDataObjectPtr SAL_CALL CDTransObjFactory::createDataObjFromTransferable(const Reference<XMultiServiceFactory>& aServiceManager, +IDataObjectPtr SAL_CALL CDTransObjFactory::createDataObjFromTransferable(const Reference<XComponentContext>& rxContext, const Reference< XTransferable >& refXTransferable) { - return (IDataObjectPtr(new CXTDataObject(aServiceManager, refXTransferable))); + return (IDataObjectPtr(new CXTDataObject(rxContext, refXTransferable))); } -Reference< XTransferable > SAL_CALL CDTransObjFactory::createTransferableFromDataObj( const Reference< XMultiServiceFactory >& aServiceManager, +Reference< XTransferable > SAL_CALL CDTransObjFactory::createTransferableFromDataObj( const Reference< XComponentContext >& rxContext, IDataObjectPtr pIDataObject ) { - CDOTransferable* pTransf = new CDOTransferable(aServiceManager, pIDataObject); + CDOTransferable* pTransf = new CDOTransferable(rxContext, pIDataObject); Reference<XTransferable> refDOTransf(pTransf); pTransf->acquire(); diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index c343a01bb928..5b8bb978ed6b 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -71,14 +71,13 @@ public: // ctor //------------------------------------------------------------------------ -CXTDataObject::CXTDataObject( const Reference< XMultiServiceFactory >& aServiceManager, +CXTDataObject::CXTDataObject( const Reference< XComponentContext >& rxContext, const Reference< XTransferable >& aXTransferable ) : m_nRefCnt( 0 ) - , m_SrvMgr( aServiceManager ) , m_XTransferable( aXTransferable ) , m_bFormatEtcContainerInitialized( sal_False ) - , m_DataFormatTranslator( aServiceManager ) - , m_FormatRegistrar( comphelper::getComponentContext(m_SrvMgr), m_DataFormatTranslator ) + , m_DataFormatTranslator( rxContext ) + , m_FormatRegistrar( rxContext, m_DataFormatTranslator ) { } diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx index c54040d218a6..a8a87c692660 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.hxx +++ b/dtrans/source/win32/dtobj/XTDataObject.hxx @@ -63,7 +63,7 @@ class CStgTransferHelper; class CXTDataObject : public IDataObject { public: - CXTDataObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager, + CXTDataObject( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& aXTransferable ); virtual ~CXTDataObject() {} @@ -120,7 +120,6 @@ private: 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; sal_Bool m_bFormatEtcContainerInitialized; |