Kaydet (Commit) 376d5a6a authored tarafından Noel Grandin's avatar Noel Grandin

convert more services in framework module to WeakImplHelper

Change-Id: I417ae2ce644f39fce0e8eb9fbe6a3a3c783b6227
üst 2f4c796c
......@@ -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
......@@ -155,10 +154,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 ,
......
......@@ -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);
......
......@@ -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 );
......
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -109,13 +108,6 @@ class MenuDispatcher : // interfaces
MenuDispatcher( const css::uno::Reference< css::uno::XComponentContext >& rxContext ,
const css::uno::Reference< css::frame::XFrame >& xOwner );
//---------------------------------------------------------------------------------------------------------
// XInterface
//---------------------------------------------------------------------------------------------------------
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
//---------------------------------------------------------------------------------------------------------
// XDispatch
//---------------------------------------------------------------------------------------------------------
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -83,25 +83,6 @@ namespace framework
return sKeyBuffer.makeStringAndClear();
}
//-----------------------------------------------
// XInterface, XTypeProvider
DEFINE_XINTERFACE_6(XMLBasedAcceleratorConfiguration ,
OWeakObject ,
DIRECT_INTERFACE(css::lang::XTypeProvider ),
DIRECT_INTERFACE(css::ui::XAcceleratorConfiguration ),
DIRECT_INTERFACE(css::form::XReset ),
DIRECT_INTERFACE(css::ui::XUIConfigurationPersistence),
DIRECT_INTERFACE(css::ui::XUIConfigurationStorage ),
DIRECT_INTERFACE(css::ui::XUIConfiguration ))
DEFINE_XTYPEPROVIDER_6(XMLBasedAcceleratorConfiguration ,
css::lang::XTypeProvider ,
css::ui::XAcceleratorConfiguration ,
css::form::XReset ,
css::ui::XUIConfigurationPersistence,
css::ui::XUIConfigurationStorage ,
css::ui::XUIConfiguration )
//-----------------------------------------------
XMLBasedAcceleratorConfiguration::XMLBasedAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: ThreadHelpBase (&Application::GetSolarMutex())
......@@ -631,29 +612,6 @@ OUString XMLBasedAcceleratorConfiguration::impl_ts_getLocale() const
*
*******************************************************************************/
//-----------------------------------------------
// XInterface, XTypeProvider
DEFINE_XINTERFACE_8(XCUBasedAcceleratorConfiguration ,
OWeakObject ,
DIRECT_INTERFACE(css::lang::XTypeProvider ),
DIRECT_INTERFACE(css::ui::XAcceleratorConfiguration ),
DIRECT_INTERFACE(css::util::XChangesListener ),
DIRECT_INTERFACE(css::form::XReset ),
DIRECT_INTERFACE(css::lang::XComponent ),
DIRECT_INTERFACE(css::ui::XUIConfigurationPersistence),
DIRECT_INTERFACE(css::ui::XUIConfigurationStorage ),
DIRECT_INTERFACE(css::ui::XUIConfiguration ))
DEFINE_XTYPEPROVIDER_8(XCUBasedAcceleratorConfiguration ,
css::lang::XTypeProvider ,
css::ui::XAcceleratorConfiguration ,
css::util::XChangesListener ,
css::form::XReset ,
css::lang::XComponent ,
css::ui::XUIConfigurationPersistence,
css::ui::XUIConfigurationStorage ,
css::ui::XUIConfiguration )
//-----------------------------------------------
XCUBasedAcceleratorConfiguration::XCUBasedAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: ThreadHelpBase (&Application::GetSolarMutex())
......
......@@ -54,17 +54,6 @@ namespace framework
//-----------------------------------------------
// XInterface, XTypeProvider, XServiceInfo
DEFINE_XINTERFACE_2(DocumentAcceleratorConfiguration ,
XMLBasedAcceleratorConfiguration ,
DIRECT_INTERFACE(css::lang::XServiceInfo) ,
DIRECT_INTERFACE(css::lang::XInitialization))
// DIRECT_INTERFACE(css::ui::XUIConfigurationStorage))
DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS(DocumentAcceleratorConfiguration ,
XMLBasedAcceleratorConfiguration ,
css::lang::XServiceInfo ,
css::lang::XInitialization)
// css::ui::XUIConfigurationStorage)
DEFINE_XSERVICEINFO_MULTISERVICE_2(DocumentAcceleratorConfiguration ,
::cppu::OWeakObject ,
......@@ -83,7 +72,7 @@ DEFINE_INIT_SERVICE(DocumentAcceleratorConfiguration,
//-----------------------------------------------
DocumentAcceleratorConfiguration::DocumentAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: XMLBasedAcceleratorConfiguration(xContext)
: DocumentAcceleratorConfiguration_BASE(xContext)
{
}
......
......@@ -43,14 +43,6 @@ namespace framework
//-----------------------------------------------
// XInterface, XTypeProvider, XServiceInfo
DEFINE_XINTERFACE_2(GlobalAcceleratorConfiguration ,
XCUBasedAcceleratorConfiguration ,
DIRECT_INTERFACE(css::lang::XServiceInfo),
DIRECT_INTERFACE(css::lang::XInitialization))
DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS(GlobalAcceleratorConfiguration,
XCUBasedAcceleratorConfiguration ,
css::lang::XServiceInfo ,
css::lang::XInitialization)
DEFINE_XSERVICEINFO_MULTISERVICE_2(GlobalAcceleratorConfiguration ,
::cppu::OWeakObject ,
......@@ -70,7 +62,7 @@ DEFINE_INIT_SERVICE(GlobalAcceleratorConfiguration,
//-----------------------------------------------
GlobalAcceleratorConfiguration::GlobalAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: XCUBasedAcceleratorConfiguration(xContext)
: GlobalAcceleratorConfiguration_BASE(xContext)
{
}
......
......@@ -49,15 +49,6 @@ namespace framework
//-----------------------------------------------
// XInterface, XTypeProvider, XServiceInfo
DEFINE_XINTERFACE_2(ModuleAcceleratorConfiguration ,
XCUBasedAcceleratorConfiguration ,
DIRECT_INTERFACE(css::lang::XServiceInfo) ,
DIRECT_INTERFACE(css::lang::XInitialization))
DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS(ModuleAcceleratorConfiguration,
XCUBasedAcceleratorConfiguration ,
css::lang::XServiceInfo ,
css::lang::XInitialization )
DEFINE_XSERVICEINFO_MULTISERVICE_2(ModuleAcceleratorConfiguration ,
::cppu::OWeakObject ,
......@@ -76,7 +67,7 @@ DEFINE_INIT_SERVICE(ModuleAcceleratorConfiguration,
//-----------------------------------------------
ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: XCUBasedAcceleratorConfiguration(xContext)
: ModuleAcceleratorConfiguration_BASE(xContext)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration" );
}
......
......@@ -57,26 +57,11 @@ const char URL_CLOSEWIN[] = ".uno:CloseWin";
const char URL_CLOSEFRAME[] = ".uno:CloseFrame";
DEFINE_XINTERFACE_4(CloseDispatcher ,
OWeakObject ,
DIRECT_INTERFACE(css::lang::XTypeProvider ),
DIRECT_INTERFACE(css::frame::XNotifyingDispatch ),
DIRECT_INTERFACE(css::frame::XDispatch ),
DIRECT_INTERFACE(css::frame::XDispatchInformationProvider))
// Note: XStatusListener is an implementation detail. Hide it for scripting!
DEFINE_XTYPEPROVIDER_4(CloseDispatcher ,
css::lang::XTypeProvider ,
css::frame::XDispatchInformationProvider,
css::frame::XNotifyingDispatch ,
css::frame::XDispatch )
//-----------------------------------------------
CloseDispatcher::CloseDispatcher(const css::uno::Reference< css::uno::XComponentContext >& rxContext ,
const css::uno::Reference< css::frame::XFrame >& xFrame ,
const OUString& sTarget)
: ThreadHelpBase (&Application::GetSolarMutex() )
, ::cppu::OWeakObject( )
, m_xContext (rxContext )
, m_aAsyncCallback (LINK( this, CloseDispatcher, impl_asyncCallback))
, m_lStatusListener (m_aLock.getShareableOslMutex() )
......
......@@ -32,10 +32,6 @@
namespace framework{
DEFINE_XINTERFACE_1(DispatchInformationProvider ,
OWeakObject ,
DIRECT_INTERFACE(css::frame::XDispatchInformationProvider))
//_________________________________________________________________________________________________________________
DispatchInformationProvider::DispatchInformationProvider(const css::uno::Reference< css::uno::XComponentContext >& xContext ,
const css::uno::Reference< css::frame::XFrame >& xFrame)
......
......@@ -49,20 +49,6 @@
namespace framework{
//*****************************************************************************************************************
// XInterface, XTypeProvider
//*****************************************************************************************************************
DEFINE_XINTERFACE_2( DispatchProvider ,
OWeakObject ,
DIRECT_INTERFACE(css::lang::XTypeProvider ),
DIRECT_INTERFACE(css::frame::XDispatchProvider)
)
DEFINE_XTYPEPROVIDER_2( DispatchProvider ,
css::lang::XTypeProvider ,
css::frame::XDispatchProvider
)
/**
@short standard ctor/dtor
@descr These initialize a new instance of this class with needed information for work.
......@@ -81,7 +67,6 @@ DispatchProvider::DispatchProvider( const css::uno::Reference< css::uno::XCompon
const css::uno::Reference< css::frame::XFrame >& xFrame )
// Init baseclasses first
: ThreadHelpBase( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
, m_xContext ( rxContext )
, m_xFrame ( xFrame )
......
......@@ -31,17 +31,10 @@ sal_Bool InterceptionHelper::m_bPreferrFirstInterceptor = sal_True;
DEFINE_XINTERFACE_3(InterceptionHelper ,
OWeakObject ,
DIRECT_INTERFACE(css::frame::XDispatchProvider ),
DIRECT_INTERFACE(css::frame::XDispatchProviderInterception),
DIRECT_INTERFACE(css::lang::XEventListener ))
InterceptionHelper::InterceptionHelper(const css::uno::Reference< css::frame::XFrame >& xOwner,
const css::uno::Reference< css::frame::XDispatchProvider >& xSlave)
// Init baseclasses first
: ThreadHelpBase(&Application::GetSolarMutex())
, OWeakObject ( )
// Init member
, m_xOwnerWeak (xOwner )
, m_xSlave (xSlave )
......
......@@ -33,21 +33,6 @@ namespace framework{
//_________________________________________________________________________________________________________________
// XInterface, XTypeProvider, XServiceInfo
DEFINE_XINTERFACE_5(MailToDispatcher ,
OWeakObject ,
DIRECT_INTERFACE(css::lang::XTypeProvider ),
DIRECT_INTERFACE(css::lang::XServiceInfo ),
DIRECT_INTERFACE(css::frame::XDispatchProvider ),
DIRECT_INTERFACE(css::frame::XNotifyingDispatch),
DIRECT_INTERFACE(css::frame::XDispatch ))
DEFINE_XTYPEPROVIDER_5(MailToDispatcher ,
css::lang::XTypeProvider ,
css::lang::XServiceInfo ,
css::frame::XDispatchProvider ,
css::frame::XNotifyingDispatch,
css::frame::XDispatch )
DEFINE_XSERVICEINFO_MULTISERVICE_2(MailToDispatcher ,
::cppu::OWeakObject ,
SERVICENAME_PROTOCOLHANDLER ,
......@@ -75,7 +60,6 @@ DEFINE_INIT_SERVICE(MailToDispatcher,
MailToDispatcher::MailToDispatcher( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
// Init baseclasses first
: ThreadHelpBase( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
, m_xContext ( rxContext )
{
......
......@@ -95,7 +95,6 @@ MenuDispatcher::MenuDispatcher( const uno::Reference< XComponentContext >&
const uno::Reference< XFrame >& xOwner )
// Init baseclasses first
: ThreadHelpBase ( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
, m_xOwnerWeak ( xOwner )
, m_xContext ( xContext )
......@@ -122,25 +121,6 @@ MenuDispatcher::~MenuDispatcher()
// and a dtor isn't the best place to do that!
}
//*****************************************************************************************************************
// XInterface, XTypeProvider
//*****************************************************************************************************************
DEFINE_XINTERFACE_4 ( MenuDispatcher ,
OWeakObject ,
DIRECT_INTERFACE( XTypeProvider ),
DIRECT_INTERFACE( XDispatch ),
DIRECT_INTERFACE( XEventListener ),
DERIVED_INTERFACE( XFrameActionListener, XEventListener )
)
DEFINE_XTYPEPROVIDER_4 ( MenuDispatcher ,
XTypeProvider ,
XDispatch ,
XEventListener ,
XFrameActionListener
)
//*****************************************************************************************************************
// XDispatch
//*****************************************************************************************************************
......
......@@ -37,22 +37,6 @@ namespace framework{
//*****************************************************************************************************************
// XInterface, XTypeProvider, XServiceInfo
//*****************************************************************************************************************
DEFINE_XINTERFACE_5 ( Oxt_Handler ,
OWeakObject ,
DIRECT_INTERFACE( css::lang::XTypeProvider ),
DIRECT_INTERFACE( css::lang::XServiceInfo ),
DIRECT_INTERFACE( css::frame::XNotifyingDispatch ),
DIRECT_INTERFACE( css::frame::XDispatch ),
DIRECT_INTERFACE( css::document::XExtendedFilterDetection )
)
DEFINE_XTYPEPROVIDER_5 ( Oxt_Handler ,
css::lang::XTypeProvider ,
css::lang::XServiceInfo ,
css::frame::XNotifyingDispatch ,
css::frame::XDispatch ,
css::document::XExtendedFilterDetection
)
DEFINE_XSERVICEINFO_MULTISERVICE ( Oxt_Handler ,
::cppu::OWeakObject ,
......@@ -80,7 +64,6 @@ DEFINE_INIT_SERVICE ( Oxt_Handler,
Oxt_Handler::Oxt_Handler( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory )
// Init baseclasses first
: ThreadHelpBase ( )
, ::cppu::OWeakObject ( )
// Init member
, m_xFactory ( xFactory )
{
......
......@@ -61,7 +61,6 @@ PopupMenuDispatcher::PopupMenuDispatcher(
const uno::Reference< XComponentContext >& xContext )
// Init baseclasses first
: ThreadHelpBase ( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
, m_xContext ( xContext )
, m_aListenerContainer ( m_aLock.getShareableOslMutex() )
......@@ -80,30 +79,6 @@ PopupMenuDispatcher::~PopupMenuDispatcher()
// and a dtor isn't the best place to do that!
}
//*****************************************************************************************************************
// XInterface, XTypeProvider
//*****************************************************************************************************************
DEFINE_XINTERFACE_7 ( PopupMenuDispatcher ,
::cppu::OWeakObject ,
DIRECT_INTERFACE( XTypeProvider ),
DIRECT_INTERFACE( XServiceInfo ),
DIRECT_INTERFACE( XDispatchProvider ),
DIRECT_INTERFACE( XDispatch ),
DIRECT_INTERFACE( XEventListener ),
DIRECT_INTERFACE( XInitialization ),
DERIVED_INTERFACE( XFrameActionListener, XEventListener )
)
DEFINE_XTYPEPROVIDER_7 ( PopupMenuDispatcher ,
XTypeProvider ,
XServiceInfo ,
XDispatchProvider ,
XDispatch ,
XEventListener ,
XInitialization ,
XFrameActionListener
)
OUString SAL_CALL PopupMenuDispatcher::getImplementationName() throw( css::uno::RuntimeException )
{
return impl_getStaticImplementationName();
......
......@@ -35,21 +35,6 @@ namespace framework{
//_________________________________________________________________________________________________________________
// XInterface, XTypeProvider, XServiceInfo
DEFINE_XINTERFACE_5(ServiceHandler ,
OWeakObject ,
DIRECT_INTERFACE(css::lang::XTypeProvider ),
DIRECT_INTERFACE(css::lang::XServiceInfo ),
DIRECT_INTERFACE(css::frame::XDispatchProvider ),
DIRECT_INTERFACE(css::frame::XNotifyingDispatch),
DIRECT_INTERFACE(css::frame::XDispatch ))
DEFINE_XTYPEPROVIDER_5(ServiceHandler ,
css::lang::XTypeProvider ,
css::lang::XServiceInfo ,
css::frame::XDispatchProvider ,
css::frame::XNotifyingDispatch,
css::frame::XDispatch )
DEFINE_XSERVICEINFO_MULTISERVICE(ServiceHandler ,
::cppu::OWeakObject ,
SERVICENAME_PROTOCOLHANDLER ,
......@@ -77,7 +62,6 @@ DEFINE_INIT_SERVICE(ServiceHandler,
ServiceHandler::ServiceHandler( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory )
// Init baseclasses first
: ThreadHelpBase( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
, m_xFactory ( xFactory )
{
......
......@@ -53,26 +53,11 @@ namespace framework{
namespace fpf = ::framework::pattern::frame;
DEFINE_XINTERFACE_4(StartModuleDispatcher ,
OWeakObject ,
DIRECT_INTERFACE(css::lang::XTypeProvider ),
DIRECT_INTERFACE(css::frame::XNotifyingDispatch ),
DIRECT_INTERFACE(css::frame::XDispatch ),
DIRECT_INTERFACE(css::frame::XDispatchInformationProvider))
// Note: XStatusListener is an implementation detail. Hide it for scripting!
DEFINE_XTYPEPROVIDER_4(StartModuleDispatcher ,
css::lang::XTypeProvider ,
css::frame::XDispatchInformationProvider,
css::frame::XNotifyingDispatch ,
css::frame::XDispatch )
//-----------------------------------------------
StartModuleDispatcher::StartModuleDispatcher(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const css::uno::Reference< css::frame::XFrame >& xFrame ,
const OUString& sTarget)
: ThreadHelpBase (&Application::GetSolarMutex() )
, ::cppu::OWeakObject( )
, m_xContext (rxContext )
, m_xOwner (xFrame )
, m_sDispatchTarget (sTarget )
......
......@@ -39,21 +39,6 @@ namespace framework{
//_________________________________________________________________________________________________________________
// XInterface, XTypeProvider, XServiceInfo
DEFINE_XINTERFACE_5(SystemExec ,
OWeakObject ,
DIRECT_INTERFACE(css::lang::XTypeProvider ),
DIRECT_INTERFACE(css::lang::XServiceInfo ),
DIRECT_INTERFACE(css::frame::XDispatchProvider ),
DIRECT_INTERFACE(css::frame::XNotifyingDispatch),
DIRECT_INTERFACE(css::frame::XDispatch ))
DEFINE_XTYPEPROVIDER_5(SystemExec ,
css::lang::XTypeProvider ,
css::lang::XServiceInfo ,
css::frame::XDispatchProvider ,
css::frame::XNotifyingDispatch,
css::frame::XDispatch )
DEFINE_XSERVICEINFO_MULTISERVICE_2(SystemExec ,
::cppu::OWeakObject ,
SERVICENAME_PROTOCOLHANDLER ,
......@@ -74,7 +59,6 @@ DEFINE_INIT_SERVICE(SystemExec,
SystemExec::SystemExec( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
// Init baseclasses first
: ThreadHelpBase( &Application::GetSolarMutex() )
, OWeakObject ( )
// Init member
, m_xContext ( rxContext )
{
......
......@@ -47,7 +47,8 @@
#include <com/sun/star/form/XReset.hpp>
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase4.hxx>
#include <salhelper/singletonref.hxx>
//__________________________________________
......@@ -68,14 +69,13 @@ typedef PresetHandler AcceleratorPresets;
/**
implements a read/write access to the accelerator configuration.
*/
class XMLBasedAcceleratorConfiguration : protected ThreadHelpBase // attention! Must be the first base class to guarentee right initialize lock ...
, public IStorageListener
, public ::cppu::OWeakObject
, public css::lang::XTypeProvider
, public css::form::XReset // TODO use XPresetHandler instead if available
, public css::ui::XAcceleratorConfiguration // => css::ui::XUIConfigurationPersistence
// css::ui::XUIConfigurationStorage
// css::ui::XUIConfiguration
class XMLBasedAcceleratorConfiguration : protected ThreadHelpBase, // attention! Must be the first base class to guarentee right initialize lock ...
public IStorageListener,
public ::cppu::WeakImplHelper2<
css::form::XReset, // TODO use XPresetHandler instead if available
css::ui::XAcceleratorConfiguration > // => css::ui::XUIConfigurationPersistence
// css::ui::XUIConfigurationStorage
// css::ui::XUIConfiguration
{
//______________________________________
// member
......@@ -116,10 +116,6 @@ class XMLBasedAcceleratorConfiguration : protected ThreadHelpBase
public:
// XInterface, XTypeProvider
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
// XAcceleratorConfiguration
virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL getAllKeyEvents()
throw(css::uno::RuntimeException);
......@@ -286,15 +282,14 @@ class XMLBasedAcceleratorConfiguration : protected ThreadHelpBase
};
class XCUBasedAcceleratorConfiguration : protected ThreadHelpBase // attention! Must be the first base class to guarentee right initialize lock ...
, public ::cppu::OWeakObject
, public css::lang::XTypeProvider
, public css::util::XChangesListener
, public css::lang::XComponent
, public css::form::XReset // TODO use XPresetHandler instead if available
, public css::ui::XAcceleratorConfiguration // => css::ui::XUIConfigurationPersistence
// css::ui::XUIConfigurationStorage
// css::ui::XUIConfiguration
class XCUBasedAcceleratorConfiguration : protected ThreadHelpBase, // attention! Must be the first base class to guarentee right initialize lock ...
public ::cppu::WeakImplHelper4<
css::util::XChangesListener,
css::lang::XComponent,
css::form::XReset, // TODO use XPresetHandler instead if available
css::ui::XAcceleratorConfiguration > // => css::ui::XUIConfigurationPersistence
// css::ui::XUIConfigurationStorage
// css::ui::XUIConfiguration
{
//______________________________________
// member
......@@ -330,10 +325,6 @@ class XCUBasedAcceleratorConfiguration : protected ThreadHelpBase
public:
// XInterface, XTypeProvider
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
// XAcceleratorConfiguration
virtual css::uno::Sequence< css::awt::KeyEvent > SAL_CALL getAllKeyEvents()
throw(css::uno::RuntimeException);
......
......@@ -31,6 +31,7 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
#include <cppuhelper/implbase2.hxx>
// definition
namespace framework
......@@ -41,10 +42,13 @@ namespace framework
implements a read/write access to a document
based accelerator configuration.
*/
class DocumentAcceleratorConfiguration : public XMLBasedAcceleratorConfiguration
, public css::lang::XServiceInfo
, public css::lang::XInitialization
// , public css::ui::XUIConfigurationStorage
typedef ::cppu::ImplInheritanceHelper2<
XMLBasedAcceleratorConfiguration,
css::lang::XServiceInfo,
css::lang::XInitialization > DocumentAcceleratorConfiguration_BASE;
class DocumentAcceleratorConfiguration : public DocumentAcceleratorConfiguration_BASE
{
//______________________________________
// member
......@@ -71,8 +75,6 @@ class DocumentAcceleratorConfiguration : public XMLBasedAcceleratorConfiguration
virtual ~DocumentAcceleratorConfiguration();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XInitialization
......
......@@ -39,9 +39,11 @@ namespace framework
implements a read/write access to the global
accelerator configuration.
*/
class GlobalAcceleratorConfiguration : public XCUBasedAcceleratorConfiguration
, public css::lang::XServiceInfo
, public css::lang::XInitialization
typedef ::cppu::ImplInheritanceHelper2<
XCUBasedAcceleratorConfiguration,
css::lang::XServiceInfo,
css::lang::XInitialization > GlobalAcceleratorConfiguration_BASE;
class GlobalAcceleratorConfiguration : GlobalAcceleratorConfiguration_BASE
{
//______________________________________
// interface
......@@ -61,8 +63,6 @@ class GlobalAcceleratorConfiguration : public XCUBasedAcceleratorConfiguration
virtual ~GlobalAcceleratorConfiguration();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XInitialization
......
......@@ -28,6 +28,7 @@
#include <macros/xserviceinfo.hxx>
#include <com/sun/star/lang/XInitialization.hpp>
#include <cppuhelper/implbase2.hxx>
// definition
......@@ -39,9 +40,12 @@ namespace framework
implements a read/write access to a module
dependend accelerator configuration.
*/
class ModuleAcceleratorConfiguration : public XCUBasedAcceleratorConfiguration
, public css::lang::XServiceInfo
, public css::lang::XInitialization
typedef ::cppu::ImplInheritanceHelper2<
XCUBasedAcceleratorConfiguration,
css::lang::XServiceInfo,
css::lang::XInitialization > ModuleAcceleratorConfiguration_BASE;
class ModuleAcceleratorConfiguration : ModuleAcceleratorConfiguration_BASE
{
//______________________________________
// member
......@@ -72,8 +76,6 @@ class ModuleAcceleratorConfiguration : public XCUBasedAcceleratorConfiguration
virtual ~ModuleAcceleratorConfiguration();
// XInterface, XTypeProvider, XServiceInfo
FWK_DECLARE_XINTERFACE
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
// XInitialization
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment