summaryrefslogtreecommitdiff
path: root/stoc/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-01 08:41:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-01 08:41:10 +0200
commite1f3391a749873875e2e65bf9f36d242702b8006 (patch)
tree3b4df0931cb7f1540471e1dafa51a4a18e98eea3 /stoc/source
parent72a11e4544c900f0b83fbdcae11eb247d65e9666 (diff)
Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I14b923990a012e8e85ca9170cdffd6b8e3626d89
Diffstat (limited to 'stoc/source')
-rw-r--r--stoc/source/defaultregistry/defaultregistry.cxx2
-rw-r--r--stoc/source/implementationregistration/implreg.cxx4
-rw-r--r--stoc/source/invocation_adapterfactory/iafactory.cxx12
-rw-r--r--stoc/source/proxy_factory/proxyfac.cxx8
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx6
-rw-r--r--stoc/source/typeconv/convert.cxx10
6 files changed, 21 insertions, 21 deletions
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index aff3f149edff..477a76ccb7d9 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -1170,7 +1170,7 @@ Reference< XEnumeration > NestedRegistryImpl::createEnumeration( ) throw (Runti
Type NestedRegistryImpl::getElementType( ) throw (RuntimeException, std::exception)
{
- return getCppuType( &m_localReg );
+ return cppu::UnoType<decltype(m_localReg)>::get();
}
sal_Bool SAL_CALL NestedRegistryImpl::hasElements( ) throw (RuntimeException, std::exception)
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 90d3ce20f684..b78c1f4925bf 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -1361,7 +1361,7 @@ void ImplementationRegistration::initialize(
OUStringBuffer buf;
buf.append( "ImplementationRegistration::initialize() invalid first parameter,"
"expected " );
- buf.append( getCppuType( &rLoader ).getTypeName() );
+ buf.append( cppu::UnoType<decltype(rLoader)>::get().getTypeName() );
buf.append( ", got " );
buf.append( aArgs.getConstArray()[0].getValueTypeName() );
throw IllegalArgumentException( buf.makeStringAndClear(),
@@ -1408,7 +1408,7 @@ void ImplementationRegistration::initialize(
OUStringBuffer buf;
buf.append( "ImplementationRegistration::initialize() invalid fourth parameter,"
"expected " );
- buf.append( getCppuType( &rReg ).getTypeName() );
+ buf.append( cppu::UnoType<decltype(rReg)>::get().getTypeName() );
buf.append( ", got " );
buf.append( aArgs.getConstArray()[3].getValueTypeName() );
throw IllegalArgumentException( buf.makeStringAndClear(),
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index 6fb7c6fd5a73..8bd1b3d98106 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -215,7 +215,7 @@ static inline void constructRuntimeException(
RuntimeException exc( rMsg );
// no conversion needed due to binary compatibility + no convertible type
::uno_type_any_construct(
- pExc, &exc, ::getCppuType( &exc ).getTypeLibType(), 0 );
+ pExc, &exc, cppu::UnoType<decltype(exc)>::get().getTypeLibType(), 0 );
}
@@ -665,7 +665,7 @@ AdapterImpl::AdapterImpl(
// map receiver
m_pReceiver = static_cast<uno_Interface *>(m_pFactory->m_aCpp2Uno.mapInterface(
- xReceiver.get(), ::getCppuType( &xReceiver ) ));
+ xReceiver.get(), cppu::UnoType<decltype(xReceiver)>::get() ));
OSL_ASSERT( 0 != m_pReceiver );
if (! m_pReceiver)
{
@@ -699,16 +699,16 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext )
xContext ),
UNO_QUERY_THROW );
m_pConverter = static_cast<uno_Interface *>(m_aCpp2Uno.mapInterface(
- xConverter.get(), ::getCppuType( &xConverter ) ));
+ xConverter.get(), cppu::UnoType<decltype(xConverter)>::get() ));
OSL_ASSERT( 0 != m_pConverter );
// some type info:
// sequence< any >
- Type const & rAnySeqType = ::getCppuType( (const Sequence< Any > *)0 );
+ Type const & rAnySeqType = cppu::UnoType<Sequence< Any >>::get();
rAnySeqType.getDescription( &m_pAnySeqTD );
// sequence< short >
const Type & rShortSeqType =
- ::getCppuType( (const Sequence< sal_Int16 > *)0 );
+ cppu::UnoType<Sequence< sal_Int16 >>::get();
rShortSeqType.getDescription( &m_pShortSeqTD );
// script.XInvocation
typelib_TypeDescription * pTD = 0;
@@ -851,7 +851,7 @@ Reference< XInterface > FactoryImpl::createAdapter(
// map one interface to C++
uno_Interface * pUnoI = &that->m_pInterfaces[ 0 ];
m_aUno2Cpp.mapInterface(
- reinterpret_cast<void **>(&xRet), pUnoI, ::getCppuType( &xRet ) );
+ reinterpret_cast<void **>(&xRet), pUnoI, cppu::UnoType<decltype(xRet)>::get() );
that->release();
OSL_ASSERT( xRet.is() );
if (! xRet.is())
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index 85f11f6670cc..0530ef5570f0 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -153,7 +153,7 @@ UnoInterfaceReference FactoryImpl::binuno_queryInterface(
"### RuntimeException expected!" );
Any cpp_exc;
uno_type_copyAndConvertData(
- &cpp_exc, exc, ::getCppuType( &cpp_exc ).getTypeLibType(),
+ &cpp_exc, exc, cppu::UnoType<decltype(cpp_exc)>::get().getTypeLibType(),
m_uno2cpp.get() );
uno_any_destruct( exc, 0 );
::cppu::throwException( cpp_exc );
@@ -257,7 +257,7 @@ static void SAL_CALL binuno_proxy_dispatch(
*static_cast< Type const * >( pArgs[ 0 ] );
Any ret( that->m_root->queryInterface( rType ) );
uno_type_copyAndConvertData(
- pReturn, &ret, ::getCppuType( &ret ).getTypeLibType(),
+ pReturn, &ret, cppu::UnoType<decltype(ret)>::get().getTypeLibType(),
that->m_root->m_factory->m_cpp2uno.get() );
*ppException = 0; // no exc
}
@@ -316,7 +316,7 @@ inline ProxyRoot::ProxyRoot(
{
m_factory->m_cpp2uno.mapInterface(
reinterpret_cast< void ** >( &m_target.m_pUnoI ), xTarget.get(),
- ::getCppuType( &xTarget ) );
+ cppu::UnoType<decltype(xTarget)>::get() );
OSL_ENSURE( m_target.is(), "### mapping interface failed!" );
}
@@ -359,7 +359,7 @@ Any ProxyRoot::queryAggregation( Type const & rType )
UnoInterfaceReference root;
m_factory->m_cpp2uno.mapInterface(
reinterpret_cast< void ** >( &root.m_pUnoI ),
- xRoot.get(), ::getCppuType( &xRoot ) );
+ xRoot.get(), cppu::UnoType<decltype(xRoot)>::get() );
UnoInterfaceReference proxy(
// ref count initially 1:
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index a543da9f9735..33a35578e0e1 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -742,7 +742,7 @@ Reference<XPropertySetInfo > OServiceManager::getPropertySetInfo()
{
Sequence< beans::Property > seq( 1 );
seq[ 0 ] = beans::Property(
- "DefaultContext", -1, ::getCppuType( &m_xContext ), 0 );
+ "DefaultContext", -1, cppu::UnoType<decltype(m_xContext)>::get(), 0 );
Reference< beans::XPropertySetInfo > xInfo( new PropertySetInfo_Impl( seq ) );
MutexGuard aGuard( m_mutex );
@@ -1615,9 +1615,9 @@ Reference<XPropertySetInfo > ORegistryServiceManager::getPropertySetInfo()
{
Sequence< beans::Property > seq( 2 );
seq[ 0 ] = beans::Property(
- "DefaultContext", -1, ::getCppuType( &m_xContext ), 0 );
+ "DefaultContext", -1, cppu::UnoType<decltype(m_xContext)>::get(), 0 );
seq[ 1 ] = beans::Property(
- "Registry", -1, ::getCppuType( &m_xRegistry ),
+ "Registry", -1, cppu::UnoType<decltype(m_xRegistry)>::get(),
beans::PropertyAttribute::READONLY );
Reference< beans::XPropertySetInfo > xInfo( new PropertySetInfo_Impl( seq ) );
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index 184a434c0083..426cc0525441 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -732,7 +732,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
default:
{
sal_Bool bTmp = (toDouble( rVal ) != 0.0);
- aRet.setValue( &bTmp, getBooleanCppuType() );
+ aRet.setValue( &bTmp, cppu::UnoType<bool>::get() );
}
case TypeClass_ENUM: // exclude enums
break;
@@ -743,12 +743,12 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
if ( aStr == "0" || aStr.equalsIgnoreAsciiCase( "false" ))
{
sal_Bool bFalse = sal_False;
- aRet.setValue( &bFalse, getCppuBooleanType() );
+ aRet.setValue( &bFalse, cppu::UnoType<bool>::get() );
}
else if ( aStr == "1" || aStr.equalsIgnoreAsciiCase( "true" ))
{
sal_Bool bTrue = sal_True;
- aRet.setValue( &bTrue, getCppuBooleanType() );
+ aRet.setValue( &bTrue, cppu::UnoType<bool>::get() );
}
else
{
@@ -766,13 +766,13 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
if (aSourceClass==TypeClass_STRING)
{
if ((*static_cast<const OUString *>(rVal.getValue())).getLength() == 1) // single char
- aRet.setValue( (*static_cast<const OUString *>(rVal.getValue())).getStr(), ::getCharCppuType() );
+ aRet.setValue( (*static_cast<const OUString *>(rVal.getValue())).getStr(), cppu::UnoType<cppu::UnoCharType>::get() );
}
else if (aSourceClass!=TypeClass_ENUM && // exclude enums, chars
aSourceClass!=TypeClass_CHAR)
{
sal_Unicode cRet = (sal_Unicode)toHyper( rVal, 0, 0xffff ); // range
- aRet.setValue( &cRet, ::getCharCppuType() );
+ aRet.setValue( &cRet, cppu::UnoType<cppu::UnoCharType>::get() );
}
break;
}