fdo#54938 Convert framework to cppu::supportsService
Change-Id: Id0c7c845d128920ba278de4208f5c32dcf83ecb1 Reviewed-on: https://gerrit.libreoffice.org/7754 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
This commit is contained in:
committed by
Marcos Souza
parent
22d80c90c8
commit
a91de8efc9
@@ -35,12 +35,12 @@
|
|||||||
#include <cppuhelper/factory.hxx>
|
#include <cppuhelper/factory.hxx>
|
||||||
#include <comphelper/processfactory.hxx>
|
#include <comphelper/processfactory.hxx>
|
||||||
#include <comphelper/sequence.hxx>
|
#include <comphelper/sequence.hxx>
|
||||||
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
#include <rtl/ustring.hxx>
|
#include <rtl/ustring.hxx>
|
||||||
|
|
||||||
namespace framework{
|
namespace framework{
|
||||||
|
|
||||||
/*_________________________________________________________________________________________________________________
|
/*
|
||||||
|
|
||||||
macros for declaration and definition of XServiceInfo
|
macros for declaration and definition of XServiceInfo
|
||||||
Please use follow public macros only!
|
Please use follow public macros only!
|
||||||
|
|
||||||
@@ -48,41 +48,25 @@ namespace framework{
|
|||||||
2) DEFINE_XSERVICEINFO_MULTISERVICE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) => use it to define XServiceInfo for multi service mode
|
2) DEFINE_XSERVICEINFO_MULTISERVICE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) => use it to define XServiceInfo for multi service mode
|
||||||
3) DEFINE_XSERVICEINFO_ONEINSTANCESERVICE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) => use it to define XServiceInfo for one instance service mode
|
3) DEFINE_XSERVICEINFO_ONEINSTANCESERVICE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) => use it to define XServiceInfo for one instance service mode
|
||||||
4) DEFINE_INIT_SERVICE( CLASS ) => use it to implement your own impl_initService() method, which is necessary for initializeing object by using his own reference!
|
4) DEFINE_INIT_SERVICE( CLASS ) => use it to implement your own impl_initService() method, which is necessary for initializeing object by using his own reference!
|
||||||
|
*/
|
||||||
|
|
||||||
_________________________________________________________________________________________________________________*/
|
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
// private
|
|
||||||
// implementation of XServiceInfo and helper functions
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
#define PRIVATE_DEFINE_XSERVICEINFO_BASE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
#define PRIVATE_DEFINE_XSERVICEINFO_BASE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
||||||
/*===========================================================================================================*/ \
|
\
|
||||||
/* XServiceInfo */ \
|
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
OUString SAL_CALL CLASS::getImplementationName() throw( css::uno::RuntimeException ) \
|
OUString SAL_CALL CLASS::getImplementationName() throw( css::uno::RuntimeException ) \
|
||||||
{ \
|
{ \
|
||||||
return impl_getStaticImplementationName(); \
|
return impl_getStaticImplementationName(); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
/* XServiceInfo */ \
|
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
sal_Bool SAL_CALL CLASS::supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException ) \
|
sal_Bool SAL_CALL CLASS::supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException ) \
|
||||||
{ \
|
{ \
|
||||||
return ::comphelper::findValue(getSupportedServiceNames(), sServiceName, sal_True).getLength() != 0; \
|
return cppu::supportsService(this, sServiceName); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
/* XServiceInfo */ \
|
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
css::uno::Sequence< OUString > SAL_CALL CLASS::getSupportedServiceNames() throw( css::uno::RuntimeException ) \
|
css::uno::Sequence< OUString > SAL_CALL CLASS::getSupportedServiceNames() throw( css::uno::RuntimeException ) \
|
||||||
{ \
|
{ \
|
||||||
return impl_getStaticSupportedServiceNames(); \
|
return impl_getStaticSupportedServiceNames(); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
/* Helper for XServiceInfo */ \
|
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
css::uno::Sequence< OUString > CLASS::impl_getStaticSupportedServiceNames() \
|
css::uno::Sequence< OUString > CLASS::impl_getStaticSupportedServiceNames() \
|
||||||
{ \
|
{ \
|
||||||
css::uno::Sequence< OUString > seqServiceNames( 1 ); \
|
css::uno::Sequence< OUString > seqServiceNames( 1 ); \
|
||||||
@@ -90,9 +74,6 @@ ________________________________________________________________________________
|
|||||||
return seqServiceNames; \
|
return seqServiceNames; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
/* Helper for XServiceInfo */ \
|
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
OUString CLASS::impl_getStaticImplementationName() \
|
OUString CLASS::impl_getStaticImplementationName() \
|
||||||
{ \
|
{ \
|
||||||
return IMPLEMENTATIONNAME ; \
|
return IMPLEMENTATIONNAME ; \
|
||||||
@@ -100,13 +81,10 @@ ________________________________________________________________________________
|
|||||||
|
|
||||||
#define PRIVATE_DEFINE_XSERVICEINFO_OLDSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
#define PRIVATE_DEFINE_XSERVICEINFO_OLDSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
||||||
PRIVATE_DEFINE_XSERVICEINFO_BASE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
PRIVATE_DEFINE_XSERVICEINFO_BASE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
/* Helper for registry */ \
|
|
||||||
/* Attention: To avoid against wrong ref counts during our own initialize procedure, we must */ \
|
/* Attention: To avoid against wrong ref counts during our own initialize procedure, we must */ \
|
||||||
/* use right EXTERNAL handling of them. That's why you should do nothing in your ctor, which could*/ \
|
/* use right EXTERNAL handling of them. That's why you should do nothing in your ctor, which could*/ \
|
||||||
/* work on your ref count! All other things are allowed. Do work with your own reference - please */ \
|
/* work on your ref count! All other things are allowed. Do work with your own reference - please */ \
|
||||||
/* use "impl_initService()" method. */ \
|
/* use "impl_initService()" method. */ \
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
css::uno::Reference< css::uno::XInterface > SAL_CALL CLASS::impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ) \
|
css::uno::Reference< css::uno::XInterface > SAL_CALL CLASS::impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ) \
|
||||||
{ \
|
{ \
|
||||||
/* create new instance of service */ \
|
/* create new instance of service */ \
|
||||||
@@ -121,13 +99,10 @@ ________________________________________________________________________________
|
|||||||
|
|
||||||
#define PRIVATE_DEFINE_XSERVICEINFO_NEWSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
#define PRIVATE_DEFINE_XSERVICEINFO_NEWSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
||||||
PRIVATE_DEFINE_XSERVICEINFO_BASE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
PRIVATE_DEFINE_XSERVICEINFO_BASE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
/* Helper for registry */ \
|
|
||||||
/* Attention: To avoid against wrong ref counts during our own initialize procedure, we must */ \
|
/* Attention: To avoid against wrong ref counts during our own initialize procedure, we must */ \
|
||||||
/* use right EXTERNAL handling of them. That's why you should do nothing in your ctor, which could*/ \
|
/* use right EXTERNAL handling of them. That's why you should do nothing in your ctor, which could*/ \
|
||||||
/* work on your ref count! All other things are allowed. Do work with your own reference - please */ \
|
/* work on your ref count! All other things are allowed. Do work with your own reference - please */ \
|
||||||
/* use "impl_initService()" method. */ \
|
/* use "impl_initService()" method. */ \
|
||||||
/*===========================================================================================================*/ \
|
|
||||||
css::uno::Reference< css::uno::XInterface > SAL_CALL CLASS::impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager )\
|
css::uno::Reference< css::uno::XInterface > SAL_CALL CLASS::impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager )\
|
||||||
throw( css::uno::Exception ) \
|
throw( css::uno::Exception ) \
|
||||||
{ \
|
{ \
|
||||||
@@ -144,10 +119,6 @@ ________________________________________________________________________________
|
|||||||
return xService; \
|
return xService; \
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
// private
|
|
||||||
// definition of helper function createFactory() for multiple services
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
#define PRIVATE_DEFINE_SINGLEFACTORY( CLASS ) \
|
#define PRIVATE_DEFINE_SINGLEFACTORY( CLASS ) \
|
||||||
css::uno::Reference< css::lang::XSingleServiceFactory > CLASS::impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) \
|
css::uno::Reference< css::lang::XSingleServiceFactory > CLASS::impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) \
|
||||||
{ \
|
{ \
|
||||||
@@ -160,10 +131,6 @@ ________________________________________________________________________________
|
|||||||
return xReturn; \
|
return xReturn; \
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
// private
|
|
||||||
// definition of helper function createFactory() for one instance services
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
#define PRIVATE_DEFINE_ONEINSTANCEFACTORY( CLASS ) \
|
#define PRIVATE_DEFINE_ONEINSTANCEFACTORY( CLASS ) \
|
||||||
css::uno::Reference< css::lang::XSingleServiceFactory > CLASS::impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) \
|
css::uno::Reference< css::lang::XSingleServiceFactory > CLASS::impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) \
|
||||||
{ \
|
{ \
|
||||||
@@ -176,11 +143,6 @@ ________________________________________________________________________________
|
|||||||
return xReturn; \
|
return xReturn; \
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
// public
|
|
||||||
// declaration of XServiceInfo and helper functions
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
|
|
||||||
#define DECLARE_XSERVICEINFO_NOFACTORY \
|
#define DECLARE_XSERVICEINFO_NOFACTORY \
|
||||||
/* interface XServiceInfo */ \
|
/* interface XServiceInfo */ \
|
||||||
virtual OUString SAL_CALL getImplementationName ( ) throw( css::uno::RuntimeException ); \
|
virtual OUString SAL_CALL getImplementationName ( ) throw( css::uno::RuntimeException ); \
|
||||||
@@ -198,10 +160,6 @@ ________________________________________________________________________________
|
|||||||
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ); \
|
static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ); \
|
||||||
static css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); \
|
static css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); \
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
// public
|
|
||||||
// implementation of XServiceInfo
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
#define DEFINE_XSERVICEINFO_MULTISERVICE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
#define DEFINE_XSERVICEINFO_MULTISERVICE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
||||||
PRIVATE_DEFINE_XSERVICEINFO_OLDSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
PRIVATE_DEFINE_XSERVICEINFO_OLDSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
||||||
PRIVATE_DEFINE_SINGLEFACTORY( CLASS )
|
PRIVATE_DEFINE_SINGLEFACTORY( CLASS )
|
||||||
@@ -218,7 +176,6 @@ ________________________________________________________________________________
|
|||||||
PRIVATE_DEFINE_XSERVICEINFO_NEWSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
PRIVATE_DEFINE_XSERVICEINFO_NEWSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME ) \
|
||||||
PRIVATE_DEFINE_ONEINSTANCEFACTORY( CLASS )
|
PRIVATE_DEFINE_ONEINSTANCEFACTORY( CLASS )
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
// public
|
// public
|
||||||
// implementation of service initialize!
|
// implementation of service initialize!
|
||||||
// example of using: DEFINE_INIT_SERVICE( MyClassName,
|
// example of using: DEFINE_INIT_SERVICE( MyClassName,
|
||||||
@@ -229,7 +186,6 @@ ________________________________________________________________________________
|
|||||||
// ...
|
// ...
|
||||||
// }
|
// }
|
||||||
// )
|
// )
|
||||||
//*****************************************************************************************************************
|
|
||||||
#define DEFINE_INIT_SERVICE( CLASS, FUNCTIONBODY ) \
|
#define DEFINE_INIT_SERVICE( CLASS, FUNCTIONBODY ) \
|
||||||
void SAL_CALL CLASS::impl_initService() \
|
void SAL_CALL CLASS::impl_initService() \
|
||||||
{ \
|
{ \
|
||||||
|
@@ -40,9 +40,10 @@
|
|||||||
#include <com/sun/star/uri/UriReferenceFactory.hpp>
|
#include <com/sun/star/uri/UriReferenceFactory.hpp>
|
||||||
#include <com/sun/star/ui/XUIElement.hpp>
|
#include <com/sun/star/ui/XUIElement.hpp>
|
||||||
|
|
||||||
#include <ucbhelper/content.hxx>
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
#include <osl/mutex.hxx>
|
#include <osl/mutex.hxx>
|
||||||
#include <rtl/ustrbuf.hxx>
|
#include <rtl/ustrbuf.hxx>
|
||||||
|
#include <ucbhelper/content.hxx>
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
|
|
||||||
namespace framework{
|
namespace framework{
|
||||||
@@ -59,9 +60,6 @@ using namespace ::cppu ;
|
|||||||
using namespace ::osl ;
|
using namespace ::osl ;
|
||||||
using namespace ::rtl ;
|
using namespace ::rtl ;
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
// constructor
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
PopupMenuDispatcher::PopupMenuDispatcher(
|
PopupMenuDispatcher::PopupMenuDispatcher(
|
||||||
const uno::Reference< XComponentContext >& xContext )
|
const uno::Reference< XComponentContext >& xContext )
|
||||||
// Init baseclasses first
|
// Init baseclasses first
|
||||||
@@ -74,9 +72,6 @@ PopupMenuDispatcher::PopupMenuDispatcher(
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
// destructor
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
PopupMenuDispatcher::~PopupMenuDispatcher()
|
PopupMenuDispatcher::~PopupMenuDispatcher()
|
||||||
{
|
{
|
||||||
// Warn programmer if he forgot to dispose this instance.
|
// Warn programmer if he forgot to dispose this instance.
|
||||||
@@ -92,7 +87,7 @@ OUString SAL_CALL PopupMenuDispatcher::getImplementationName() throw( css::uno::
|
|||||||
sal_Bool SAL_CALL PopupMenuDispatcher::supportsService( const OUString& sServiceName )
|
sal_Bool SAL_CALL PopupMenuDispatcher::supportsService( const OUString& sServiceName )
|
||||||
throw( css::uno::RuntimeException )
|
throw( css::uno::RuntimeException )
|
||||||
{
|
{
|
||||||
return ::comphelper::findValue(getSupportedServiceNames(), sServiceName, sal_True).getLength() != 0;
|
return cppu::supportsService(this, sServiceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
css::uno::Sequence< OUString > SAL_CALL PopupMenuDispatcher::getSupportedServiceNames()
|
css::uno::Sequence< OUString > SAL_CALL PopupMenuDispatcher::getSupportedServiceNames()
|
||||||
@@ -149,11 +144,7 @@ DEFINE_INIT_SERVICE(PopupMenuDispatcher,
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
void SAL_CALL PopupMenuDispatcher::initialize( const css::uno::Sequence< css::uno::Any >& lArguments )
|
||||||
// XInitialization
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
void SAL_CALL PopupMenuDispatcher::initialize(
|
|
||||||
const css::uno::Sequence< css::uno::Any >& lArguments )
|
|
||||||
throw( css::uno::Exception, css::uno::RuntimeException)
|
throw( css::uno::Exception, css::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
css::uno::Reference< css::frame::XFrame > xFrame;
|
css::uno::Reference< css::frame::XFrame > xFrame;
|
||||||
@@ -179,9 +170,6 @@ throw( css::uno::Exception, css::uno::RuntimeException)
|
|||||||
/* } SAFE */
|
/* } SAFE */
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
// XDispatchProvider
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
css::uno::Reference< css::frame::XDispatch >
|
css::uno::Reference< css::frame::XDispatch >
|
||||||
SAL_CALL PopupMenuDispatcher::queryDispatch(
|
SAL_CALL PopupMenuDispatcher::queryDispatch(
|
||||||
const css::util::URL& rURL ,
|
const css::util::URL& rURL ,
|
||||||
@@ -263,23 +251,12 @@ throw( css::uno::RuntimeException )
|
|||||||
return lDispatcher;
|
return lDispatcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
void SAL_CALL PopupMenuDispatcher::dispatch( const URL& /*aURL*/, const Sequence< PropertyValue >& /*seqProperties*/ )
|
||||||
// XDispatch
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
void
|
|
||||||
SAL_CALL PopupMenuDispatcher::dispatch(
|
|
||||||
const URL& /*aURL*/ ,
|
|
||||||
const Sequence< PropertyValue >& /*seqProperties*/ )
|
|
||||||
throw( RuntimeException )
|
throw( RuntimeException )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
void SAL_CALL PopupMenuDispatcher::addStatusListener( const uno::Reference< XStatusListener >& xControl,
|
||||||
// XDispatch
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
void
|
|
||||||
SAL_CALL PopupMenuDispatcher::addStatusListener(
|
|
||||||
const uno::Reference< XStatusListener >& xControl,
|
|
||||||
const URL& aURL )
|
const URL& aURL )
|
||||||
throw( RuntimeException )
|
throw( RuntimeException )
|
||||||
{
|
{
|
||||||
@@ -290,12 +267,7 @@ throw( RuntimeException )
|
|||||||
m_aListenerContainer.addInterface( aURL.Complete, xControl );
|
m_aListenerContainer.addInterface( aURL.Complete, xControl );
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
void SAL_CALL PopupMenuDispatcher::removeStatusListener( const uno::Reference< XStatusListener >& xControl,
|
||||||
// XDispatch
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
void
|
|
||||||
SAL_CALL PopupMenuDispatcher::removeStatusListener(
|
|
||||||
const uno::Reference< XStatusListener >& xControl,
|
|
||||||
const URL& aURL )
|
const URL& aURL )
|
||||||
throw( RuntimeException )
|
throw( RuntimeException )
|
||||||
{
|
{
|
||||||
@@ -306,13 +278,7 @@ throw( RuntimeException )
|
|||||||
m_aListenerContainer.removeInterface( aURL.Complete, xControl );
|
m_aListenerContainer.removeInterface( aURL.Complete, xControl );
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
void SAL_CALL PopupMenuDispatcher::frameAction( const FrameActionEvent& aEvent )
|
||||||
// XFrameActionListener
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
|
|
||||||
void
|
|
||||||
SAL_CALL PopupMenuDispatcher::frameAction(
|
|
||||||
const FrameActionEvent& aEvent )
|
|
||||||
throw ( RuntimeException )
|
throw ( RuntimeException )
|
||||||
{
|
{
|
||||||
ResetableGuard aGuard( m_aLock );
|
ResetableGuard aGuard( m_aLock );
|
||||||
@@ -325,11 +291,7 @@ throw ( RuntimeException )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************************************************************
|
void SAL_CALL PopupMenuDispatcher::disposing( const EventObject& ) throw( RuntimeException )
|
||||||
// XEventListener
|
|
||||||
//*****************************************************************************************************************
|
|
||||||
void
|
|
||||||
SAL_CALL PopupMenuDispatcher::disposing( const EventObject& ) throw( RuntimeException )
|
|
||||||
{
|
{
|
||||||
// Ready for multithreading
|
// Ready for multithreading
|
||||||
ResetableGuard aGuard( m_aLock );
|
ResetableGuard aGuard( m_aLock );
|
||||||
|
@@ -18,10 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <classes/actiontriggercontainer.hxx>
|
#include <classes/actiontriggercontainer.hxx>
|
||||||
#include <cppuhelper/typeprovider.hxx>
|
|
||||||
|
|
||||||
#include <classes/actiontriggerpropertyset.hxx>
|
#include <classes/actiontriggerpropertyset.hxx>
|
||||||
#include <classes/actiontriggerseparatorpropertyset.hxx>
|
#include <classes/actiontriggerseparatorpropertyset.hxx>
|
||||||
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
|
#include <cppuhelper/typeprovider.hxx>
|
||||||
|
|
||||||
using namespace cppu;
|
using namespace cppu;
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
@@ -69,7 +69,6 @@ void ActionTriggerContainer::release() throw()
|
|||||||
PropertySetContainer::release();
|
PropertySetContainer::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XMultiServiceFactory
|
// XMultiServiceFactory
|
||||||
Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstance( const OUString& aServiceSpecifier )
|
Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstance( const OUString& aServiceSpecifier )
|
||||||
throw ( ::com::sun::star::uno::Exception, RuntimeException)
|
throw ( ::com::sun::star::uno::Exception, RuntimeException)
|
||||||
@@ -84,14 +83,12 @@ throw ( ::com::sun::star::uno::Exception, RuntimeException)
|
|||||||
throw com::sun::star::uno::RuntimeException("Unknown service specifier!", (OWeakObject *)this );
|
throw com::sun::star::uno::RuntimeException("Unknown service specifier!", (OWeakObject *)this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ )
|
Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ )
|
||||||
throw ( Exception, RuntimeException)
|
throw ( Exception, RuntimeException)
|
||||||
{
|
{
|
||||||
return createInstance( ServiceSpecifier );
|
return createInstance( ServiceSpecifier );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Sequence< OUString > SAL_CALL ActionTriggerContainer::getAvailableServiceNames()
|
Sequence< OUString > SAL_CALL ActionTriggerContainer::getAvailableServiceNames()
|
||||||
throw ( RuntimeException )
|
throw ( RuntimeException )
|
||||||
{
|
{
|
||||||
@@ -114,10 +111,7 @@ throw ( RuntimeException )
|
|||||||
sal_Bool SAL_CALL ActionTriggerContainer::supportsService( const OUString& ServiceName )
|
sal_Bool SAL_CALL ActionTriggerContainer::supportsService( const OUString& ServiceName )
|
||||||
throw ( RuntimeException )
|
throw ( RuntimeException )
|
||||||
{
|
{
|
||||||
if ( ServiceName.equalsAscii( SERVICENAME_ACTIONTRIGGERCONTAINER ))
|
return cppu::supportsService(this, ServiceName);
|
||||||
return sal_True;
|
|
||||||
|
|
||||||
return sal_False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence< OUString > SAL_CALL ActionTriggerContainer::getSupportedServiceNames()
|
Sequence< OUString > SAL_CALL ActionTriggerContainer::getSupportedServiceNames()
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <classes/actiontriggerpropertyset.hxx>
|
#include <classes/actiontriggerpropertyset.hxx>
|
||||||
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
||||||
#include <cppuhelper/proptypehlp.hxx>
|
#include <cppuhelper/proptypehlp.hxx>
|
||||||
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
#include <cppuhelper/typeprovider.hxx>
|
#include <cppuhelper/typeprovider.hxx>
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
|
|
||||||
@@ -97,7 +98,6 @@ void SAL_CALL ActionTriggerPropertySet::release() throw ()
|
|||||||
OWeakObject::release();
|
OWeakObject::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XServiceInfo
|
// XServiceInfo
|
||||||
OUString SAL_CALL ActionTriggerPropertySet::getImplementationName()
|
OUString SAL_CALL ActionTriggerPropertySet::getImplementationName()
|
||||||
throw ( RuntimeException )
|
throw ( RuntimeException )
|
||||||
@@ -108,10 +108,7 @@ throw ( RuntimeException )
|
|||||||
sal_Bool SAL_CALL ActionTriggerPropertySet::supportsService( const OUString& ServiceName )
|
sal_Bool SAL_CALL ActionTriggerPropertySet::supportsService( const OUString& ServiceName )
|
||||||
throw ( RuntimeException )
|
throw ( RuntimeException )
|
||||||
{
|
{
|
||||||
if ( ServiceName.equalsAscii( SERVICENAME_ACTIONTRIGGER ))
|
return cppu::supportsService(this, ServiceName);
|
||||||
return sal_True;
|
|
||||||
|
|
||||||
return sal_False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence< OUString > SAL_CALL ActionTriggerPropertySet::getSupportedServiceNames()
|
Sequence< OUString > SAL_CALL ActionTriggerPropertySet::getSupportedServiceNames()
|
||||||
@@ -182,10 +179,6 @@ Sequence< sal_Int8 > SAL_CALL ActionTriggerPropertySet::getImplementationId() th
|
|||||||
return pID->getImplementationId() ;
|
return pID->getImplementationId() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------
|
|
||||||
// OPropertySetHelper implementation
|
|
||||||
//---------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
sal_Bool SAL_CALL ActionTriggerPropertySet::convertFastPropertyValue(
|
sal_Bool SAL_CALL ActionTriggerPropertySet::convertFastPropertyValue(
|
||||||
Any& aConvertedValue,
|
Any& aConvertedValue,
|
||||||
Any& aOldValue,
|
Any& aOldValue,
|
||||||
@@ -227,7 +220,6 @@ throw( IllegalArgumentException )
|
|||||||
return bReturn;
|
return bReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SAL_CALL ActionTriggerPropertySet::setFastPropertyValue_NoBroadcast(
|
void SAL_CALL ActionTriggerPropertySet::setFastPropertyValue_NoBroadcast(
|
||||||
sal_Int32 nHandle, const Any& aValue )
|
sal_Int32 nHandle, const Any& aValue )
|
||||||
throw( Exception )
|
throw( Exception )
|
||||||
@@ -357,10 +349,6 @@ const Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescr
|
|||||||
return seqActionTriggerPropertyDescriptor ;
|
return seqActionTriggerPropertyDescriptor ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//******************************************************************************************************************************
|
|
||||||
// private method
|
|
||||||
//******************************************************************************************************************************
|
|
||||||
sal_Bool ActionTriggerPropertySet::impl_tryToChangeProperty(
|
sal_Bool ActionTriggerPropertySet::impl_tryToChangeProperty(
|
||||||
const OUString& sCurrentValue ,
|
const OUString& sCurrentValue ,
|
||||||
const Any& aNewValue ,
|
const Any& aNewValue ,
|
||||||
@@ -396,7 +384,6 @@ throw( IllegalArgumentException )
|
|||||||
return bReturn;
|
return bReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sal_Bool ActionTriggerPropertySet::impl_tryToChangeProperty(
|
sal_Bool ActionTriggerPropertySet::impl_tryToChangeProperty(
|
||||||
const Reference< XBitmap > aCurrentValue ,
|
const Reference< XBitmap > aCurrentValue ,
|
||||||
const Any& aNewValue ,
|
const Any& aNewValue ,
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <classes/actiontriggerseparatorpropertyset.hxx>
|
#include <classes/actiontriggerseparatorpropertyset.hxx>
|
||||||
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
||||||
#include <cppuhelper/proptypehlp.hxx>
|
#include <cppuhelper/proptypehlp.hxx>
|
||||||
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
#include <cppuhelper/typeprovider.hxx>
|
#include <cppuhelper/typeprovider.hxx>
|
||||||
#include <vcl/svapp.hxx>
|
#include <vcl/svapp.hxx>
|
||||||
|
|
||||||
@@ -100,10 +101,7 @@ throw ( RuntimeException )
|
|||||||
sal_Bool SAL_CALL ActionTriggerSeparatorPropertySet::supportsService( const OUString& ServiceName )
|
sal_Bool SAL_CALL ActionTriggerSeparatorPropertySet::supportsService( const OUString& ServiceName )
|
||||||
throw ( RuntimeException )
|
throw ( RuntimeException )
|
||||||
{
|
{
|
||||||
if ( ServiceName.equalsAscii( SERVICENAME_ACTIONTRIGGERSEPARATOR ))
|
return cppu::supportsService(this, ServiceName);
|
||||||
return sal_True;
|
|
||||||
|
|
||||||
return sal_False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence< OUString > SAL_CALL ActionTriggerSeparatorPropertySet::getSupportedServiceNames()
|
Sequence< OUString > SAL_CALL ActionTriggerSeparatorPropertySet::getSupportedServiceNames()
|
||||||
@@ -174,10 +172,6 @@ Sequence< sal_Int8 > SAL_CALL ActionTriggerSeparatorPropertySet::getImplementati
|
|||||||
return pID->getImplementationId() ;
|
return pID->getImplementationId() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------
|
|
||||||
// OPropertySetHelper implementation
|
|
||||||
//---------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
sal_Bool SAL_CALL ActionTriggerSeparatorPropertySet::convertFastPropertyValue(
|
sal_Bool SAL_CALL ActionTriggerSeparatorPropertySet::convertFastPropertyValue(
|
||||||
Any& aConvertedValue,
|
Any& aConvertedValue,
|
||||||
Any& aOldValue,
|
Any& aOldValue,
|
||||||
@@ -203,7 +197,6 @@ throw( IllegalArgumentException )
|
|||||||
return bReturn;
|
return bReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SAL_CALL ActionTriggerSeparatorPropertySet::setFastPropertyValue_NoBroadcast(
|
void SAL_CALL ActionTriggerSeparatorPropertySet::setFastPropertyValue_NoBroadcast(
|
||||||
sal_Int32 nHandle, const Any& aValue )
|
sal_Int32 nHandle, const Any& aValue )
|
||||||
throw( Exception )
|
throw( Exception )
|
||||||
@@ -297,10 +290,6 @@ const Sequence< Property > ActionTriggerSeparatorPropertySet::impl_getStaticProp
|
|||||||
return seqActionTriggerPropertyDescriptor ;
|
return seqActionTriggerPropertyDescriptor ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//******************************************************************************************************************************
|
|
||||||
// private method
|
|
||||||
//******************************************************************************************************************************
|
|
||||||
sal_Bool ActionTriggerSeparatorPropertySet::impl_tryToChangeProperty(
|
sal_Bool ActionTriggerSeparatorPropertySet::impl_tryToChangeProperty(
|
||||||
sal_Int16 aCurrentValue ,
|
sal_Int16 aCurrentValue ,
|
||||||
const Any& aNewValue ,
|
const Any& aNewValue ,
|
||||||
|
@@ -22,12 +22,12 @@
|
|||||||
#include <classes/actiontriggercontainer.hxx>
|
#include <classes/actiontriggercontainer.hxx>
|
||||||
#include <classes/actiontriggerpropertyset.hxx>
|
#include <classes/actiontriggerpropertyset.hxx>
|
||||||
#include <classes/actiontriggerseparatorpropertyset.hxx>
|
#include <classes/actiontriggerseparatorpropertyset.hxx>
|
||||||
#include <framework/actiontriggerhelper.hxx>
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
#include <threadhelp/resetableguard.hxx>
|
|
||||||
#include <osl/mutex.hxx>
|
|
||||||
#include <vcl/svapp.hxx>
|
|
||||||
#include <cppuhelper/typeprovider.hxx>
|
#include <cppuhelper/typeprovider.hxx>
|
||||||
|
#include <framework/actiontriggerhelper.hxx>
|
||||||
|
#include <osl/mutex.hxx>
|
||||||
|
#include <threadhelp/resetableguard.hxx>
|
||||||
|
#include <vcl/svapp.hxx>
|
||||||
|
|
||||||
using namespace cppu;
|
using namespace cppu;
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
@@ -46,7 +46,6 @@ static Sequence< sal_Int8 > impl_getStaticIdentifier()
|
|||||||
return seqID ;
|
return seqID ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RootActionTriggerContainer::RootActionTriggerContainer( const Menu* pMenu, const OUString* pMenuIdentifier ) :
|
RootActionTriggerContainer::RootActionTriggerContainer( const Menu* pMenu, const OUString* pMenuIdentifier ) :
|
||||||
PropertySetContainer()
|
PropertySetContainer()
|
||||||
, m_bContainerCreated( sal_False )
|
, m_bContainerCreated( sal_False )
|
||||||
@@ -123,7 +122,6 @@ throw ( RuntimeException )
|
|||||||
return aSeq;
|
return aSeq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XIndexContainer
|
// XIndexContainer
|
||||||
void SAL_CALL RootActionTriggerContainer::insertByIndex( sal_Int32 Index, const Any& Element )
|
void SAL_CALL RootActionTriggerContainer::insertByIndex( sal_Int32 Index, const Any& Element )
|
||||||
throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
|
throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
|
||||||
@@ -151,7 +149,6 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
|
|||||||
PropertySetContainer::removeByIndex( Index );
|
PropertySetContainer::removeByIndex( Index );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XIndexReplace
|
// XIndexReplace
|
||||||
void SAL_CALL RootActionTriggerContainer::replaceByIndex( sal_Int32 Index, const Any& Element )
|
void SAL_CALL RootActionTriggerContainer::replaceByIndex( sal_Int32 Index, const Any& Element )
|
||||||
throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
|
throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
|
||||||
@@ -166,7 +163,6 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept
|
|||||||
PropertySetContainer::replaceByIndex( Index, Element );
|
PropertySetContainer::replaceByIndex( Index, Element );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XIndexAccess
|
// XIndexAccess
|
||||||
sal_Int32 SAL_CALL RootActionTriggerContainer::getCount()
|
sal_Int32 SAL_CALL RootActionTriggerContainer::getCount()
|
||||||
throw ( RuntimeException )
|
throw ( RuntimeException )
|
||||||
@@ -200,7 +196,6 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
|
|||||||
return PropertySetContainer::getByIndex( Index );
|
return PropertySetContainer::getByIndex( Index );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XElementAccess
|
// XElementAccess
|
||||||
Type SAL_CALL RootActionTriggerContainer::getElementType()
|
Type SAL_CALL RootActionTriggerContainer::getElementType()
|
||||||
throw (::com::sun::star::uno::RuntimeException)
|
throw (::com::sun::star::uno::RuntimeException)
|
||||||
@@ -220,7 +215,6 @@ throw (::com::sun::star::uno::RuntimeException)
|
|||||||
return sal_False;
|
return sal_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// XServiceInfo
|
// XServiceInfo
|
||||||
OUString SAL_CALL RootActionTriggerContainer::getImplementationName()
|
OUString SAL_CALL RootActionTriggerContainer::getImplementationName()
|
||||||
throw ( RuntimeException )
|
throw ( RuntimeException )
|
||||||
@@ -231,10 +225,7 @@ throw ( RuntimeException )
|
|||||||
sal_Bool SAL_CALL RootActionTriggerContainer::supportsService( const OUString& ServiceName )
|
sal_Bool SAL_CALL RootActionTriggerContainer::supportsService( const OUString& ServiceName )
|
||||||
throw ( RuntimeException )
|
throw ( RuntimeException )
|
||||||
{
|
{
|
||||||
if ( ServiceName.equalsAscii( SERVICENAME_ACTIONTRIGGERCONTAINER ))
|
return cppu::supportsService(this, ServiceName);
|
||||||
return sal_True;
|
|
||||||
|
|
||||||
return sal_False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence< OUString > SAL_CALL RootActionTriggerContainer::getSupportedServiceNames()
|
Sequence< OUString > SAL_CALL RootActionTriggerContainer::getSupportedServiceNames()
|
||||||
|
@@ -16,8 +16,10 @@
|
|||||||
* except in compliance with the License. You may obtain a copy of
|
* except in compliance with the License. You may obtain a copy of
|
||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "services/ContextChangeEventMultiplexer.hxx"
|
#include "services/ContextChangeEventMultiplexer.hxx"
|
||||||
#include "services.h"
|
#include "services.h"
|
||||||
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
|
|
||||||
using ::rtl::OUString;
|
using ::rtl::OUString;
|
||||||
|
|
||||||
@@ -36,16 +38,10 @@ ContextChangeEventMultiplexer::ContextChangeEventMultiplexer (
|
|||||||
(void)rxContext;
|
(void)rxContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ContextChangeEventMultiplexer::~ContextChangeEventMultiplexer (void)
|
ContextChangeEventMultiplexer::~ContextChangeEventMultiplexer (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SAL_CALL ContextChangeEventMultiplexer::disposing (void)
|
void SAL_CALL ContextChangeEventMultiplexer::disposing (void)
|
||||||
{
|
{
|
||||||
ListenerMap aListeners;
|
ListenerMap aListeners;
|
||||||
@@ -75,11 +71,7 @@ void SAL_CALL ContextChangeEventMultiplexer::disposing (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// XContextChangeEventMultiplexer
|
// XContextChangeEventMultiplexer
|
||||||
|
|
||||||
void SAL_CALL ContextChangeEventMultiplexer::addContextChangeEventListener (
|
void SAL_CALL ContextChangeEventMultiplexer::addContextChangeEventListener (
|
||||||
const cssu::Reference<css::ui::XContextChangeEventListener>& rxListener,
|
const cssu::Reference<css::ui::XContextChangeEventListener>& rxListener,
|
||||||
const cssu::Reference<cssu::XInterface>& rxEventFocus)
|
const cssu::Reference<cssu::XInterface>& rxEventFocus)
|
||||||
@@ -117,9 +109,6 @@ void SAL_CALL ContextChangeEventMultiplexer::addContextChangeEventListener (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SAL_CALL ContextChangeEventMultiplexer::removeContextChangeEventListener (
|
void SAL_CALL ContextChangeEventMultiplexer::removeContextChangeEventListener (
|
||||||
const cssu::Reference<css::ui::XContextChangeEventListener>& rxListener,
|
const cssu::Reference<css::ui::XContextChangeEventListener>& rxListener,
|
||||||
const cssu::Reference<cssu::XInterface>& rxEventFocus)
|
const cssu::Reference<cssu::XInterface>& rxEventFocus)
|
||||||
@@ -147,9 +136,6 @@ void SAL_CALL ContextChangeEventMultiplexer::removeContextChangeEventListener (
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SAL_CALL ContextChangeEventMultiplexer::removeAllContextChangeEventListeners (
|
void SAL_CALL ContextChangeEventMultiplexer::removeAllContextChangeEventListeners (
|
||||||
const cssu::Reference<css::ui::XContextChangeEventListener>& rxListener)
|
const cssu::Reference<css::ui::XContextChangeEventListener>& rxListener)
|
||||||
throw(cssu::RuntimeException,cssl::IllegalArgumentException)
|
throw(cssu::RuntimeException,cssl::IllegalArgumentException)
|
||||||
@@ -177,9 +163,6 @@ void SAL_CALL ContextChangeEventMultiplexer::removeAllContextChangeEventListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SAL_CALL ContextChangeEventMultiplexer::broadcastContextChangeEvent (
|
void SAL_CALL ContextChangeEventMultiplexer::broadcastContextChangeEvent (
|
||||||
const css::ui::ContextChangeEventObject& rEventObject,
|
const css::ui::ContextChangeEventObject& rEventObject,
|
||||||
const cssu::Reference<cssu::XInterface>& rxEventFocus)
|
const cssu::Reference<cssu::XInterface>& rxEventFocus)
|
||||||
@@ -201,9 +184,6 @@ void SAL_CALL ContextChangeEventMultiplexer::broadcastContextChangeEvent (
|
|||||||
BroadcastEventToSingleContainer(rEventObject, NULL);
|
BroadcastEventToSingleContainer(rEventObject, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ContextChangeEventMultiplexer::BroadcastEventToSingleContainer (
|
void ContextChangeEventMultiplexer::BroadcastEventToSingleContainer (
|
||||||
const css::ui::ContextChangeEventObject& rEventObject,
|
const css::ui::ContextChangeEventObject& rEventObject,
|
||||||
const cssu::Reference<cssu::XInterface>& rxEventFocus)
|
const cssu::Reference<cssu::XInterface>& rxEventFocus)
|
||||||
@@ -225,9 +205,6 @@ void ContextChangeEventMultiplexer::BroadcastEventToSingleContainer (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ContextChangeEventMultiplexer::FocusDescriptor* ContextChangeEventMultiplexer::GetFocusDescriptor (
|
ContextChangeEventMultiplexer::FocusDescriptor* ContextChangeEventMultiplexer::GetFocusDescriptor (
|
||||||
const cssu::Reference<cssu::XInterface>& rxEventFocus,
|
const cssu::Reference<cssu::XInterface>& rxEventFocus,
|
||||||
const bool bCreateWhenMissing)
|
const bool bCreateWhenMissing)
|
||||||
@@ -252,11 +229,7 @@ ContextChangeEventMultiplexer::FocusDescriptor* ContextChangeEventMultiplexer::G
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// XSingleComponentFactory
|
// XSingleComponentFactory
|
||||||
|
|
||||||
cssu::Reference<cssu::XInterface> SAL_CALL ContextChangeEventMultiplexer::createInstanceWithContext (
|
cssu::Reference<cssu::XInterface> SAL_CALL ContextChangeEventMultiplexer::createInstanceWithContext (
|
||||||
const cssu::Reference<cssu::XComponentContext>& rxContext)
|
const cssu::Reference<cssu::XComponentContext>& rxContext)
|
||||||
throw (cssu::Exception, cssu::RuntimeException)
|
throw (cssu::Exception, cssu::RuntimeException)
|
||||||
@@ -265,9 +238,6 @@ cssu::Reference<cssu::XInterface> SAL_CALL ContextChangeEventMultiplexer::create
|
|||||||
return cssu::Reference<cssu::XInterface>();
|
return cssu::Reference<cssu::XInterface>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cssu::Reference<cssu::XInterface > SAL_CALL ContextChangeEventMultiplexer::createInstanceWithArgumentsAndContext (
|
cssu::Reference<cssu::XInterface > SAL_CALL ContextChangeEventMultiplexer::createInstanceWithArgumentsAndContext (
|
||||||
const cssu::Sequence<cssu::Any>& rArguments,
|
const cssu::Sequence<cssu::Any>& rArguments,
|
||||||
const cssu::Reference<cssu::XComponentContext>& rxContext)
|
const cssu::Reference<cssu::XComponentContext>& rxContext)
|
||||||
@@ -278,42 +248,26 @@ cssu::Reference<cssu::XInterface > SAL_CALL ContextChangeEventMultiplexer::creat
|
|||||||
return cssu::Reference<cssu::XInterface>();
|
return cssu::Reference<cssu::XInterface>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// XServiceInfo
|
// XServiceInfo
|
||||||
|
|
||||||
::rtl::OUString SAL_CALL ContextChangeEventMultiplexer::getImplementationName (void)
|
::rtl::OUString SAL_CALL ContextChangeEventMultiplexer::getImplementationName (void)
|
||||||
throw(cssu::RuntimeException)
|
throw(cssu::RuntimeException)
|
||||||
{
|
{
|
||||||
return impl_getStaticImplementationName();
|
return impl_getStaticImplementationName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sal_Bool SAL_CALL ContextChangeEventMultiplexer::supportsService ( const ::rtl::OUString& rsServiceName)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
sal_Bool SAL_CALL ContextChangeEventMultiplexer::supportsService (
|
|
||||||
const ::rtl::OUString& rsServiceName)
|
|
||||||
throw (cssu::RuntimeException)
|
throw (cssu::RuntimeException)
|
||||||
{
|
{
|
||||||
return ::comphelper::findValue(static_GetSupportedServiceNames(), rsServiceName, sal_True).getLength() != 0;
|
return cppu::supportsService(this, rsServiceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cssu::Sequence<OUString> SAL_CALL ContextChangeEventMultiplexer::getSupportedServiceNames (void)
|
cssu::Sequence<OUString> SAL_CALL ContextChangeEventMultiplexer::getSupportedServiceNames (void)
|
||||||
throw (cssu::RuntimeException)
|
throw (cssu::RuntimeException)
|
||||||
{
|
{
|
||||||
return static_GetSupportedServiceNames();
|
return static_GetSupportedServiceNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SAL_CALL ContextChangeEventMultiplexer::disposing ( const css::lang::EventObject& rEvent)
|
||||||
|
|
||||||
|
|
||||||
void SAL_CALL ContextChangeEventMultiplexer::disposing (
|
|
||||||
const css::lang::EventObject& rEvent)
|
|
||||||
throw (cssu::RuntimeException)
|
throw (cssu::RuntimeException)
|
||||||
{
|
{
|
||||||
ListenerMap::iterator iDescriptor (maListeners.find(rEvent.Source));
|
ListenerMap::iterator iDescriptor (maListeners.find(rEvent.Source));
|
||||||
@@ -329,19 +283,12 @@ void SAL_CALL ContextChangeEventMultiplexer::disposing (
|
|||||||
maListeners.erase(iDescriptor);
|
maListeners.erase(iDescriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Local and static methods.
|
// Local and static methods.
|
||||||
|
|
||||||
OUString SAL_CALL ContextChangeEventMultiplexer::impl_getStaticImplementationName (void)
|
OUString SAL_CALL ContextChangeEventMultiplexer::impl_getStaticImplementationName (void)
|
||||||
{
|
{
|
||||||
return OUString(IMPLEMENTATION_NAME);
|
return OUString(IMPLEMENTATION_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cssu::Sequence<OUString> SAL_CALL ContextChangeEventMultiplexer::static_GetSupportedServiceNames (void)
|
cssu::Sequence<OUString> SAL_CALL ContextChangeEventMultiplexer::static_GetSupportedServiceNames (void)
|
||||||
{
|
{
|
||||||
return css::uno::Sequence<OUString>();
|
return css::uno::Sequence<OUString>();
|
||||||
@@ -358,9 +305,6 @@ cssu::Reference<cssu::XInterface> ContextChangeEventMultiplexer::impl_createFact
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cssu::Reference<cssu::XInterface> SAL_CALL ContextChangeEventMultiplexer::static_CreateInstance (
|
cssu::Reference<cssu::XInterface> SAL_CALL ContextChangeEventMultiplexer::static_CreateInstance (
|
||||||
const cssu::Reference<cssu::XComponentContext>& rxComponentContext)
|
const cssu::Reference<cssu::XComponentContext>& rxComponentContext)
|
||||||
throw (cssu::Exception)
|
throw (cssu::Exception)
|
||||||
|
@@ -16,14 +16,14 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <framework/menuconfiguration.hxx>
|
|
||||||
#include <toolkit/awt/vclxmenu.hxx>
|
|
||||||
#include <comphelper/processfactory.hxx>
|
|
||||||
#include <cppuhelper/implbase1.hxx>
|
#include <cppuhelper/implbase1.hxx>
|
||||||
|
#include <comphelper/processfactory.hxx>
|
||||||
|
#include <framework/menuconfiguration.hxx>
|
||||||
#include <rtl/ref.hxx>
|
#include <rtl/ref.hxx>
|
||||||
#include <svtools/imagemgr.hxx>
|
#include <svtools/imagemgr.hxx>
|
||||||
#include <svtools/miscopt.hxx>
|
#include <svtools/miscopt.hxx>
|
||||||
#include <svtools/toolboxcontroller.hxx>
|
#include <svtools/toolboxcontroller.hxx>
|
||||||
|
#include <toolkit/awt/vclxmenu.hxx>
|
||||||
#include <toolkit/helper/vclunohelper.hxx>
|
#include <toolkit/helper/vclunohelper.hxx>
|
||||||
#include <tools/urlobj.hxx>
|
#include <tools/urlobj.hxx>
|
||||||
#include <unotools/moduleoptions.hxx>
|
#include <unotools/moduleoptions.hxx>
|
||||||
@@ -154,9 +154,7 @@ throw ( css::uno::Exception, css::uno::RuntimeException )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL
|
void SAL_CALL PopupMenuToolbarController::statusChanged( const css::frame::FeatureStateEvent& rEvent )
|
||||||
PopupMenuToolbarController::statusChanged(
|
|
||||||
const css::frame::FeatureStateEvent& rEvent )
|
|
||||||
throw ( css::uno::RuntimeException )
|
throw ( css::uno::RuntimeException )
|
||||||
{
|
{
|
||||||
// TODO move to base class
|
// TODO move to base class
|
||||||
@@ -390,9 +388,7 @@ css::uno::Sequence<OUString> NewToolbarController::getSupportedServiceNames()
|
|||||||
return aRet;
|
return aRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL
|
void SAL_CALL NewToolbarController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
|
||||||
NewToolbarController::initialize(
|
|
||||||
const css::uno::Sequence< css::uno::Any >& aArguments )
|
|
||||||
throw ( css::uno::Exception, css::uno::RuntimeException )
|
throw ( css::uno::Exception, css::uno::RuntimeException )
|
||||||
{
|
{
|
||||||
PopupMenuToolbarController::initialize( aArguments );
|
PopupMenuToolbarController::initialize( aArguments );
|
||||||
@@ -401,10 +397,8 @@ throw ( css::uno::Exception, css::uno::RuntimeException )
|
|||||||
createPopupMenuController();
|
createPopupMenuController();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL
|
void SAL_CALL NewToolbarController::statusChanged( const css::frame::FeatureStateEvent& rEvent )
|
||||||
NewToolbarController::statusChanged(
|
throw ( css::uno::RuntimeException )
|
||||||
const css::frame::FeatureStateEvent& rEvent )
|
|
||||||
throw ( css::uno::RuntimeException )
|
|
||||||
{
|
{
|
||||||
if ( rEvent.IsEnabled )
|
if ( rEvent.IsEnabled )
|
||||||
{
|
{
|
||||||
@@ -418,9 +412,8 @@ NewToolbarController::statusChanged(
|
|||||||
enable( rEvent.IsEnabled );
|
enable( rEvent.IsEnabled );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL
|
void SAL_CALL NewToolbarController::execute( sal_Int16 /*KeyModifier*/ )
|
||||||
NewToolbarController::execute( sal_Int16 /*KeyModifier*/ )
|
throw ( css::uno::RuntimeException )
|
||||||
throw ( css::uno::RuntimeException )
|
|
||||||
{
|
{
|
||||||
osl::MutexGuard aGuard( m_aMutex );
|
osl::MutexGuard aGuard( m_aMutex );
|
||||||
if ( !m_aLastURL.getLength() )
|
if ( !m_aLastURL.getLength() )
|
||||||
|
Reference in New Issue
Block a user