Replace remaining getCppuType et al with cppu::UnoType

Change-Id: Ifd082fb63b791441a9af595e02f6ce1732d36ab0
This commit is contained in:
Stephan Bergmann 2015-04-01 08:39:17 +02:00
parent 5a043b09c6
commit cf42ba089f
15 changed files with 30 additions and 30 deletions

View File

@ -1647,7 +1647,7 @@ sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOl
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAllowDelete); bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAllowDelete);
break; break;
case PROPERTY_ID_DYNAMIC_CONTROL_BORDER: case PROPERTY_ID_DYNAMIC_CONTROL_BORDER:
bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aDynamicControlBorder, ::getBooleanCppuType() ); bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aDynamicControlBorder, cppu::UnoType<bool>::get() );
break; break;
case PROPERTY_ID_CONTROL_BORDER_COLOR_FOCUS: case PROPERTY_ID_CONTROL_BORDER_COLOR_FOCUS:
bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorFocus, cppu::UnoType<sal_Int32>::get() ); bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorFocus, cppu::UnoType<sal_Int32>::get() );

View File

@ -197,7 +197,7 @@ void OEditControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw (
// Not for multiline edits // Not for multiline edits
Any aTmp( xSet->getPropertyValue(PROPERTY_MULTILINE)); Any aTmp( xSet->getPropertyValue(PROPERTY_MULTILINE));
if ((aTmp.getValueType().equals(::getBooleanCppuType())) && getBOOL(aTmp)) if ((aTmp.getValueType().equals(cppu::UnoType<bool>::get())) && getBOOL(aTmp))
return; return;
Reference<XFormComponent> xFComp(xSet, UNO_QUERY); Reference<XFormComponent> xFComp(xSet, UNO_QUERY);

View File

@ -57,7 +57,7 @@ Sequence<Type> OFileControlModel::_getTypes()
Sequence<Type> aOwnTypes(1); Sequence<Type> aOwnTypes(1);
Type* pOwnTypes = aOwnTypes.getArray(); Type* pOwnTypes = aOwnTypes.getArray();
pOwnTypes[0] = getCppuType((Reference<XReset>*)NULL); pOwnTypes[0] = cppu::UnoType<XReset>::get();
aTypes = concatSequences(aBaseClassTypes, aOwnTypes); aTypes = concatSequences(aBaseClassTypes, aOwnTypes);
} }

View File

@ -1003,7 +1003,7 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A
_rValue >>= m_aTag; _rValue >>= m_aTag;
break; break;
case PROPERTY_ID_TABINDEX: case PROPERTY_ID_TABINDEX:
DBG_ASSERT(_rValue.getValueType() == getCppuType((const sal_Int16*)NULL), DBG_ASSERT(_rValue.getValueType() == cppu::UnoType<sal_Int16>::get(),
"OControlModel::setFastPropertyValue_NoBroadcast : invalid type" ); "OControlModel::setFastPropertyValue_NoBroadcast : invalid type" );
_rValue >>= m_nTabIndex; _rValue >>= m_nTabIndex;
break; break;
@ -1038,7 +1038,7 @@ void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) con
DECL_PROP1 (TAG, OUString, BOUND); DECL_PROP1 (TAG, OUString, BOUND);
DECL_PROP1 (GENERATEVBAEVENTS, sal_Bool, TRANSIENT); DECL_PROP1 (GENERATEVBAEVENTS, sal_Bool, TRANSIENT);
DECL_PROP1 (CONTROL_TYPE_IN_MSO,sal_Int16, BOUND); DECL_PROP1 (CONTROL_TYPE_IN_MSO,sal_Int16, BOUND);
DECL_PROP1 (OBJ_ID_IN_MSO,sal_uInt16, BOUND); DECL_PROP1 (OBJ_ID_IN_MSO,cppu::UnoUnsignedShortType, BOUND);
END_DESCRIBE_PROPERTIES() END_DESCRIBE_PROPERTIES()
} }

View File

