summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-01 08:38:16 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-01 08:38:16 +0200
commitead3062336673c449a70ff41895a5cd5e087883f (patch)
treefebff3626561455fe5a0c52cf5c0a2922626d11a /cppuhelper
parentbfcdcdb63a9f7800629e3143b52f4eed1b7b0b4f (diff)
Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I620bf5d46c19f0182e822265eadf8eb11001855e
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/access_control.cxx6
-rw-r--r--cppuhelper/source/component.cxx16
-rw-r--r--cppuhelper/source/component_context.cxx6
-rw-r--r--cppuhelper/source/exc_thrower.cxx12
-rw-r--r--cppuhelper/source/factory.cxx21
-rw-r--r--cppuhelper/source/implbase.cxx12
-rw-r--r--cppuhelper/source/implbase_ex.cxx16
-rw-r--r--cppuhelper/source/macro_expander.cxx2
-rw-r--r--cppuhelper/source/propshlp.cxx10
-rw-r--r--cppuhelper/source/tdmgr.cxx2
-rw-r--r--cppuhelper/test/testpropshlp.cxx50
11 files changed, 73 insertions, 80 deletions
diff --git a/cppuhelper/source/access_control.cxx b/cppuhelper/source/access_control.cxx
index b129c1aec160..e8a05a723f69 100644
--- a/cppuhelper/source/access_control.cxx
+++ b/cppuhelper/source/access_control.cxx
@@ -103,7 +103,7 @@ void AccessControl::checkRuntimePermission(
{
__checkPermission(
m_xController,
- ::getCppuType( (security::RuntimePermission *)0 ), name.pData, 0 );
+ cppu::UnoType<security::RuntimePermission>::get(), name.pData, 0 );
}
void AccessControl::checkFilePermission(
@@ -112,7 +112,7 @@ void AccessControl::checkFilePermission(
{
__checkPermission(
m_xController,
- ::getCppuType( (io::FilePermission *)0 ), url.pData, actions.pData );
+ cppu::UnoType<io::FilePermission>::get(), url.pData, actions.pData );
}
void AccessControl::checkSocketPermission(
@@ -121,7 +121,7 @@ void AccessControl::checkSocketPermission(
{
__checkPermission(
m_xController,
- ::getCppuType( (connection::SocketPermission *)0 ), host.pData, actions.pData );
+ cppu::UnoType<connection::SocketPermission>::get(), host.pData, actions.pData );
}
}
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index 2c34da024b6b..ec154f855476 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -54,12 +54,12 @@ Any OComponentHelper::queryInterface( Type const & rType ) throw (RuntimeExcepti
}
Any OComponentHelper::queryAggregation( Type const & rType ) throw (RuntimeException, std::exception)
{
- if (rType == ::getCppuType( (Reference< lang::XComponent > const *)0 ))
+ if (rType == cppu::UnoType<lang::XComponent>::get())
{
void * p = static_cast< lang::XComponent * >( this );
return Any( &p, rType );
}
- else if (rType == ::getCppuType( (Reference< lang::XTypeProvider > const *)0 ))
+ else if (rType == cppu::UnoType<lang::XTypeProvider>::get())
{
void * p = static_cast< lang::XTypeProvider * >( this );
return Any( &p, rType );
@@ -122,10 +122,10 @@ Sequence< Type > OComponentHelper::getTypes() throw (RuntimeException, std::exce
if (! s_pTypes)
{
static OTypeCollection s_aTypes(
- ::getCppuType( (const Reference< lang::XComponent > *)0 ),
- ::getCppuType( (const Reference< lang::XTypeProvider > *)0 ),
- ::getCppuType( (const Reference< XAggregation > *)0 ),
- ::getCppuType( (const Reference< XWeak > *)0 ) );
+ cppu::UnoType<lang::XComponent>::get(),
+ cppu::UnoType<lang::XTypeProvider>::get(),
+ cppu::UnoType<XAggregation>::get(),
+ cppu::UnoType<XWeak>::get() );
s_pTypes = &s_aTypes;
}
}
@@ -223,7 +223,7 @@ void OComponentHelper::addEventListener(
}
else
{
- rBHelper.addListener( ::getCppuType( &rxListener ) , rxListener );
+ rBHelper.addListener( cppu::UnoType<decltype(rxListener)>::get(), rxListener );
}
}
@@ -232,7 +232,7 @@ void OComponentHelper::removeEventListener(
const Reference<XEventListener > & rxListener )
throw(::com::sun::star::uno::RuntimeException, std::exception)
{
- rBHelper.removeListener( ::getCppuType( &rxListener ) , rxListener );
+ rBHelper.removeListener( cppu::UnoType<decltype(rxListener)>::get(), rxListener );
}
}
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index ef684e93bb36..cdb7c793bdfc 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -494,7 +494,7 @@ sal_Bool ComponentContext::hasByName( OUString const & name )
Type ComponentContext::getElementType() throw (RuntimeException, std::exception)
{
- return ::getVoidCppuType();
+ return cppu::UnoType<cppu::UnoVoidType>::get();
}
@@ -850,7 +850,7 @@ extern "C" { static void s_createComponentContext_v(va_list * pParam)
xContext = xDelegate;
}
- *ppContext = pTarget2curr->mapInterface(xContext.get(), ::getCppuType(&xContext));
+ *ppContext = pTarget2curr->mapInterface(xContext.get(), cppu::UnoType<decltype(xContext)>::get());
}}
Reference< XComponentContext > SAL_CALL createComponentContext(
@@ -875,7 +875,7 @@ Reference< XComponentContext > SAL_CALL createComponentContext(
curr2source.get());
}
- void * mapped_delegate = curr2source.mapInterface(xDelegate.get(), ::getCppuType(&xDelegate));
+ void * mapped_delegate = curr2source.mapInterface(xDelegate.get(), cppu::UnoType<decltype(xDelegate)>::get());
XComponentContext * pXComponentContext = NULL;
source_env.invoke(s_createComponentContext_v, mapped_entries.get(), nEntries, mapped_delegate, &pXComponentContext, &source2curr);
mapped_entries.reset();
diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx
index 484a3eddc832..177b1ba8872c 100644
--- a/cppuhelper/source/exc_thrower.cxx
+++ b/cppuhelper/source/exc_thrower.cxx
@@ -49,8 +49,7 @@ struct ExceptionThrower : public uno_Interface, XExceptionThrower
static inline Type const & getCppuType()
{
- return ::getCppuType(
- reinterpret_cast< Reference< XExceptionThrower > const * >(0) );
+ return cppu::UnoType<XExceptionThrower>::get();
}
// XInterface
@@ -87,9 +86,7 @@ static void SAL_CALL ExceptionThrower_dispatch(
{
Type const & rType_demanded =
*static_cast< Type const * >( pArgs[ 0 ] );
- if (rType_demanded.equals(
- ::getCppuType( reinterpret_cast<
- Reference< XInterface > const * >(0) ) ) ||
+ if (rType_demanded.equals( cppu::UnoType<XInterface>::get() ) ||
rType_demanded.equals( ExceptionThrower::getCppuType() ))
{
typelib_TypeDescription * pTD = 0;
@@ -122,7 +119,7 @@ static void SAL_CALL ExceptionThrower_dispatch(
OSL_ASSERT( false );
RuntimeException exc( "not implemented!" );
uno_type_any_construct(
- *ppException, &exc, ::getCppuType( &exc ).getTypeLibType(), 0 );
+ *ppException, &exc, cppu::UnoType<decltype(exc)>::get().getTypeLibType(), 0 );
break;
}
}
@@ -134,8 +131,7 @@ static void SAL_CALL ExceptionThrower_dispatch(
Any ExceptionThrower::queryInterface( Type const & type )
throw (RuntimeException, std::exception)
{
- if (type.equals( ::getCppuType( reinterpret_cast<
- Reference< XInterface > const * >(0) ) ) ||
+ if (type.equals( cppu::UnoType<XInterface>::get() ) ||
type.equals( ExceptionThrower::getCppuType() ))
{
XExceptionThrower * that = static_cast< XExceptionThrower * >( this );
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index ea0b14108774..8cbec655be6b 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -320,7 +320,7 @@ protected:
Any SAL_CALL OFactoryComponentHelper::queryInterface( const Type & rType )
throw(::com::sun::star::uno::RuntimeException, std::exception)
{
- if( rType == ::getCppuType( (Reference<XUnloadingPreference>*)0))
+ if( rType == cppu::UnoType<XUnloadingPreference>::get() )
{
return makeAny(
Reference< XUnloadingPreference >(
@@ -342,12 +342,12 @@ Sequence< Type > OFactoryComponentHelper::getTypes()
throw (::com::sun::star::uno::RuntimeException, std::exception)
{
Type ar[ 4 ];
- ar[ 0 ] = ::getCppuType( (const Reference< XSingleServiceFactory > *)0 );
- ar[ 1 ] = ::getCppuType( (const Reference< XServiceInfo > *)0 );
- ar[ 2 ] = ::getCppuType( (const Reference< XUnloadingPreference > *)0 );
+ ar[ 0 ] = cppu::UnoType<XSingleServiceFactory>::get();
+ ar[ 1 ] = cppu::UnoType<XServiceInfo>::get();
+ ar[ 2 ] = cppu::UnoType<XUnloadingPreference>::get();
if (m_fptr)
- ar[ 3 ] = ::getCppuType( (const Reference< XSingleComponentFactory > *)0 );
+ ar[ 3 ] = cppu::UnoType<XSingleComponentFactory>::get();
return Sequence< Type >( ar, m_fptr ? 4 : 3 );
}
@@ -576,12 +576,9 @@ Sequence< Type > ORegistryFactoryHelper::getTypes() throw (RuntimeException, std
sal_Int32 pos = types.getLength();
types.realloc( pos + 3 );
Type * p = types.getArray();
- p[ pos++ ] = ::getCppuType(
- reinterpret_cast< Reference< beans::XMultiPropertySet > const * >(0) );
- p[ pos++ ] = ::getCppuType(
- reinterpret_cast< Reference< beans::XFastPropertySet > const * >(0) );
- p[ pos++ ] = ::getCppuType(
- reinterpret_cast< Reference< beans::XPropertySet > const * >(0) );
+ p[ pos++ ] = cppu::UnoType<beans::XMultiPropertySet>::get();
+ p[ pos++ ] = cppu::UnoType<beans::XFastPropertySet>::get();
+ p[ pos++ ] = cppu::UnoType<beans::XPropertySet>::get();
return types;
}
@@ -606,7 +603,7 @@ IPropertyArrayHelper & ORegistryFactoryHelper::getInfoHelper()
beans::Property prop(
"ImplementationKey" /* name */,
0 /* handle */,
- ::getCppuType( &xImplementationKey ),
+ cppu::UnoType<decltype(xImplementationKey)>::get(),
beans::PropertyAttribute::READONLY |
beans::PropertyAttribute::OPTIONAL );
m_property_array_helper.reset(
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index f42047cbc916..be0405c8cf5f 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -53,7 +53,7 @@ void WeakComponentImplHelperBase::disposing()
Any WeakComponentImplHelperBase::queryInterface( Type const & rType )
throw (RuntimeException, std::exception)
{
- if (rType == ::getCppuType( (Reference< lang::XComponent > const *)0 ))
+ if (rType == cppu::UnoType<lang::XComponent>::get())
{
void * p = static_cast< lang::XComponent * >( this );
return Any( &p, rType );
@@ -146,7 +146,7 @@ void WeakComponentImplHelperBase::addEventListener(
}
else
{
- rBHelper.addListener( ::getCppuType( &xListener ), xListener );
+ rBHelper.addListener( cppu::UnoType<decltype(xListener)>::get(), xListener );
}
}
@@ -154,7 +154,7 @@ void WeakComponentImplHelperBase::removeEventListener(
Reference< lang::XEventListener > const & xListener )
throw (RuntimeException, std::exception)
{
- rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
+ rBHelper.removeListener( cppu::UnoType<decltype(xListener)>::get(), xListener );
}
// WeakAggComponentImplHelperBase
@@ -181,7 +181,7 @@ Any WeakAggComponentImplHelperBase::queryInterface( Type const & rType )
Any WeakAggComponentImplHelperBase::queryAggregation( Type const & rType )
throw (RuntimeException, std::exception)
{
- if (rType == ::getCppuType( (Reference< lang::XComponent > const *)0 ))
+ if (rType == cppu::UnoType<lang::XComponent>::get())
{
void * p = static_cast< lang::XComponent * >( this );
return Any( &p, rType );
@@ -278,7 +278,7 @@ void WeakAggComponentImplHelperBase::addEventListener(
}
else
{
- rBHelper.addListener( ::getCppuType( &xListener ), xListener );
+ rBHelper.addListener( cppu::UnoType<decltype(xListener)>::get(), xListener );
}
}
@@ -286,7 +286,7 @@ void WeakAggComponentImplHelperBase::removeEventListener(
Reference< lang::XEventListener > const & xListener )
throw (RuntimeException, std::exception)
{
- rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
+ rBHelper.removeListener( cppu::UnoType<decltype(xListener)>::get(), xListener );
}
}
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx
index 4542cb00d5e2..b32d373dc4cf 100644
--- a/cppuhelper/source/implbase_ex.cxx
+++ b/cppuhelper/source/implbase_ex.cxx
@@ -313,7 +313,7 @@ Sequence< Type > SAL_CALL WeakImplHelper_getTypes(
Sequence< Type > types( nTypes +1 );
Type * pTypes = types.getArray();
__fillTypes( pTypes, cd );
- pTypes[ nTypes ] = ::getCppuType( (Reference< XWeak > const *)0 );
+ pTypes[ nTypes ] = cppu::UnoType<XWeak>::get();
return types;
}
@@ -344,8 +344,8 @@ Sequence< Type > SAL_CALL WeakAggImplHelper_getTypes(
Sequence< Type > types( nTypes +2 );
Type * pTypes = types.getArray();
__fillTypes( pTypes, cd );
- pTypes[ nTypes++ ] = ::getCppuType( (Reference< XWeak > const *)0 );
- pTypes[ nTypes ] = ::getCppuType( (const Reference< XAggregation > *)0 );
+ pTypes[ nTypes++ ] = cppu::UnoType<XWeak>::get();
+ pTypes[ nTypes ] = cppu::UnoType<XAggregation>::get();
return types;
}
@@ -376,8 +376,8 @@ Sequence< Type > SAL_CALL WeakComponentImplHelper_getTypes(
Sequence< Type > types( nTypes +2 );
Type * pTypes = types.getArray();
__fillTypes( pTypes, cd );
- pTypes[ nTypes++ ] = ::getCppuType( (Reference< XWeak > const *)0 );
- pTypes[ nTypes ] = ::getCppuType( (Reference< lang::XComponent > const *)0 );
+ pTypes[ nTypes++ ] = cppu::UnoType<XWeak>::get();
+ pTypes[ nTypes ] = cppu::UnoType<lang::XComponent>::get();
return types;
}
@@ -408,9 +408,9 @@ Sequence< Type > SAL_CALL WeakAggComponentImplHelper_getTypes(
Sequence< Type > types( nTypes +3 );
Type * pTypes = types.getArray();
__fillTypes( pTypes, cd );
- pTypes[ nTypes++ ] = ::getCppuType( (Reference< XWeak > const *)0 );
- pTypes[ nTypes++ ] = ::getCppuType( (const Reference< XAggregation > *)0 );
- pTypes[ nTypes ] = ::getCppuType( (const Reference< lang::XComponent > *)0 );
+ pTypes[ nTypes++ ] = cppu::UnoType<XWeak>::get();
+ pTypes[ nTypes++ ] = cppu::UnoType<XAggregation>::get();
+ pTypes[ nTypes ] = cppu::UnoType<lang::XComponent>::get();
return types;
}
diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx
index 521c16a24989..3b950622ca65 100644
--- a/cppuhelper/source/macro_expander.cxx
+++ b/cppuhelper/source/macro_expander.cxx
@@ -203,7 +203,7 @@ Reference< lang::XSingleComponentFactory > create_bootstrap_macro_expander_facto
return Reference<lang::XSingleComponentFactory>(
static_cast<lang::XSingleComponentFactory *>(
- target2curr.mapInterface(free.get(), ::getCppuType(&free))),
+ target2curr.mapInterface(free.get(), cppu::UnoType<decltype(free)>::get())),
SAL_NO_ACQUIRE);
}
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 20be194b4b45..f2835f454112 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -44,15 +44,15 @@ IPropertyArrayHelper::~IPropertyArrayHelper()
inline const ::com::sun::star::uno::Type & getPropertyTypeIdentifier( )
{
- return ::getCppuType( (Reference< XPropertyChangeListener > *)0 );
+ return cppu::UnoType<XPropertyChangeListener>::get();
}
inline const ::com::sun::star::uno::Type & getPropertiesTypeIdentifier()
{
- return ::getCppuType( (Reference< XPropertiesChangeListener > *)0 );
+ return cppu::UnoType<XPropertiesChangeListener>::get();
}
inline const ::com::sun::star::uno::Type & getVetoableTypeIdentifier()
{
- return ::getCppuType( (Reference< XVetoableChangeListener > *)0 );
+ return cppu::UnoType<XVetoableChangeListener>::get();
}
extern "C" {
@@ -938,7 +938,7 @@ void OPropertySetHelper::addPropertiesChangeListener(
const Reference < XPropertiesChangeListener > & rListener )
throw(::com::sun::star::uno::RuntimeException, std::exception)
{
- rBHelper.addListener( getCppuType(&rListener) , rListener );
+ rBHelper.addListener( cppu::UnoType<decltype(rListener)>::get(), rListener );
}
// XMultiPropertySet
@@ -946,7 +946,7 @@ void OPropertySetHelper::removePropertiesChangeListener(
const Reference < XPropertiesChangeListener > & rListener )
throw(::com::sun::star::uno::RuntimeException, std::exception)
{
- rBHelper.removeListener( getCppuType(&rListener) , rListener );
+ rBHelper.removeListener( cppu::UnoType<decltype(rListener)>::get(), rListener );
}
// XMultiPropertySet
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index 74dba82c9de9..6c4238415283 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -650,7 +650,7 @@ sal_Bool SAL_CALL installTypeDescriptionManager(
Reference<container::XHierarchicalNameAccess> xTDMgr(
static_cast<container::XHierarchicalNameAccess *>(
- curr2target.mapInterface(xTDMgr_c.get(), ::getCppuType(&xTDMgr_c))),
+ curr2target.mapInterface(xTDMgr_c.get(), cppu::UnoType<decltype(xTDMgr_c)>::get())),
SAL_NO_ACQUIRE);
Reference< lang::XComponent > xComp( xTDMgr, UNO_QUERY );
diff --git a/cppuhelper/test/testpropshlp.cxx b/cppuhelper/test/testpropshlp.cxx
index 426afd855b04..64ea895db1b2 100644
--- a/cppuhelper/test/testpropshlp.cxx
+++ b/cppuhelper/test/testpropshlp.cxx
@@ -51,17 +51,17 @@ static Property * getPropertyTable1()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString("a"), 0, getCppuType( (OUString *)0) ,
+ Property( OUString("a"), 0, cppu::UnoType<OUString>::get() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //OUString
- Property( OUString("b"), 1, getCppuCharType( ) ,
+ Property( OUString("b"), 1, cppu::UnoType<cppu::UnoCharType>::get() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //Char
Property( OUString("c"), 2, cppu::UnoType<sal_Int32>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //sal_Int32
- Property( OUString("d"), 5, getCppuType( (double*)0) ,
+ Property( OUString("d"), 5, cppu::UnoType<double>::get() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //double
- Property( OUString("e"), 7, getCppuBooleanType() ,
+ Property( OUString("e"), 7, cppu::UnoType<bool>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //BOOL
- Property( OUString("f"), 8, getCppuType( (Any*)0) ,
+ Property( OUString("f"), 8, cppu::UnoType<Any>::get() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) //Any
};
pTable = aTable;
@@ -80,17 +80,17 @@ static Property * getPropertyTable2()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString("f"), 8, getCppuType( (Any *)0) ,
+ Property( OUString("f"), 8, cppu::UnoType<Any>::get() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Any
- Property( OUString("b"), 1, getCppuCharType( ),
+ Property( OUString("b"), 1, cppu::UnoType<cppu::UnoCharType>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
- Property( OUString("a"), 0, getCppuType( (OUString*)0),
+ Property( OUString("a"), 0, cppu::UnoType<OUString>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // OUString
- Property( OUString("d"), 5, getCppuType( (double*)0) ,
+ Property( OUString("d"), 5, cppu::UnoType<double>::get() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Double
Property( OUString("c"), 2, cppu::UnoType<sal_Int32>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // sal_Int32
- Property( OUString("e"), 7, getCppuBooleanType() ,
+ Property( OUString("e"), 7, cppu::UnoType<bool>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // Bool
};
pTable = aTable;
@@ -108,11 +108,11 @@ static Property * getPropertyTable3()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString("b"), 1, getCppuCharType( ),
+ Property( OUString("b"), 1, cppu::UnoType<cppu::UnoCharType>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
- Property( OUString("f"), 8, getCppuType( (Any *)0) ,
+ Property( OUString("f"), 8, cppu::UnoType<Any>::get() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // any
- Property( OUString("a"), 0, getCppuType( (OUString*)0),
+ Property( OUString("a"), 0, cppu::UnoType<OUString>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // OUString
};
pTable = aTable;
@@ -131,11 +131,11 @@ static Property * getPropertyTable4()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString("a"), 0, getCppuType( (OUString*)0),
+ Property( OUString("a"), 0, cppu::UnoType<OUString>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // OUString
- Property( OUString("b"), 1, getCppuCharType( ),
+ Property( OUString("b"), 1, cppu::UnoType<cppu::UnoCharType>::get(),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
- Property( OUString("f"), 2, getCppuType( (Any *)0) ,
+ Property( OUString("f"), 2, cppu::UnoType<Any>::get() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // Any
};
pTable = aTable;
@@ -407,9 +407,9 @@ Property * getBasicProps()
static Property aBasicProps[PROPERTY_COUNT] =
{
- Property( OUString("BOOL") , PROPERTY_BOOL , getCppuBooleanType(), PropertyAttribute::READONLY ),
+ Property( OUString("BOOL") , PROPERTY_BOOL , cppu::UnoType<bool>::get(), PropertyAttribute::READONLY ),
Property( OUString("INT16") , PROPERTY_INT16,
- getCppuType( (sal_Int16*)0 ), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ),
+ cppu::UnoType<sal_Int16>::get(), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ),
Property( OUString("INT32") , PROPERTY_INT32, cppu::UnoType<sal_Int32>::get(), PropertyAttribute::BOUND ),
Property( OUString("TEST") , 55 , cppu::UnoType<sal_Int32>::get(), PropertyAttribute::BOUND )
};
@@ -669,8 +669,8 @@ sal_Bool test_OPropertySetHelper::convertFastPropertyValue
if( b != bBOOL )
{
- rConvertedValue.setValue( &b , ::getCppuBooleanType() );
- rOldValue.setValue( & bBOOL , ::getCppuBooleanType() );
+ rConvertedValue.setValue( &b , cppu::UnoType<bool>::get() );
+ rOldValue.setValue( & bBOOL , cppu::UnoType<bool>::get() );
return sal_True;
}
else
@@ -750,7 +750,7 @@ void test_OPropertySetHelper::getFastPropertyValue( Any & rRet, sal_Int32 nHandl
switch( nHandle )
{
case PROPERTY_BOOL:
- rRet.setValue( &bBOOL , getCppuBooleanType() );
+ rRet.setValue( &bBOOL , cppu::UnoType<bool>::get() );
break;
case PROPERTY_INT16:
@@ -871,7 +871,7 @@ void test_PropertySetHelper()
// Readonly raises a vetoable exception
sal_Bool b = sal_True;
Any aBool;
- aBool.setValue( &b , getCppuBooleanType() );
+ aBool.setValue( &b , cppu::UnoType<bool>::get() );
xPS->setPropertyValue("BOOL", aBool );
OSL_FAIL( "PropertySetHelper: exception not thrown" );
}
@@ -884,7 +884,7 @@ void test_PropertySetHelper()
// Readonly raises a vetoable exception
sal_Bool b = sal_True;
Any aBool;
- aBool.setValue( &b , getCppuBooleanType() );
+ aBool.setValue( &b , cppu::UnoType<bool>::get() );
// BOOL i s0
pPS->setFastPropertyValue( PROPERTY_BOOL, aBool );
OSL_FAIL( "PropertySetHelper: exception not thrown" );
@@ -898,7 +898,7 @@ void test_PropertySetHelper()
{
sal_Bool b = sal_True;
Any aBool;
- aBool.setValue( &b , getCppuBooleanType() );
+ aBool.setValue( &b , cppu::UnoType<bool>::get() );
xPS->setPropertyValue("Does not exist", aBool );
OSL_FAIL( "PropertySetHelper: exception not thrown" );
}
@@ -910,7 +910,7 @@ void test_PropertySetHelper()
{
sal_Bool b = sal_True;
Any aBool;
- aBool.setValue( &b , getCppuBooleanType() );
+ aBool.setValue( &b , cppu::UnoType<bool>::get() );
pPS->setFastPropertyValue( 3, aBool );
OSL_FAIL( "PropertySetHelper: exception not thrown" );
}