summaryrefslogtreecommitdiff
path: root/framework/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-21 17:38:02 +0200
committerNoel Grandin <noel@peralex.com>2013-05-22 15:20:07 +0200
commitfe1ac1bf904ec7905187c3c3a5fe6a90f31f94e7 (patch)
tree8c6987a93d453b2b4cabf8ed0a331a8296d52a27 /framework/inc
parent7298a2b0c721004b09a0fd3c7e287d655f42286b (diff)
fdo#46808, convert XMultiServiceFactory to XComponentContext
Change-Id: I5ed0b12bf37e7d235fc88182c006a6ed07ef2343
Diffstat (limited to 'framework/inc')
-rw-r--r--framework/inc/classes/droptargetlistener.hxx4
-rw-r--r--framework/inc/classes/propertysethelper.hxx10
-rw-r--r--framework/inc/classes/taskcreator.hxx6
-rw-r--r--framework/inc/dispatch/closedispatcher.hxx12
-rw-r--r--framework/inc/dispatch/dispatchinformationprovider.hxx6
-rw-r--r--framework/inc/dispatch/dispatchprovider.hxx4
-rw-r--r--framework/inc/helper/oframes.hxx12
-rw-r--r--framework/inc/services/frame.hxx12
8 files changed, 27 insertions, 39 deletions
diff --git a/framework/inc/classes/droptargetlistener.hxx b/framework/inc/classes/droptargetlistener.hxx
index 0a71804e9ca3..0a7e7d2bd439 100644
--- a/framework/inc/classes/droptargetlistener.hxx
+++ b/framework/inc/classes/droptargetlistener.hxx
@@ -41,7 +41,7 @@ class DropTargetListener : private ThreadHelpBase
private:
/// uno service manager to create necessary services
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/// weakreference to target frame (Don't use a hard reference. Owner can't delete us then!)
css::uno::WeakReference< css::frame::XFrame > m_xTargetFrame;
/// drag/drop info
@@ -51,7 +51,7 @@ class DropTargetListener : private ThreadHelpBase
// c++ interface
public:
- DropTargetListener( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ,
+ DropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
const css::uno::Reference< css::frame::XFrame >& xFrame );
~DropTargetListener( );
diff --git a/framework/inc/classes/propertysethelper.hxx b/framework/inc/classes/propertysethelper.hxx
index f414cf6714c0..2bc41094e55f 100644
--- a/framework/inc/classes/propertysethelper.hxx
+++ b/framework/inc/classes/propertysethelper.hxx
@@ -26,7 +26,6 @@
#include <general.h>
#include <stdtypes.h>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/PropertyExistException.hpp>
@@ -62,8 +61,6 @@ class FWI_DLLPUBLIC PropertySetHelper : public css::beans::XPropertySet
/* member */
protected:
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
-
PropertySetHelper::TPropInfoHash m_lProps;
ListenerHash m_lSimpleChangeListener;
@@ -84,10 +81,6 @@ class FWI_DLLPUBLIC PropertySetHelper : public css::beans::XPropertySet
//---------------------------------------------------------------------
/** initialize new instance of this helper.
*
- * @param xSMGR
- * points to an uno service manager, which is used internaly to create own
- * needed uno services.
- *
* @param pExternalLock
* this helper must be used as a baseclass ...
* but then it should synchronize its own calls
@@ -101,8 +94,7 @@ class FWI_DLLPUBLIC PropertySetHelper : public css::beans::XPropertySet
* @param bReleaseLockOnCall
* see member m_bReleaseLockOnCall
*/
- PropertySetHelper(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
- LockHelper* pExternalLock ,
+ PropertySetHelper( LockHelper* pExternalLock ,
TransactionManager* pExternalTransactionManager ,
sal_Bool bReleaseLockOnCall );
diff --git a/framework/inc/classes/taskcreator.hxx b/framework/inc/classes/taskcreator.hxx
index 44b51114e6b6..4a297f96d6cf 100644
--- a/framework/inc/classes/taskcreator.hxx
+++ b/framework/inc/classes/taskcreator.hxx
@@ -26,7 +26,7 @@
#include <general.h>
#include <com/sun/star/frame/XFramesSupplier.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ustring.hxx>
@@ -48,13 +48,13 @@ class TaskCreator : private ThreadHelpBase
// member
private:
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
//_______________________
// interface
public:
- TaskCreator( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR );
+ TaskCreator( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~TaskCreator( );
css::uno::Reference< css::frame::XFrame > createTask( const OUString& sName ,
diff --git a/framework/inc/dispatch/closedispatcher.hxx b/framework/inc/dispatch/closedispatcher.hxx
index 5b8860f563eb..96ef71c6609a 100644
--- a/framework/inc/dispatch/closedispatcher.hxx
+++ b/framework/inc/dispatch/closedispatcher.hxx
@@ -35,7 +35,7 @@
#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/frame/XDispatchResultListener.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <cppuhelper/weak.hxx>
@@ -89,7 +89,7 @@ class CloseDispatcher : public css::lang::XTypeProvider
/** @short reference to an uno service manager,
which can be used to create own needed
uno resources. */
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
//---------------------------------------
/** @short reference to the target frame, which should be
@@ -132,7 +132,7 @@ class CloseDispatcher : public css::lang::XTypeProvider
That makes an implementation (e.g. of listener support)
much more easier .-)
- @param xSMGR
+ @param rxContext
an un oservice manager, which is needed to create uno resource
internaly.
@@ -142,9 +142,9 @@ class CloseDispatcher : public css::lang::XTypeProvider
@param sTarget
help us to find the right target for this close operation.
*/
- CloseDispatcher(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
- const css::uno::Reference< css::frame::XFrame >& xFrame ,
- const OUString& sTarget);
+ CloseDispatcher(const css::uno::Reference< css::uno::XComponentContext >& rxContext ,
+ const css::uno::Reference< css::frame::XFrame >& xFrame ,
+ const OUString& sTarget);
//---------------------------------------
/** @short does nothing real. */
diff --git a/framework/inc/dispatch/dispatchinformationprovider.hxx b/framework/inc/dispatch/dispatchinformationprovider.hxx
index f39c68038861..cac95722ed6d 100644
--- a/framework/inc/dispatch/dispatchinformationprovider.hxx
+++ b/framework/inc/dispatch/dispatchinformationprovider.hxx
@@ -48,15 +48,15 @@ class DispatchInformationProvider : public css::frame::XDispatchInformationProv
// member
private:
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::WeakReference< css::frame::XFrame > m_xFrame;
//_______________________
// interface
public:
- DispatchInformationProvider(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
- const css::uno::Reference< css::frame::XFrame >& xFrame);
+ DispatchInformationProvider(const css::uno::Reference< css::uno::XComponentContext >& xContext ,
+ const css::uno::Reference< css::frame::XFrame >& xFrame);
virtual ~DispatchInformationProvider();
diff --git a/framework/inc/dispatch/dispatchprovider.hxx b/framework/inc/dispatch/dispatchprovider.hxx
index 484e0fa24b3f..777463b297ed 100644
--- a/framework/inc/dispatch/dispatchprovider.hxx
+++ b/framework/inc/dispatch/dispatchprovider.hxx
@@ -90,7 +90,7 @@ class DispatchProvider : // interfaces
/* member */
private:
/// reference to global service manager to create new services
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/// weakreference to owner frame (Don't use a hard reference. Owner can't delete us then!)
css::uno::WeakReference< css::frame::XFrame > m_xFrame;
/// different dispatcher to handle special dispatch calls, protocols or URLs (they will be created on demand.)
@@ -103,7 +103,7 @@ class DispatchProvider : // interfaces
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
- DispatchProvider( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ,
+ DispatchProvider( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
const css::uno::Reference< css::frame::XFrame >& xFrame );
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch ( const css::util::URL& aURL ,
diff --git a/framework/inc/helper/oframes.hxx b/framework/inc/helper/oframes.hxx
index 04078b082c13..844a2f7aaacf 100644
--- a/framework/inc/helper/oframes.hxx
+++ b/framework/inc/helper/oframes.hxx
@@ -77,16 +77,14 @@ class OFrames : private ThreadHelpBase , // Must be the first of base
@seealso -
- @param "xFactory" , reference to factory which has created ouer owner(!). We can use these to create new uno-services.
- @param "xOwner" , reference to ouer owner. We hold a wekreference to prevent us against cross-references!
- @param "pFrameContainer" , pointer to shared framecontainer of owner. It's valid only, if weakreference is valid!
+ @param xOwner , reference to ouer owner. We hold a wekreference to prevent us against cross-references!
+ @param pFrameContainer , pointer to shared framecontainer of owner. It's valid only, if weakreference is valid!
@return -
@onerror -
*//*-*****************************************************************************************************/
- OFrames( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ,
- const css::uno::Reference< css::frame::XFrame >& xOwner ,
+ OFrames( const css::uno::Reference< css::frame::XFrame >& xOwner ,
FrameContainer* pFrameContainer );
//---------------------------------------------------------------------------------------------------------
@@ -297,8 +295,7 @@ class OFrames : private ThreadHelpBase , // Must be the first of base
private:
- static sal_Bool impldbg_checkParameter_OFramesCtor ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ,
- const css::uno::Reference< css::frame::XFrame >& xOwner ,
+ static sal_Bool impldbg_checkParameter_OFramesCtor ( const css::uno::Reference< css::frame::XFrame >& xOwner ,
FrameContainer* pFrameContainer );
static sal_Bool impldbg_checkParameter_append ( const css::uno::Reference< css::frame::XFrame >& xFrame );
static sal_Bool impldbg_checkParameter_remove ( const css::uno::Reference< css::frame::XFrame >& xFrame );
@@ -313,7 +310,6 @@ class OFrames : private ThreadHelpBase , // Must be the first of base
private:
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; /// reference to global servicemanager
css::uno::WeakReference< css::frame::XFrame > m_xOwner ; /// reference to owner of this instance (Hold no hard reference!)
FrameContainer* m_pFrameContainer ; /// with owner shared list to hold all direct children of an XFramesSupplier
sal_Bool m_bRecursiveSearchProtection ; /// flag to protect against recursive searches of frames at parents
diff --git a/framework/inc/services/frame.hxx b/framework/inc/services/frame.hxx
index 492c3989c064..1dc011e236fe 100644
--- a/framework/inc/services/frame.hxx
+++ b/framework/inc/services/frame.hxx
@@ -129,8 +129,8 @@ class Frame : // interfaces
//---------------------------------------------------------------------------------------------------------
// constructor / destructor
//---------------------------------------------------------------------------------------------------------
- Frame( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
- virtual ~Frame( );
+ Frame( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ virtual ~Frame( );
//---------------------------------------------------------------------------------------------------------
// XInterface, XTypeProvider, XServiceInfo
@@ -365,7 +365,7 @@ class Frame : // interfaces
private:
- static sal_Bool implcp_ctor ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
+ static sal_Bool implcp_ctor ( const css::uno::Reference< css::uno::XComponentContext >& xContext );
static sal_Bool implcp_setActiveFrame ( const css::uno::Reference< css::frame::XFrame >& xFrame );
static sal_Bool implcp_addFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener >& xListener );
static sal_Bool implcp_removeFrameActionListener ( const css::uno::Reference< css::frame::XFrameActionListener >& xListener );
@@ -385,7 +385,7 @@ class Frame : // interfaces
//*************************************************************************************************************
private:
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; /// reference to factory, which has create this instance
+ css::uno::Reference< css::uno::XComponentContext > m_xContext ; /// reference to factory, which has create this instance
css::uno::Reference< css::task::XStatusIndicatorFactory > m_xIndicatorFactoryHelper ; /// reference to factory helper to create status indicator objects
css::uno::WeakReference< css::task::XStatusIndicator > m_xIndicatorInterception ; /// points to an external set progress, which should be used instead of the internal one.
css::uno::Reference< css::frame::XDispatchProvider > m_xDispatchHelper ; /// helper for XDispatch/Provider and interception interfaces
@@ -416,10 +416,10 @@ class Frame : // interfaces
FrameContainer m_aChildFrameContainer ; /// array of child frames
- inline css::uno::Reference< css::lang::XMultiServiceFactory > impl_getFactory()
+ inline css::uno::Reference< css::uno::XComponentContext > impl_getComponentContext()
{
ReadGuard aReadLock( m_aLock );
- return m_xFactory;
+ return m_xContext;
}
inline OUString impl_getName()