@ -530,7 +530,7 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any&
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bPrintable); bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bPrintable);
break; break;
case PROPERTY_ID_TABSTOP: case PROPERTY_ID_TABSTOP:
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aTabStop, ::getBooleanCppuType()); bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aTabStop, cppu::UnoType<bool>::get());
break; break;
case PROPERTY_ID_HASNAVIGATION: case PROPERTY_ID_HASNAVIGATION:
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bNavigation); bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bNavigation);

View File

@ -359,7 +359,7 @@ namespace frm
break; break;
#endif #endif
case PROPERTY_ID_DEFAULT_SELECT_SEQ : case PROPERTY_ID_DEFAULT_SELECT_SEQ :
DBG_ASSERT(_rValue.getValueType().equals(::getCppuType(static_cast< Sequence<sal_Int16>*>(0))), DBG_ASSERT(_rValue.getValueType().equals(cppu::UnoType<Sequence<sal_Int16>>::get()),
"OListBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" ); "OListBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
_rValue >>= m_aDefaultSelectSeq; _rValue >>= m_aDefaultSelectSeq;
@ -1660,11 +1660,11 @@ namespace frm
Sequence< Type > OListBoxModel::getSupportedBindingTypes() Sequence< Type > OListBoxModel::getSupportedBindingTypes()
{ {
Sequence< Type > aTypes(6); Sequence< Type > aTypes(6);
aTypes[0] = ::getCppuType( static_cast< Sequence< Any >* >( NULL ) ); aTypes[0] = cppu::UnoType<Sequence< Any >>::get();
aTypes[1] = cppu::UnoType<Any>::get(); aTypes[1] = cppu::UnoType<Any>::get();
aTypes[2] = ::getCppuType( static_cast< Sequence< sal_Int32 >* >( NULL ) ); aTypes[2] = cppu::UnoType<Sequence< sal_Int32 >>::get();
aTypes[3] = cppu::UnoType<sal_Int32>::get(); aTypes[3] = cppu::UnoType<sal_Int32>::get();
aTypes[4] = ::getCppuType( static_cast< Sequence< OUString >* >( NULL ) ); aTypes[4] = cppu::UnoType<Sequence< OUString >>::get();
aTypes[5] = cppu::UnoType<OUString>::get(); aTypes[5] = cppu::UnoType<OUString>::get();
return aTypes; return aTypes;
} }

View File

@ -273,7 +273,7 @@ namespace frm
case PROPERTY_ID_FONT: case PROPERTY_ID_FONT:
{ {
Any aWorkAroundGccLimitation = makeAny( m_aFont ); Any aWorkAroundGccLimitation = makeAny( m_aFont );
bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, aWorkAroundGccLimitation, ::getCppuType( &m_aFont ) ); bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, aWorkAroundGccLimitation, cppu::UnoType<decltype(m_aFont)>::get() );
} }
break; break;

View File

@ -42,7 +42,7 @@ namespace frm
#define REGISTER_VOID_PROP( prop, memberAny, type ) \ #define REGISTER_VOID_PROP( prop, memberAny, type ) \
registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT | PropertyAttribute::MAYBEVOID, \ registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT | PropertyAttribute::MAYBEVOID, \
&memberAny, ::getCppuType( static_cast< type* >( NULL ) ) ); &memberAny, cppu::UnoType<type>::get() );
ONavigationBarModel::ONavigationBarModel( const Reference< XComponentContext >& _rxFactory ) ONavigationBarModel::ONavigationBarModel( const Reference< XComponentContext >& _rxFactory )
:OControlModel( _rxFactory, OUString() ) :OControlModel( _rxFactory, OUString() )

View File

