Kaydet (Commit) f785d167 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Replace remaining getCppuType et al with cppu::UnoType

Change-Id: I2f084bd6de707d21857e2182aebb96b446b51dcc
üst 678196b9
...@@ -92,7 +92,7 @@ IMPL_IMPLEMENTATION_ID( ClassName ) \ ...@@ -92,7 +92,7 @@ IMPL_IMPLEMENTATION_ID( ClassName ) \
if( !pCollection ) \ if( !pCollection ) \
{ \ { \
static ::cppu::OTypeCollection collection( \ static ::cppu::OTypeCollection collection( \
getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider>* ) NULL ), cppu::UnoType<css::lang::XTypeProvider>::get(),
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
static ::com::sun::star::beans::Property aPropTable[] = static ::com::sun::star::beans::Property aPropTable[] =
{ {
::com::sun::star::beans::Property( OUString("Orientation"), PROPERTY_Orientation, cppu::UnoType<sal_Int16>::get(), 0 ), ::com::sun::star::beans::Property( OUString("Orientation"), PROPERTY_Orientation, cppu::UnoType<sal_Int16>::get(), 0 ),
::com::sun::star::beans::Property( OUString("Horizontal"), PROPERTY_Horizontal, ::getBooleanCppuType(), 0 ) ::com::sun::star::beans::Property( OUString("Horizontal"), PROPERTY_Horizontal, cppu::UnoType<bool>::get(), 0 )
}; };
pProperties = aPropTable; pProperties = aPropTable;
nElements = sizeof( aPropTable ) / sizeof( ::com::sun::star::beans::Property ); nElements = sizeof( aPropTable ) / sizeof( ::com::sun::star::beans::Property );
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
{ {
// retrieve the types of the aggregate // retrieve the types of the aggregate
Reference< XTypeProvider > xAggregateTypeProv; Reference< XTypeProvider > xAggregateTypeProv;
m_xAggregate->queryAggregation( ::getCppuType( &xAggregateTypeProv ) ) >>= xAggregateTypeProv; m_xAggregate->queryAggregation( cppu::UnoType<decltype(xAggregateTypeProv)>::get() ) >>= xAggregateTypeProv;
OSL_ENSURE( xAggregateTypeProv.is(), "OGeometryControlModel_Base::getTypes: aggregate should be a type provider!" ); OSL_ENSURE( xAggregateTypeProv.is(), "OGeometryControlModel_Base::getTypes: aggregate should be a type provider!" );
Sequence< Type > aAggTypes; Sequence< Type > aAggTypes;
if ( xAggregateTypeProv.is() ) if ( xAggregateTypeProv.is() )
...@@ -170,15 +170,15 @@ ...@@ -170,15 +170,15 @@
void OGeometryControlModel_Base::registerProperties() void OGeometryControlModel_Base::registerProperties()
{ {
// register our members for the property handling of the OPropertyContainer // register our members for the property handling of the OPropertyContainer
registerProperty(GCM_PROPERTY_POS_X, GCM_PROPERTY_ID_POS_X, DEFAULT_ATTRIBS(), &m_nPosX, ::getCppuType(&m_nPosX)); registerProperty(GCM_PROPERTY_POS_X, GCM_PROPERTY_ID_POS_X, DEFAULT_ATTRIBS(), &m_nPosX, cppu::UnoType<decltype(m_nPosX)>::get());
registerProperty(GCM_PROPERTY_POS_Y, GCM_PROPERTY_ID_POS_Y, DEFAULT_ATTRIBS(), &m_nPosY, ::getCppuType(&m_nPosY)); registerProperty(GCM_PROPERTY_POS_Y, GCM_PROPERTY_ID_POS_Y, DEFAULT_ATTRIBS(), &m_nPosY, cppu::UnoType<decltype(m_nPosY)>::get());
registerProperty(GCM_PROPERTY_WIDTH, GCM_PROPERTY_ID_WIDTH, DEFAULT_ATTRIBS(), &m_nWidth, ::getCppuType(&m_nWidth)); registerProperty(GCM_PROPERTY_WIDTH, GCM_PROPERTY_ID_WIDTH, DEFAULT_ATTRIBS(), &m_nWidth, cppu::UnoType<decltype(m_nWidth)>::get());
registerProperty(GCM_PROPERTY_HEIGHT, GCM_PROPERTY_ID_HEIGHT, DEFAULT_ATTRIBS(), &m_nHeight, ::getCppuType(&m_nHeight)); registerProperty(GCM_PROPERTY_HEIGHT, GCM_PROPERTY_ID_HEIGHT, DEFAULT_ATTRIBS(), &m_nHeight, cppu::UnoType<decltype(m_nHeight)>::get());
registerProperty(GCM_PROPERTY_NAME, GCM_PROPERTY_ID_NAME, DEFAULT_ATTRIBS(), &m_aName, ::getCppuType(&m_aName)); registerProperty(GCM_PROPERTY_NAME, GCM_PROPERTY_ID_NAME, DEFAULT_ATTRIBS(), &m_aName, cppu::UnoType<decltype(m_aName)>::get());
registerProperty(GCM_PROPERTY_TABINDEX, GCM_PROPERTY_ID_TABINDEX, DEFAULT_ATTRIBS(), &m_nTabIndex, ::getCppuType(&m_nTabIndex)); registerProperty(GCM_PROPERTY_TABINDEX, GCM_PROPERTY_ID_TABINDEX, DEFAULT_ATTRIBS(), &m_nTabIndex, cppu::UnoType<decltype(m_nTabIndex)>::get());
registerProperty(GCM_PROPERTY_STEP, GCM_PROPERTY_ID_STEP, DEFAULT_ATTRIBS(), &m_nStep, ::getCppuType(&m_nStep)); registerProperty(GCM_PROPERTY_STEP, GCM_PROPERTY_ID_STEP, DEFAULT_ATTRIBS(), &m_nStep, cppu::UnoType<decltype(m_nStep)>::get());
registerProperty(GCM_PROPERTY_TAG, GCM_PROPERTY_ID_TAG, DEFAULT_ATTRIBS(), &m_aTag, ::getCppuType(&m_aTag)); registerProperty(GCM_PROPERTY_TAG, GCM_PROPERTY_ID_TAG, DEFAULT_ATTRIBS(), &m_aTag, cppu::UnoType<decltype(m_aTag)>::get());
registerProperty(GCM_PROPERTY_RESOURCERESOLVER, GCM_PROPERTY_ID_RESOURCERESOLVER, DEFAULT_ATTRIBS(), &m_xStrResolver, ::getCppuType(&m_xStrResolver)); registerProperty(GCM_PROPERTY_RESOURCERESOLVER, GCM_PROPERTY_ID_RESOURCERESOLVER, DEFAULT_ATTRIBS(), &m_xStrResolver, cppu::UnoType<decltype(m_xStrResolver)>::get());
} }
...@@ -364,7 +364,7 @@ ...@@ -364,7 +364,7 @@
// let the aggregate create it's own clone // let the aggregate create it's own clone
// the interface // the interface
Reference< XCloneable > xCloneAccess; Reference< XCloneable > xCloneAccess;
m_xAggregate->queryAggregation(::getCppuType(&xCloneAccess)) >>= xCloneAccess; m_xAggregate->queryAggregation(cppu::UnoType<decltype(xCloneAccess)>::get()) >>= xCloneAccess;
OSL_ENSURE(xCloneAccess.is(), "OGeometryControlModel_Base::createClone: suspicious aggregate!"); OSL_ENSURE(xCloneAccess.is(), "OGeometryControlModel_Base::createClone: suspicious aggregate!");
if (!xCloneAccess.is()) if (!xCloneAccess.is())
return Reference< XCloneable >(); return Reference< XCloneable >();
......
...@@ -31,22 +31,22 @@ ORoadmapEntry::ORoadmapEntry() : ORoadmapEntry_Base( ) ...@@ -31,22 +31,22 @@ ORoadmapEntry::ORoadmapEntry() : ORoadmapEntry_Base( )
registerProperty( OUString("Label"), RM_PROPERTY_ID_LABEL, registerProperty( OUString("Label"), RM_PROPERTY_ID_LABEL,
::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::BOUND |
::com::sun::star::beans::PropertyAttribute::CONSTRAINED, ::com::sun::star::beans::PropertyAttribute::CONSTRAINED,
& m_sLabel, ::getCppuType( &m_sLabel ) ); & m_sLabel, cppu::UnoType<decltype(m_sLabel)>::get() );
m_nID = -1; m_nID = -1;
registerProperty( OUString("ID"), RM_PROPERTY_ID_ID, registerProperty( OUString("ID"), RM_PROPERTY_ID_ID,
::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::BOUND |
::com::sun::star::beans::PropertyAttribute::CONSTRAINED, ::com::sun::star::beans::PropertyAttribute::CONSTRAINED,
& m_nID, ::getCppuType( &m_nID ) ); & m_nID, cppu::UnoType<decltype(m_nID)>::get() );
m_bEnabled = true; m_bEnabled = true;
registerProperty( OUString("Enabled"), RM_PROPERTY_ID_ENABLED, registerProperty( OUString("Enabled"), RM_PROPERTY_ID_ENABLED,
::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::BOUND |
::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT, ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT,
& m_bEnabled, ::getCppuType( &m_bEnabled ) ); & m_bEnabled, cppu::UnoType<decltype(m_bEnabled)>::get() );
registerProperty( OUString("Interactive"), RM_PROPERTY_ID_INTERACTIVE, registerProperty( OUString("Interactive"), RM_PROPERTY_ID_INTERACTIVE,
::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::BOUND |
::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT, ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT,
& m_bInteractive, ::getCppuType( &m_bInteractive ) ); & m_bInteractive, cppu::UnoType<decltype(m_bInteractive)>::get() );
......
...@@ -179,7 +179,7 @@ Reference< XWindowPeer > UnoControl::ImplGetCompatiblePeer( bool bAcceptExist ...@@ -179,7 +179,7 @@ Reference< XWindowPeer > UnoControl::ImplGetCompatiblePeer( bool bAcceptExist
// queryInterface ourself, to allow aggregation // queryInterface ourself, to allow aggregation
Reference< XControl > xMe; Reference< XControl > xMe;
OWeakAggObject::queryInterface( ::getCppuType( &xMe ) ) >>= xMe; OWeakAggObject::queryInterface( cppu::UnoType<decltype(xMe)>::get() ) >>= xMe;
vcl::Window* pParentWindow( NULL ); vcl::Window* pParentWindow( NULL );
{ {
...@@ -1332,7 +1332,7 @@ sal_Bool UnoControl::setModel( const Reference< XControlModel >& rxModel ) throw ...@@ -1332,7 +1332,7 @@ sal_Bool UnoControl::setModel( const Reference< XControlModel >& rxModel ) throw
// query for the XPropertiesChangeListener - our delegator is allowed to overwrite this interface // query for the XPropertiesChangeListener - our delegator is allowed to overwrite this interface
Reference< XPropertiesChangeListener > xListener; Reference< XPropertiesChangeListener > xListener;
queryInterface( ::getCppuType( &xListener ) ) >>= xListener; queryInterface( cppu::UnoType<decltype(xListener)>::get() ) >>= xListener;
if( xPropSet.is() ) if( xPropSet.is() )
xPropSet->removePropertiesChangeListener( xListener ); xPropSet->removePropertiesChangeListener( xListener );
......
...@@ -789,7 +789,7 @@ void UnoControlModel::read( const ::com::sun::star::uno::Reference< ::com::sun:: ...@@ -789,7 +789,7 @@ void UnoControlModel::read( const ::com::sun::star::uno::Reference< ::com::sun::
if ( maData.find( nPropId ) != maData.end() ) if ( maData.find( nPropId ) != maData.end() )
{ {
const ::com::sun::star::uno::Type* pType = GetPropertyType( nPropId ); const ::com::sun::star::uno::Type* pType = GetPropertyType( nPropId );
if ( *pType == ::getBooleanCppuType() ) if ( *pType == cppu::UnoType<bool>::get() )
{ {
bool b = InStream->readBoolean(); bool b = InStream->readBoolean();
aValue <<= b; aValue <<= b;
......
...@@ -80,16 +80,16 @@ struct ImplPropertyInfo ...@@ -80,16 +80,16 @@ struct ImplPropertyInfo
}; };
#define DECL_PROP_1( asciiname, id, type, attrib1 ) \ #define DECL_PROP_1( asciiname, id, type, attrib1 ) \
ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 ) ImplPropertyInfo( asciiname, BASEPROPERTY_##id, cppu::UnoType<type>::get(), ::com::sun::star::beans::PropertyAttribute::attrib1 )
#define DECL_PROP_2( asciiname, id, type, attrib1, attrib2 ) \ #define DECL_PROP_2( asciiname, id, type, attrib1, attrib2 ) \
ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 ) ImplPropertyInfo( asciiname, BASEPROPERTY_##id, cppu::UnoType<type>::get(), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 )
#define DECL_PROP_3( asciiname, id, type, attrib1, attrib2, attrib3 ) \ #define DECL_PROP_3( asciiname, id, type, attrib1, attrib2, attrib3 ) \
ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3 ) ImplPropertyInfo( asciiname, BASEPROPERTY_##id, cppu::UnoType<type>::get(), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3 )
#define DECL_DEP_PROP_2( asciiname, id, type, attrib1, attrib2 ) \ #define DECL_DEP_PROP_2( asciiname, id, type, attrib1, attrib2 ) \
ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2, true ) ImplPropertyInfo( asciiname, BASEPROPERTY_##id, cppu::UnoType<type>::get(), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2, true )
#define DECL_DEP_PROP_3( asciiname, id, type, attrib1, attrib2, attrib3 ) \ #define DECL_DEP_PROP_3( asciiname, id, type, attrib1, attrib2, attrib3 ) \
ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3, true ) ImplPropertyInfo( asciiname, BASEPROPERTY_##id, cppu::UnoType<type>::get(), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3, true )
ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment