From 5bce6e34cd94ba3dd6e5fd2c96226ed62a3fea76 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 10 Mar 2014 15:59:35 +0100 Subject: stoc: simplify deprecated XTypeProvider.getImplementationId Change-Id: I57eca2dcf316232c26c528015c4ba18ba3c4760d --- stoc/source/corereflection/crarray.cxx | 12 +----------- stoc/source/corereflection/crcomp.cxx | 12 +----------- stoc/source/corereflection/crefl.cxx | 12 +----------- stoc/source/corereflection/crenum.cxx | 12 +----------- stoc/source/corereflection/criface.cxx | 24 ++--------------------- stoc/source/invocation/invocation.cxx | 12 +----------- stoc/test/javavm/testcomponent/TestComponent.java | 2 +- 7 files changed, 8 insertions(+), 78 deletions(-) (limited to 'stoc') diff --git a/stoc/source/corereflection/crarray.cxx b/stoc/source/corereflection/crarray.cxx index 527541f059bc..2ff8d23a817b 100644 --- a/stoc/source/corereflection/crarray.cxx +++ b/stoc/source/corereflection/crarray.cxx @@ -68,17 +68,7 @@ Sequence< Type > ArrayIdlClassImpl::getTypes() Sequence< sal_Int8 > ArrayIdlClassImpl::getImplementationId() throw (::com::sun::star::uno::RuntimeException, std::exception) { - static OImplementationId * s_pId = 0; - if (! s_pId) - { - MutexGuard aGuard( getMutexAccess() ); - if (! s_pId) - { - static OImplementationId s_aId; - s_pId = &s_aId; - } - } - return s_pId->getImplementationId(); + return css::uno::Sequence(); } // XIdlArray diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx index 9e9a2dd6fd53..129ba91cf20d 100644 --- a/stoc/source/corereflection/crcomp.cxx +++ b/stoc/source/corereflection/crcomp.cxx @@ -111,17 +111,7 @@ Sequence< Type > IdlCompFieldImpl::getTypes() Sequence< sal_Int8 > IdlCompFieldImpl::getImplementationId() throw (::com::sun::star::uno::RuntimeException, std::exception) { - static OImplementationId * s_pId = 0; - if (! s_pId) - { - MutexGuard aGuard( getMutexAccess() ); - if (! s_pId) - { - static OImplementationId s_aId; - s_pId = &s_aId; - } - } - return s_pId->getImplementationId(); + return css::uno::Sequence(); } // XIdlMember diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index ad5367ee67b8..00e5ac483654 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -119,17 +119,7 @@ Sequence< Type > IdlReflectionServiceImpl::getTypes() Sequence< sal_Int8 > IdlReflectionServiceImpl::getImplementationId() throw (::com::sun::star::uno::RuntimeException, std::exception) { - static OImplementationId * s_pId = 0; - if (! s_pId) - { - MutexGuard aGuard( _aComponentMutex ); - if (! s_pId) - { - static OImplementationId s_aId; - s_pId = &s_aId; - } - } - return s_pId->getImplementationId(); + return css::uno::Sequence(); } // XComponent diff --git a/stoc/source/corereflection/crenum.cxx b/stoc/source/corereflection/crenum.cxx index 2420ad1484e0..5a3ce32286d9 100644 --- a/stoc/source/corereflection/crenum.cxx +++ b/stoc/source/corereflection/crenum.cxx @@ -109,17 +109,7 @@ Sequence< Type > IdlEnumFieldImpl::getTypes() Sequence< sal_Int8 > IdlEnumFieldImpl::getImplementationId() throw (::com::sun::star::uno::RuntimeException, std::exception) { - static OImplementationId * s_pId = 0; - if (! s_pId) - { - MutexGuard aGuard( getMutexAccess() ); - if (! s_pId) - { - static OImplementationId s_aId; - s_pId = &s_aId; - } - } - return s_pId->getImplementationId(); + return css::uno::Sequence(); } // XIdlMember diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index 97ac7b97203b..11a9640e9a56 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -123,17 +123,7 @@ Sequence< Type > IdlAttributeFieldImpl::getTypes() Sequence< sal_Int8 > IdlAttributeFieldImpl::getImplementationId() throw (::com::sun::star::uno::RuntimeException, std::exception) { - static OImplementationId * s_pId = 0; - if (! s_pId) - { - MutexGuard aGuard( getMutexAccess() ); - if (! s_pId) - { - static OImplementationId s_aId; - s_pId = &s_aId; - } - } - return s_pId->getImplementationId(); + return css::uno::Sequence(); } // XIdlMember @@ -427,17 +417,7 @@ Sequence< Type > IdlInterfaceMethodImpl::getTypes() Sequence< sal_Int8 > IdlInterfaceMethodImpl::getImplementationId() throw (::com::sun::star::uno::RuntimeException, std::exception) { - static OImplementationId * s_pId = 0; - if (! s_pId) - { - MutexGuard aGuard( getMutexAccess() ); - if (! s_pId) - { - static OImplementationId s_aId; - s_pId = &s_aId; - } - } - return s_pId->getImplementationId(); + return css::uno::Sequence(); } // XIdlMember diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 6e67419d3e82..8db2783fda26 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -1050,17 +1050,7 @@ Sequence< Type > SAL_CALL Invocation_Impl::getTypes(void) throw( RuntimeExceptio Sequence< sal_Int8 > SAL_CALL Invocation_Impl::getImplementationId( ) throw( RuntimeException, std::exception) { - static OImplementationId *pId = 0; - if( ! pId ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pId ) - { - static OImplementationId id( false ); - pId = &id; - } - } - return pId->getImplementationId(); + return css::uno::Sequence(); } diff --git a/stoc/test/javavm/testcomponent/TestComponent.java b/stoc/test/javavm/testcomponent/TestComponent.java index eb1e4206880a..33cb4e25fb37 100644 --- a/stoc/test/javavm/testcomponent/TestComponent.java +++ b/stoc/test/javavm/testcomponent/TestComponent.java @@ -56,7 +56,7 @@ public class TestComponent implements XServiceInfo, XTypeProvider // XTypeProvider public byte[] getImplementationId( ) { - return TestComponent.class.getName().getBytes(); + return new byte[0]; } -- cgit