@ -103,15 +103,15 @@ public:
#define DECL_PROP_IMPL(varname, type) \ #define DECL_PROP_IMPL(varname, type) \
*pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, ::getCppuType(static_cast< type* >(0)), *pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, cppu::UnoType<type>::get(),
#define DECL_BOOL_PROP_IMPL(varname) \ #define DECL_BOOL_PROP_IMPL(varname) \
*pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, ::getBooleanCppuType(), *pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, cppu::UnoType<bool>::get(),
#define DECL_IFACE_PROP_IMPL(varname, type) \ #define DECL_IFACE_PROP_IMPL(varname, type) \
*pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, ::getCppuType(static_cast< com::sun::star::uno::Reference< type >* >(0)), *pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, cppu::UnoType<type>::get(),
#define BEGIN_DESCRIBE_PROPERTIES( count, baseclass ) \ #define BEGIN_DESCRIBE_PROPERTIES( count, baseclass ) \
@ -202,24 +202,24 @@ public:
#define REGISTER_PROP_1( prop, member, attrib1 ) \ #define REGISTER_PROP_1( prop, member, attrib1 ) \
registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1, \ registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1, \
&member, ::getCppuType( &member ) ); &member, cppu::UnoType<decltype(member)>::get() );
#define REGISTER_PROP_2( prop, member, attrib1, attrib2 ) \ #define REGISTER_PROP_2( prop, member, attrib1, attrib2 ) \
registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \ registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \
&member, ::getCppuType( &member ) ); &member, cppu::UnoType<decltype(member)>::get() );
#define REGISTER_PROP_3( prop, member, attrib1, attrib2, attrib3 ) \ #define REGISTER_PROP_3( prop, member, attrib1, attrib2, attrib3 ) \
registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1 | PropertyAttribute::attrib2 | PropertyAttribute::attrib3, \ registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1 | PropertyAttribute::attrib2 | PropertyAttribute::attrib3, \
&member, ::getCppuType( &member ) ); &member, cppu::UnoType<decltype(member)>::get() );
#define REGISTER_VOID_PROP_1( prop, memberAny, type, attrib1 ) \ #define REGISTER_VOID_PROP_1( prop, memberAny, type, attrib1 ) \
registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::MAYBEVOID | PropertyAttribute::attrib1, \ registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::MAYBEVOID | PropertyAttribute::attrib1, \
&memberAny, ::getCppuType( static_cast< type* >( NULL ) ) ); &memberAny, cppu::UnoType<type>::get() );
#define REGISTER_VOID_PROP_2( prop, memberAny, type, attrib1, attrib2 ) \ #define REGISTER_VOID_PROP_2( prop, memberAny, type, attrib1, attrib2 ) \
registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::MAYBEVOID | PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \ registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::MAYBEVOID | PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \
&memberAny, ::getCppuType( static_cast< type* >( NULL ) ) ); &memberAny, cppu::UnoType<type>::get() );
} }

View File

@ -100,7 +100,7 @@ public:
virtual com::sun::star::uno::Type SAL_CALL getElementType() virtual com::sun::star::uno::Type SAL_CALL getElementType()
throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE
{ {
return getCppuType( static_cast<T*>( NULL ) ); return cppu::UnoType<T>::get();
} }
virtual sal_Bool SAL_CALL hasElements() virtual sal_Bool SAL_CALL hasElements()

View File

@ -160,7 +160,7 @@ public:
virtual Type_t SAL_CALL getElementType() virtual Type_t SAL_CALL getElementType()
throw( RuntimeException_t, std::exception ) SAL_OVERRIDE throw( RuntimeException_t, std::exception ) SAL_OVERRIDE
{ {
return getCppuType( static_cast<T*>( NULL ) ); return cppu::UnoType<T>::get();
} }
virtual sal_Bool SAL_CALL hasElements() virtual sal_Bool SAL_CALL hasElements()

View File

