diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 14:52:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 17:39:55 +0100 |
commit | 927933404d46087011305eb22ad8afca95ab27c0 (patch) | |
tree | e4dc4351851995b65ae0a848a4ab4df0b216c9f3 /framework | |
parent | 2598a15ed2e7bc4afb60e0e61ed611b6a5633e5e (diff) |
framework: simplify deprecated XTypeProvider.getImplementationId
Change-Id: Id137a35c385a5198243eefb9a42f4deace24e195
Diffstat (limited to 'framework')
5 files changed, 5 insertions, 116 deletions
diff --git a/framework/inc/macros/xtypeprovider.hxx b/framework/inc/macros/xtypeprovider.hxx index 7854b2f6f1d0..d571386b79c1 100644 --- a/framework/inc/macros/xtypeprovider.hxx +++ b/framework/inc/macros/xtypeprovider.hxx @@ -56,26 +56,7 @@ ________________________________________________________________________________ #define PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \ ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL CLASS::getImplementationId() throw( ::com::sun::star::uno::RuntimeException, std::exception ) \ { \ - /* Create one Id for all instances of this class. */ \ - /* Use ethernet address to do this! (sal_True) */ \ - /* Optimize this method */ \ - /* We initialize a static variable only one time. And we don't must use a mutex at every call! */ \ - /* For the first call; pID is NULL - for the second call pID is different from NULL! */ \ - static ::cppu::OImplementationId* pID = NULL ; \ - if ( pID == NULL ) \ - { \ - /* Ready for multithreading; get global mutex for first call of this method only! see before */ \ - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \ - /* Control these pointer again ... it can be, that another instance will be faster then these! */ \ - if ( pID == NULL ) \ - { \ - /* Create a new static ID ... */ \ - static ::cppu::OImplementationId aID( false ); \ - /* ... and set his address to static pointer! */ \ - pID = &aID ; \ - } \ - } \ - return pID->getImplementationId(); \ + return css::uno::Sequence<sal_Int8>(); \ } diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx index 815bcfb61859..95e3a91d4695 100644 --- a/framework/source/fwe/classes/actiontriggercontainer.cxx +++ b/framework/source/fwe/classes/actiontriggercontainer.cxx @@ -156,30 +156,7 @@ Sequence< Type > SAL_CALL ActionTriggerContainer::getTypes() throw ( RuntimeExce Sequence< sal_Int8 > SAL_CALL ActionTriggerContainer::getImplementationId() throw ( RuntimeException, std::exception ) { - // Create one Id for all instances of this class. - // Use ethernet address to do this! (sal_True) - - // Optimize this method - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pID is NULL - for the second call pID is different from NULL! - static ::cppu::OImplementationId* pID = NULL ; - - if ( pID == NULL ) - { - // Ready for multithreading; get global mutex for first call of this method only! see before - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - - // Control these pointer again ... it can be, that another instance will be faster then these! - if ( pID == NULL ) - { - // Create a new static ID ... - static ::cppu::OImplementationId aID( false ) ; - // ... and set his address to static pointer! - pID = &aID ; - } - } - - return pID->getImplementationId() ; + return css::uno::Sequence<sal_Int8>(); } } diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx index 6e649f74a5c0..4e6e85d44066 100644 --- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx @@ -153,30 +153,7 @@ Sequence< Type > SAL_CALL ActionTriggerPropertySet::getTypes() throw ( RuntimeEx Sequence< sal_Int8 > SAL_CALL ActionTriggerPropertySet::getImplementationId() throw ( RuntimeException, std::exception ) { - // Create one Id for all instances of this class. - // Use ethernet address to do this! (sal_True) - - // Optimize this method - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pID is NULL - for the second call pID is different from NULL! - static ::cppu::OImplementationId* pID = NULL ; - - if ( pID == NULL ) - { - // Ready for multithreading; get global mutex for first call of this method only! see before - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - - // Control these pointer again ... it can be, that another instance will be faster then these! - if ( pID == NULL ) - { - // Create a new static ID ... - static ::cppu::OImplementationId aID( false ) ; - // ... and set his address to static pointer! - pID = &aID ; - } - } - - return pID->getImplementationId() ; + return css::uno::Sequence<sal_Int8>(); } sal_Bool SAL_CALL ActionTriggerPropertySet::convertFastPropertyValue( diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx index 5917b2a5a201..bca4cddf96ed 100644 --- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx @@ -146,30 +146,7 @@ Sequence< Type > SAL_CALL ActionTriggerSeparatorPropertySet::getTypes() throw ( Sequence< sal_Int8 > SAL_CALL ActionTriggerSeparatorPropertySet::getImplementationId() throw ( RuntimeException, std::exception ) { - // Create one Id for all instances of this class. - // Use ethernet address to do this! (sal_True) - - // Optimize this method - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pID is NULL - for the second call pID is different from NULL! - static ::cppu::OImplementationId* pID = NULL ; - - if ( pID == NULL ) - { - // Ready for multithreading; get global mutex for first call of this method only! see before - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - - // Control these pointer again ... it can be, that another instance will be faster then these! - if ( pID == NULL ) - { - // Create a new static ID ... - static ::cppu::OImplementationId aID( false ) ; - // ... and set his address to static pointer! - pID = &aID ; - } - } - - return pID->getImplementationId() ; + return css::uno::Sequence<sal_Int8>(); } sal_Bool SAL_CALL ActionTriggerSeparatorPropertySet::convertFastPropertyValue( diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index 6a951dcf2dab..1ef8b9883381 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -281,30 +281,7 @@ Sequence< Type > SAL_CALL RootActionTriggerContainer::getTypes() throw ( Runtime Sequence< sal_Int8 > SAL_CALL RootActionTriggerContainer::getImplementationId() throw ( RuntimeException, std::exception ) { - // Create one Id for all instances of this class. - // Use ethernet address to do this! (sal_True) - - // Optimize this method - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pID is NULL - for the second call pID is different from NULL! - static ::cppu::OImplementationId* pID = NULL ; - - if ( pID == NULL ) - { - // Ready for multithreading; get global mutex for first call of this method only! see before - osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() ) ; - - // Control these pointer again ... it can be, that another instance will be faster then these! - if ( pID == NULL ) - { - // Create a new static ID ... - static ::cppu::OImplementationId aID( false ) ; - // ... and set his address to static pointer! - pID = &aID ; - } - } - - return pID->getImplementationId() ; + return css::uno::Sequence<sal_Int8>(); } // private implementation helper |