diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 20:08:27 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-03 23:17:24 +0200 |
commit | 234f87d354d3af8dfe842d8cf8c733679c3180fe (patch) | |
tree | e860e1658168a217be7307110bcd1039f2435d26 /stoc | |
parent | 1d2b6b709e81eec8600118b3402d82707aa113bc (diff) |
Just use Any ctor instead of makeAny in stoc
Change-Id: I3345444f356dd3df9069773eba2bab1b46a08c46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133772
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/corereflection/crefl.cxx | 4 | ||||
-rw-r--r-- | stoc/source/invocation/invocation.cxx | 20 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 16 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 8 |
4 files changed, 24 insertions, 24 deletions
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index 723e0711fa59..af1854e7e3b4 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -201,7 +201,7 @@ Reference< XIdlClass > IdlReflectionServiceImpl::forName( const OUString & rType { xRet = constructClass( pTD ); if (xRet.is()) - _aElements.setValue( rTypeName, makeAny( xRet ) ); // update + _aElements.setValue( rTypeName, Any( xRet ) ); // update typelib_typedescription_release( pTD ); } } @@ -289,7 +289,7 @@ Reference< XIdlClass > IdlReflectionServiceImpl::forType( typelib_TypeDescriptio { xRet = constructClass( pTypeDescr ); if (xRet.is()) - _aElements.setValue( aName, makeAny( xRet ) ); // update + _aElements.setValue( aName, Any( xRet ) ); // update } return xRet; diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index ab8a10fa1ef6..5463c059eb5f 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -241,49 +241,49 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType ) (_xDirect.is() && _xENDirect.is()) || (!_xDirect.is() && _xENIntrospection.is())) { - return makeAny( Reference< XExactName >( static_cast< XExactName* >(this) ) ); + return Any( Reference< XExactName >( static_cast< XExactName* >(this) ) ); } } else if ( aType == cppu::UnoType<XNameContainer>::get()) { if( _xNameContainer.is() ) - return makeAny( Reference< XNameContainer >( static_cast< XNameContainer* >(this) ) ); + return Any( Reference< XNameContainer >( static_cast< XNameContainer* >(this) ) ); } else if ( aType == cppu::UnoType<XNameReplace>::get()) { if( _xNameReplace.is() ) - return makeAny( Reference< XNameReplace >( static_cast< XNameReplace* >(this) ) ); + return Any( Reference< XNameReplace >( static_cast< XNameReplace* >(this) ) ); } else if ( aType == cppu::UnoType<XNameAccess>::get()) { if( _xNameAccess.is() ) - return makeAny( Reference< XNameAccess >( static_cast< XNameAccess* >(this) ) ); + return Any( Reference< XNameAccess >( static_cast< XNameAccess* >(this) ) ); } else if ( aType == cppu::UnoType<XIndexContainer>::get()) { if (_xIndexContainer.is()) - return makeAny( Reference< XIndexContainer >( static_cast< XIndexContainer* >(this) ) ); + return Any( Reference< XIndexContainer >( static_cast< XIndexContainer* >(this) ) ); } else if ( aType == cppu::UnoType<XIndexReplace>::get()) { if (_xIndexReplace.is()) - return makeAny( Reference< XIndexReplace >( static_cast< XIndexReplace* >(this) ) ); + return Any( Reference< XIndexReplace >( static_cast< XIndexReplace* >(this) ) ); } else if ( aType == cppu::UnoType<XIndexAccess>::get()) { if (_xIndexAccess.is()) - return makeAny( Reference< XIndexAccess >( static_cast< XIndexAccess* >(this) ) ); + return Any( Reference< XIndexAccess >( static_cast< XIndexAccess* >(this) ) ); } else if ( aType == cppu::UnoType<XEnumerationAccess>::get()) { if (_xEnumerationAccess.is()) - return makeAny( Reference< XEnumerationAccess >( static_cast< XEnumerationAccess* >(this) ) ); + return Any( Reference< XEnumerationAccess >( static_cast< XEnumerationAccess* >(this) ) ); } else if ( aType == cppu::UnoType<XElementAccess>::get()) { if (_xElementAccess.is()) { - return makeAny( Reference< XElementAccess >( + return Any( Reference< XElementAccess >( static_cast< XElementAccess* >(static_cast< XNameContainer* >(this)) ) ); } } @@ -295,7 +295,7 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType ) ( _xDirect.is() && _xDirect2.is()) || (!_xDirect.is() && _xIntrospectionAccess.is() ) ) { - return makeAny( Reference< XInvocation2 >( static_cast< XInvocation2* >(this) ) ); + return Any( Reference< XInvocation2 >( static_cast< XInvocation2* >(this) ) ); } } diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 193184a60323..4ed1293f9195 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -623,7 +623,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) "JavaVirtualMachine::getJavaVM failed because" " No suitable JRE found!", static_cast< cppu::OWeakObject * >(this)); - askForRetry(css::uno::makeAny(exc)); + askForRetry(css::uno::Any(exc)); return css::uno::Any(); } else @@ -644,7 +644,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) "JavaVirtualMachine::getJavaVM failed because" " Java settings have changed!", static_cast< cppu::OWeakObject * >(this)); - askForRetry(css::uno::makeAny(exc)); + askForRetry(css::uno::Any(exc)); return css::uno::Any(); } case JFW_E_JAVA_DISABLED: @@ -659,7 +659,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) css::java::JavaDisabledException exc( "JavaVirtualMachine::getJavaVM failed because Java is disabled!", static_cast< cppu::OWeakObject * >(this)); - if( ! askForRetry(css::uno::makeAny(exc))) + if( ! askForRetry(css::uno::Any(exc))) return css::uno::Any(); continue; } @@ -696,7 +696,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) css::java::JavaVMCreationFailureException exc( "JavaVirtualMachine::getJavaVM failed because Java is defective!", static_cast< cppu::OWeakObject * >(this), 0); - askForRetry(css::uno::makeAny(exc)); + askForRetry(css::uno::Any(exc)); return css::uno::Any(); } case JFW_E_RUNNING_JVM: @@ -714,7 +714,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) "JavaVirtualMachine::getJavaVM failed because " "Office must be restarted before Java can be used!", static_cast< cppu::OWeakObject * >(this)); - askForRetry(css::uno::makeAny(exc)); + askForRetry(css::uno::Any(exc)); return css::uno::Any(); } default: @@ -762,15 +762,15 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) " that the requested JavaVM pointer is not available", static_cast< cppu::OWeakObject * >(this)); } - return css::uno::makeAny(reinterpret_cast< sal_IntPtr >(m_pJavaVm)); + return css::uno::Any(reinterpret_cast< sal_IntPtr >(m_pJavaVm)); case RETURN_VIRTUALMACHINE: OSL_ASSERT(sizeof (sal_Int64) >= sizeof (jvmaccess::VirtualMachine *)); - return css::uno::makeAny( + return css::uno::Any( reinterpret_cast< sal_Int64 >( m_xUnoVirtualMachine->getVirtualMachine().get())); case RETURN_UNOVIRTUALMACHINE: OSL_ASSERT(sizeof (sal_Int64) >= sizeof (jvmaccess::VirtualMachine *)); - return css::uno::makeAny( + return css::uno::Any( reinterpret_cast< sal_Int64 >(m_xUnoVirtualMachine.get())); } } diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index abda0b4dad36..77651b0f007d 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -541,7 +541,7 @@ Any SAL_CALL OServiceManagerWrapper::getPropertyValue( { MutexGuard aGuard( m_aMutex ); if( m_xContext.is() ) - return makeAny( m_xContext ); + return Any( m_xContext ); else return Any(); } @@ -680,7 +680,7 @@ Any OServiceManager::getPropertyValue(const OUString& PropertyName) { MutexGuard aGuard( m_aMutex ); if( m_xContext.is() ) - return makeAny( m_xContext ); + return Any( m_xContext ); else return Any(); } @@ -1265,7 +1265,7 @@ Reference<XInterface > ORegistryServiceManager::loadWithImplementationName( else xMgr.set( this ); ret = createSingleRegistryFactory( xMgr, name, xImpKey ); - insert( makeAny( ret ) ); + insert( Any( ret ) ); // Remember this factory as loaded in contrast to inserted ( XSet::insert) // factories. Those loaded factories in this set are candidates for being // released on an unloading notification. @@ -1440,7 +1440,7 @@ Any ORegistryServiceManager::getPropertyValue(const OUString& PropertyName) { MutexGuard aGuard( m_aMutex ); if( m_xRegistry.is() ) - return makeAny( m_xRegistry ); + return Any( m_xRegistry ); else return Any(); } |