@ -52,7 +52,7 @@ Convert::Convert()
init(); init();
} }
#define ADD_ENTRY(XCONVERT,TYPE) XCONVERT->maMap[ getCppuType( static_cast<TYPE*>( NULL ) ) ] = Convert_t( &lcl_toXSD_##TYPE, &lcl_toAny_##TYPE ) #define ADD_ENTRY(XCONVERT,TYPE) XCONVERT->maMap[ cppu::UnoType<TYPE>::get() ] = Convert_t( &lcl_toXSD_##TYPE, &lcl_toAny_##TYPE )
namespace namespace
{ {

View File

@ -74,12 +74,12 @@ namespace xforms
void OXSDDataType::registerProperties() void OXSDDataType::registerProperties()
{ {
registerProperty( PROPERTY_NAME, PROPERTY_ID_NAME, BOUND, &m_sName, ::getCppuType( &m_sName ) ); registerProperty( PROPERTY_NAME, PROPERTY_ID_NAME, BOUND, &m_sName, cppu::UnoType<decltype(m_sName)>::get() );
registerProperty( PROPERTY_XSD_WHITESPACE, PROPERTY_ID_XSD_WHITESPACE, BOUND, &m_nWST, ::getCppuType( &m_nWST ) ); registerProperty( PROPERTY_XSD_WHITESPACE, PROPERTY_ID_XSD_WHITESPACE, BOUND, &m_nWST, cppu::UnoType<cppu::UnoUnsignedShortType>::get() );
registerProperty( PROPERTY_XSD_PATTERN, PROPERTY_ID_XSD_PATTERN, BOUND, &m_sPattern, ::getCppuType( &m_sPattern ) ); registerProperty( PROPERTY_XSD_PATTERN, PROPERTY_ID_XSD_PATTERN, BOUND, &m_sPattern, cppu::UnoType<decltype(m_sPattern)>::get() );
registerProperty( PROPERTY_XSD_IS_BASIC, PROPERTY_ID_XSD_IS_BASIC, READONLY, &m_bIsBasic, ::getCppuType( &m_bIsBasic ) ); registerProperty( PROPERTY_XSD_IS_BASIC, PROPERTY_ID_XSD_IS_BASIC, READONLY, &m_bIsBasic, cppu::UnoType<decltype(m_bIsBasic)>::get() );
registerProperty( PROPERTY_XSD_TYPE_CLASS, PROPERTY_ID_XSD_TYPE_CLASS, READONLY, &m_nTypeClass, ::getCppuType( &m_nTypeClass ) ); registerProperty( PROPERTY_XSD_TYPE_CLASS, PROPERTY_ID_XSD_TYPE_CLASS, READONLY, &m_nTypeClass, cppu::UnoType<decltype(m_nTypeClass)>::get() );
} }

View File

@ -154,7 +154,7 @@ namespace xforms
#define REGISTER_VOID_PROP( prop, memberAny, type ) \ #define REGISTER_VOID_PROP( prop, memberAny, type ) \
registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, ::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, \ registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, ::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, \
&memberAny, ::getCppuType( static_cast< type* >( NULL ) ) ); &memberAny, cppu::UnoType<type>::get() );
class OValueLimitedType_Base : public OXSDDataType class OValueLimitedType_Base : public OXSDDataType
{ {

View File

@ -350,7 +350,7 @@ public:
#define PROPERTY_FLAGS( NAME, TYPE, FLAG ) com::sun::star::beans::Property( \ #define PROPERTY_FLAGS( NAME, TYPE, FLAG ) com::sun::star::beans::Property( \
OUString( #NAME, sizeof( #NAME ) - 1, RTL_TEXTENCODING_ASCII_US ), \ OUString( #NAME, sizeof( #NAME ) - 1, RTL_TEXTENCODING_ASCII_US ), \
HANDLE_##NAME, getCppuType( static_cast< TYPE* >( NULL ) ), FLAG ) HANDLE_##NAME, cppu::UnoType<TYPE>::get(), FLAG )
#define PROPERTY( NAME, TYPE ) PROPERTY_FLAGS( NAME, TYPE, com::sun::star::beans::PropertyAttribute::BOUND ) #define PROPERTY( NAME, TYPE ) PROPERTY_FLAGS( NAME, TYPE, com::sun::star::beans::PropertyAttribute::BOUND )
#define PROPERTY_RO( NAME, TYPE ) PROPERTY_FLAGS( NAME, TYPE, com::sun::star::beans::PropertyAttribute::BOUND | com::sun::star::beans::PropertyAttribute::READONLY ) #define PROPERTY_RO( NAME, TYPE ) PROPERTY_FLAGS( NAME, TYPE, com::sun::star::beans::PropertyAttribute::BOUND | com::sun::star::beans::PropertyAttribute::READONLY )