diff options
author | Noel Grandin <noel@peralex.com> | 2013-07-19 13:38:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-07-23 10:05:46 +0200 |
commit | 376d5a6ad979ef2b3e90c186ca8ede0ef2824200 (patch) | |
tree | e504f14486204108d19270e1bd419294a292ce10 /framework/inc | |
parent | 2f4c796c4db95a52b9478049e9872b92a93474b9 (diff) |
convert more services in framework module to WeakImplHelper
Change-Id: I417ae2ce644f39fce0e8eb9fbe6a3a3c783b6227
Diffstat (limited to 'framework/inc')
-rw-r--r-- | framework/inc/dispatch/closedispatcher.hxx | 17 | ||||
-rw-r--r-- | framework/inc/dispatch/dispatchinformationprovider.hxx | 9 | ||||
-rw-r--r-- | framework/inc/dispatch/dispatchprovider.hxx | 12 | ||||
-rw-r--r-- | framework/inc/dispatch/interceptionhelper.hxx | 16 | ||||
-rw-r--r-- | framework/inc/dispatch/mailtodispatcher.hxx | 18 | ||||
-rw-r--r-- | framework/inc/dispatch/menudispatcher.hxx | 20 | ||||
-rw-r--r-- | framework/inc/dispatch/oxt_handler.hxx | 22 | ||||
-rw-r--r-- | framework/inc/dispatch/popupmenudispatcher.hxx | 21 | ||||
-rw-r--r-- | framework/inc/dispatch/servicehandler.hxx | 17 | ||||
-rw-r--r-- | framework/inc/dispatch/startmoduledispatcher.hxx | 15 | ||||
-rw-r--r-- | framework/inc/dispatch/systemexec.hxx | 19 |
11 files changed, 74 insertions, 112 deletions
diff --git a/framework/inc/dispatch/closedispatcher.hxx b/framework/inc/dispatch/closedispatcher.hxx index 96ef71c6609a..af21194e2cd7 100644 --- a/framework/inc/dispatch/closedispatcher.hxx +++ b/framework/inc/dispatch/closedispatcher.hxx @@ -38,7 +38,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/frame/DispatchResultState.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase2.hxx> #include <vcl/evntpost.hxx> @@ -57,12 +57,11 @@ namespace framework{ or some other menu entries. Or we terminate the whole application in case this backing mode shouldnt be used. */ -class CloseDispatcher : public css::lang::XTypeProvider - , public css::frame::XNotifyingDispatch // => XDispatch - , public css::frame::XDispatchInformationProvider - // baseclasses ... order is necessary for right initialization! - , private ThreadHelpBase - , public ::cppu::OWeakObject +class CloseDispatcher : // baseclasses ... order is necessary for right initialization! + private ThreadHelpBase + , public ::cppu::WeakImplHelper2< + css::frame::XNotifyingDispatch, // => XDispatch + css::frame::XDispatchInformationProvider > { //------------------------------------------- // types @@ -156,10 +155,6 @@ class CloseDispatcher : public css::lang::XTypeProvider public: //--------------------------------------- - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER - - //--------------------------------------- // XNotifyingDispatch virtual void SAL_CALL dispatchWithNotification( const css::util::URL& aURL , const css::uno::Sequence< css::beans::PropertyValue >& lArguments, diff --git a/framework/inc/dispatch/dispatchinformationprovider.hxx b/framework/inc/dispatch/dispatchinformationprovider.hxx index cac95722ed6d..fe7a2e50f752 100644 --- a/framework/inc/dispatch/dispatchinformationprovider.hxx +++ b/framework/inc/dispatch/dispatchinformationprovider.hxx @@ -32,7 +32,7 @@ #include <cppuhelper/weakref.hxx> #include <rtl/ustring.hxx> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase1.hxx> #include <vcl/svapp.hxx> namespace framework{ @@ -40,9 +40,8 @@ namespace framework{ /*-************************************************************************************************************//** @short a helper to merge dispatch information of different sources together. *//*-*************************************************************************************************************/ -class DispatchInformationProvider : public css::frame::XDispatchInformationProvider - , private ThreadHelpBase - , public ::cppu::OWeakObject +class DispatchInformationProvider : private ThreadHelpBase + , public ::cppu::WeakImplHelper1< css::frame::XDispatchInformationProvider > { //_______________________ // member @@ -60,8 +59,6 @@ class DispatchInformationProvider : public css::frame::XDispatchInformationProv virtual ~DispatchInformationProvider(); - FWK_DECLARE_XINTERFACE - virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedCommandGroups() throw (css::uno::RuntimeException); diff --git a/framework/inc/dispatch/dispatchprovider.hxx b/framework/inc/dispatch/dispatchprovider.hxx index 777463b297ed..3a904a9c4345 100644 --- a/framework/inc/dispatch/dispatchprovider.hxx +++ b/framework/inc/dispatch/dispatchprovider.hxx @@ -38,7 +38,7 @@ #include <com/sun/star/frame/DispatchDescriptor.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase1.hxx> #include <cppuhelper/weakref.hxx> namespace framework{ @@ -78,14 +78,12 @@ enum EDispatchHelper @devstatus ready to use @threadsafe yes */ -class DispatchProvider : // interfaces - public css::lang::XTypeProvider , - public css::frame::XDispatchProvider , - // baseclasses +class DispatchProvider : // baseclasses // Order is necessary for right initialization! private ThreadHelpBase , private TransactionBase , - public ::cppu::OWeakObject + // interfaces + public ::cppu::WeakImplHelper1< css::frame::XDispatchProvider > { /* member */ private: @@ -100,8 +98,6 @@ class DispatchProvider : // interfaces /* interface */ public: - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER DispatchProvider( const css::uno::Reference< css::uno::XComponentContext >& xContext , const css::uno::Reference< css::frame::XFrame >& xFrame ); diff --git a/framework/inc/dispatch/interceptionhelper.hxx b/framework/inc/dispatch/interceptionhelper.hxx index 7e47e949f4db..38a83f9ff08e 100644 --- a/framework/inc/dispatch/interceptionhelper.hxx +++ b/framework/inc/dispatch/interceptionhelper.hxx @@ -36,7 +36,7 @@ #include <com/sun/star/frame/DispatchDescriptor.hpp> #include <tools/wldcrd.hxx> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase3.hxx> #include <cppuhelper/weakref.hxx> #include <deque> @@ -51,12 +51,12 @@ namespace framework{ @attention Don't use this class as direct member - use it dynamicly. Do not derive from this class. We hold a weakreference to ouer owner not to ouer superclass. */ -class InterceptionHelper : public css::frame::XDispatchProvider - , public css::frame::XDispatchProviderInterception - , public css::lang::XEventListener - // order of base classes is important for right initialization of mutex member! - , private ThreadHelpBase - , public ::cppu::OWeakObject +class InterceptionHelper : // order of base classes is important for right initialization of mutex member! + private ThreadHelpBase, + public ::cppu::WeakImplHelper3< + css::frame::XDispatchProvider, + css::frame::XDispatchProviderInterception, + css::lang::XEventListener > { //_____________________________________________________ // structs, helper @@ -195,8 +195,6 @@ class InterceptionHelper : public css::frame::XDispatchProvider public: - FWK_DECLARE_XINTERFACE - //_________________________________________________ // XDispatchProvider diff --git a/framework/inc/dispatch/mailtodispatcher.hxx b/framework/inc/dispatch/mailtodispatcher.hxx index f4662f04137b..0a0bf8964a74 100644 --- a/framework/inc/dispatch/mailtodispatcher.hxx +++ b/framework/inc/dispatch/mailtodispatcher.hxx @@ -37,7 +37,8 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/frame/XStatusListener.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase3.hxx> + namespace framework{ @@ -53,15 +54,14 @@ namespace framework{ @devstatus ready to use */ -class MailToDispatcher : // interfaces - public css::lang::XTypeProvider , - public css::lang::XServiceInfo , - public css::frame::XDispatchProvider , - public css::frame::XNotifyingDispatch, // => XDispatch - // baseclasses +class MailToDispatcher : // baseclasses // Order is necessary for right initialization! private ThreadHelpBase , - public cppu::OWeakObject + // interfaces + public ::cppu::WeakImplHelper3< + css::lang::XServiceInfo, + css::frame::XDispatchProvider, + css::frame::XNotifyingDispatch> // => XDispatch { /* member */ private: @@ -77,8 +77,6 @@ class MailToDispatcher : // interfaces virtual ~MailToDispatcher( ); // XInterface, XTypeProvider, XServiceInfo - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER DECLARE_XSERVICEINFO // XDispatchProvider diff --git a/framework/inc/dispatch/menudispatcher.hxx b/framework/inc/dispatch/menudispatcher.hxx index cc274c7e4f32..b8fbc9ba4944 100644 --- a/framework/inc/dispatch/menudispatcher.hxx +++ b/framework/inc/dispatch/menudispatcher.hxx @@ -43,7 +43,7 @@ #include <com/sun/star/frame/FeatureStateEvent.hpp> #include <com/sun/star/frame/XFrameActionListener.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase2.hxx> #include <cppuhelper/weakref.hxx> #include <cppuhelper/interfacecontainer.h> @@ -74,14 +74,13 @@ typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString , @devstatus ready to use *//*-*************************************************************************************************************/ -class MenuDispatcher : // interfaces - public css::lang::XTypeProvider , - public css::frame::XDispatch , - public css::frame::XFrameActionListener , - // baseclasses +class MenuDispatcher : // baseclasses // Order is necessary for right initialization! public ThreadHelpBase , - public cppu::OWeakObject + // interfaces + public ::cppu::WeakImplHelper2< + css::frame::XDispatch , + css::frame::XFrameActionListener > { //------------------------------------------------------------------------------------------------------------- // public methods @@ -110,13 +109,6 @@ class MenuDispatcher : // interfaces const css::uno::Reference< css::frame::XFrame >& xOwner ); //--------------------------------------------------------------------------------------------------------- - // XInterface - //--------------------------------------------------------------------------------------------------------- - - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER - - //--------------------------------------------------------------------------------------------------------- // XDispatch //--------------------------------------------------------------------------------------------------------- diff --git a/framework/inc/dispatch/oxt_handler.hxx b/framework/inc/dispatch/oxt_handler.hxx index 87e95dbd617b..295f88aa9861 100644 --- a/framework/inc/dispatch/oxt_handler.hxx +++ b/framework/inc/dispatch/oxt_handler.hxx @@ -39,7 +39,8 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/util/URL.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase3.hxx> + namespace framework{ @@ -54,15 +55,14 @@ namespace framework{ @devstatus ready @threadsafe yes *//*-*************************************************************************************************************/ -class Oxt_Handler : // interfaces - public css::lang::XTypeProvider - , public css::lang::XServiceInfo - , public css::frame::XNotifyingDispatch // => XDispatch - , public css::document::XExtendedFilterDetection - // baseclasses +class Oxt_Handler : // baseclasses // Order is necessary for right initialization! - , private ThreadHelpBase - , public ::cppu::OWeakObject + private ThreadHelpBase + // interfaces + , public ::cppu::WeakImplHelper3< + css::lang::XServiceInfo, + css::frame::XNotifyingDispatch, // => XDispatch + css::document::XExtendedFilterDetection > { //------------------------------------------------------------------------------------------------------------- // public methods @@ -78,9 +78,7 @@ class Oxt_Handler : // interfaces //--------------------------------------------------------------------------------------------------------- // XInterface, XTypeProvider, XServiceInfo //--------------------------------------------------------------------------------------------------------- - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER - DECLARE_XSERVICEINFO + DECLARE_XSERVICEINFO //--------------------------------------------------------------------------------------------------------- // XNotifyingDispatch diff --git a/framework/inc/dispatch/popupmenudispatcher.hxx b/framework/inc/dispatch/popupmenudispatcher.hxx index 1a5116b92048..8402313066b0 100644 --- a/framework/inc/dispatch/popupmenudispatcher.hxx +++ b/framework/inc/dispatch/popupmenudispatcher.hxx @@ -45,7 +45,7 @@ #include <com/sun/star/uri/XUriReferenceFactory.hpp> #include <com/sun/star/uri/XUriReference.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase5.hxx> #include <cppuhelper/weakref.hxx> #include <cppuhelper/interfacecontainer.h> @@ -76,17 +76,16 @@ typedef ::cppu::OMultiTypeInterfaceContainerHelperVar< OUString , @devstatus ready to use *//*-*************************************************************************************************************/ -class PopupMenuDispatcher : // interfaces - public css::lang::XTypeProvider , - public css::lang::XServiceInfo , - public css::frame::XDispatchProvider , - public css::frame::XDispatch , - public css::frame::XFrameActionListener , - public css::lang::XInitialization , - // baseclasses +class PopupMenuDispatcher : // baseclasses // Order is necessary for right initialization! public ThreadHelpBase , - public cppu::OWeakObject + // interfaces + public ::cppu::WeakImplHelper5< + css::lang::XServiceInfo, + css::frame::XDispatchProvider, + css::frame::XDispatch, + css::frame::XFrameActionListener, + css::lang::XInitialization > { //------------------------------------------------------------------------------------------------------------- // public methods @@ -97,8 +96,6 @@ class PopupMenuDispatcher : // interfaces PopupMenuDispatcher( const css::uno::Reference< css::uno::XComponentContext >& xContext ); // XInterface, XTypeProvider, XServiceInfo - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER DECLARE_XSERVICEINFO // XInitialization diff --git a/framework/inc/dispatch/servicehandler.hxx b/framework/inc/dispatch/servicehandler.hxx index 1210a2afe86d..10e8d279a40f 100644 --- a/framework/inc/dispatch/servicehandler.hxx +++ b/framework/inc/dispatch/servicehandler.hxx @@ -37,7 +37,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/frame/XStatusListener.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase3.hxx> namespace framework{ @@ -57,15 +57,14 @@ namespace framework{ @devstatus ready to use */ -class ServiceHandler : // interfaces - public css::lang::XTypeProvider , - public css::lang::XServiceInfo , - public css::frame::XDispatchProvider , - public css::frame::XNotifyingDispatch, // => XDispatch - // baseclasses +class ServiceHandler : // baseclasses // Order is necessary for right initialization! private ThreadHelpBase , - public cppu::OWeakObject + // interfaces + public ::cppu::WeakImplHelper3< + css::lang::XServiceInfo , + css::frame::XDispatchProvider , + css::frame::XNotifyingDispatch > // => XDispatch { /* member */ private: @@ -81,8 +80,6 @@ class ServiceHandler : // interfaces virtual ~ServiceHandler( ); // XInterface, XTypeProvider, XServiceInfo - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER DECLARE_XSERVICEINFO // XDispatchProvider diff --git a/framework/inc/dispatch/startmoduledispatcher.hxx b/framework/inc/dispatch/startmoduledispatcher.hxx index 5058f3a3e522..b4f0cd144539 100644 --- a/framework/inc/dispatch/startmoduledispatcher.hxx +++ b/framework/inc/dispatch/startmoduledispatcher.hxx @@ -39,7 +39,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/frame/DispatchResultState.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase2.hxx> #include <vcl/evntpost.hxx> @@ -49,12 +49,11 @@ namespace framework{ /** @short helper to handle all URLs related to the StartModule */ -class StartModuleDispatcher : public css::lang::XTypeProvider - , public css::frame::XNotifyingDispatch // => XDispatch - , public css::frame::XDispatchInformationProvider - // baseclasses ... order is necessary for right initialization! - , private ThreadHelpBase - , public ::cppu::OWeakObject +class StartModuleDispatcher : // baseclasses ... order is necessary for right initialization! + private ThreadHelpBase, + public ::cppu::WeakImplHelper2< + css::frame::XNotifyingDispatch, // => XDispatch + css::frame::XDispatchInformationProvider > { //------------------------------------------- // member @@ -113,8 +112,6 @@ class StartModuleDispatcher : public css::lang::XTypeProvider public: //--------------------------------------- - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER //--------------------------------------- // XNotifyingDispatch diff --git a/framework/inc/dispatch/systemexec.hxx b/framework/inc/dispatch/systemexec.hxx index c343b7661a63..0f222664d2d2 100644 --- a/framework/inc/dispatch/systemexec.hxx +++ b/framework/inc/dispatch/systemexec.hxx @@ -37,7 +37,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/frame/XStatusListener.hpp> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase3.hxx> namespace framework{ @@ -55,15 +55,14 @@ namespace framework{ @devstatus ready to use */ -class SystemExec : // interfaces - public css::lang::XTypeProvider , - public css::lang::XServiceInfo , - public css::frame::XDispatchProvider , - public css::frame::XNotifyingDispatch, // => XDispatch - // baseclasses +class SystemExec : // baseclasses // Order is necessary for right initialization! private ThreadHelpBase , - public cppu::OWeakObject + // interfaces + public ::cppu::WeakImplHelper3< + css::lang::XServiceInfo , + css::frame::XDispatchProvider , + css::frame::XNotifyingDispatch > // => XDispatch { /* member */ private: @@ -76,11 +75,9 @@ class SystemExec : // interfaces // ctor/dtor SystemExec( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); - virtual ~SystemExec( ); + virtual ~SystemExec( ); // XInterface, XTypeProvider, XServiceInfo - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER DECLARE_XSERVICEINFO // XDispatchProvider |