summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-01 08:39:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-01 08:39:17 +0200
commitcf42ba089f05b02cadb7bde501eb703d3ea3e44f (patch)
treee1a2cabddd4076977cdc52b04087022b457da8b8 /forms
parent5a043b09c6af2995ac75245118cb915d250d442a (diff)
Replace remaining getCppuType et al with cppu::UnoType
Change-Id: Ifd082fb63b791441a9af595e02f6ce1732d36ab0
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx2
-rw-r--r--forms/source/component/Edit.cxx2
-rw-r--r--forms/source/component/File.cxx2
-rw-r--r--forms/source/component/FormComponent.cxx4
-rw-r--r--forms/source/component/Grid.cxx2
-rw-r--r--forms/source/component/ListBox.cxx8
-rw-r--r--forms/source/component/formcontrolfont.cxx2
-rw-r--r--forms/source/component/navigationbar.cxx2
-rw-r--r--forms/source/inc/property.hxx16
-rw-r--r--forms/source/xforms/NameContainer.hxx2
-rw-r--r--forms/source/xforms/collection.hxx2
-rw-r--r--forms/source/xforms/convert.cxx2
-rw-r--r--forms/source/xforms/datatypes.cxx10
-rw-r--r--forms/source/xforms/datatypes.hxx2
-rw-r--r--forms/source/xforms/propertysetbase.hxx2
15 files changed, 30 insertions, 30 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 672e7c489ec3..225967cbfe77 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1647,7 +1647,7 @@ sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOl
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bAllowDelete);
break;
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;
case PROPERTY_ID_CONTROL_BORDER_COLOR_FOCUS:
bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorFocus, cppu::UnoType<sal_Int32>::get() );
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index 4b0472ae1b45..f4aced15587a 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -197,7 +197,7 @@ void OEditControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw (
// Not for multiline edits
Any aTmp( xSet->getPropertyValue(PROPERTY_MULTILINE));
- if ((aTmp.getValueType().equals(::getBooleanCppuType())) && getBOOL(aTmp))
+ if ((aTmp.getValueType().equals(cppu::UnoType<bool>::get())) && getBOOL(aTmp))
return;
Reference<XFormComponent> xFComp(xSet, UNO_QUERY);
diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index c42625775b93..015a9fb641d8 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -57,7 +57,7 @@ Sequence<Type> OFileControlModel::_getTypes()
Sequence<Type> aOwnTypes(1);
Type* pOwnTypes = aOwnTypes.getArray();
- pOwnTypes[0] = getCppuType((Reference<XReset>*)NULL);
+ pOwnTypes[0] = cppu::UnoType<XReset>::get();
aTypes = concatSequences(aBaseClassTypes, aOwnTypes);
}
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index ca893dae1def..3e22d71ee8cc 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -1003,7 +1003,7 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A
_rValue >>= m_aTag;
break;
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" );
_rValue >>= m_nTabIndex;
break;
@@ -1038,7 +1038,7 @@ void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) con
DECL_PROP1 (TAG, OUString, BOUND);
DECL_PROP1 (GENERATEVBAEVENTS, sal_Bool, TRANSIENT);
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()
}
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index c33afe9b605d..ea95beb2733d 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -530,7 +530,7 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any&
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bPrintable);
break;
case PROPERTY_ID_TABSTOP:
- bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aTabStop, ::getBooleanCppuType());
+ bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aTabStop, cppu::UnoType<bool>::get());
break;
case PROPERTY_ID_HASNAVIGATION:
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bNavigation);
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index e0b593c19495..f9d856b28ecc 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -359,7 +359,7 @@ namespace frm
break;
#endif
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 !" );
_rValue >>= m_aDefaultSelectSeq;
@@ -1660,11 +1660,11 @@ namespace frm
Sequence< Type > OListBoxModel::getSupportedBindingTypes()
{
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[2] = ::getCppuType( static_cast< Sequence< sal_Int32 >* >( NULL ) );
+ aTypes[2] = cppu::UnoType<Sequence< 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();
return aTypes;
}
diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx
index 474e3d4f048b..7130e23e5abe 100644
--- a/forms/source/component/formcontrolfont.cxx
+++ b/forms/source/component/formcontrolfont.cxx
@@ -273,7 +273,7 @@ namespace frm
case PROPERTY_ID_FONT:
{
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;
diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx
index c52d1b6e0fcd..acc4c37844dd 100644
--- a/forms/source/component/navigationbar.cxx
+++ b/forms/source/component/navigationbar.cxx
@@ -42,7 +42,7 @@ namespace frm
#define REGISTER_VOID_PROP( prop, memberAny, type ) \
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 )
:OControlModel( _rxFactory, OUString() )
diff --git a/forms/source/inc/property.hxx b/forms/source/inc/property.hxx
index c55af0bbedf9..02c5567d2e1b 100644
--- a/forms/source/inc/property.hxx
+++ b/forms/source/inc/property.hxx
@@ -103,15 +103,15 @@ public:
#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) \
- *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) \
- *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 ) \
@@ -202,24 +202,24 @@ public:
#define REGISTER_PROP_1( prop, member, 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 ) \
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 ) \
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 ) \
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 ) \
registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::MAYBEVOID | PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \
- &memberAny, ::getCppuType( static_cast< type* >( NULL ) ) );
+ &memberAny, cppu::UnoType<type>::get() );
}
diff --git a/forms/source/xforms/NameContainer.hxx b/forms/source/xforms/NameContainer.hxx
index 9f70e3cddf2f..113a00568ab5 100644
--- a/forms/source/xforms/NameContainer.hxx
+++ b/forms/source/xforms/NameContainer.hxx
@@ -100,7 +100,7 @@ public:
virtual com::sun::star::uno::Type SAL_CALL getElementType()
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()
diff --git a/forms/source/xforms/collection.hxx b/forms/source/xforms/collection.hxx
index b5ac0983aff7..13ad182ccb34 100644
--- a/forms/source/xforms/collection.hxx
+++ b/forms/source/xforms/collection.hxx
@@ -160,7 +160,7 @@ public:
virtual Type_t SAL_CALL getElementType()
throw( RuntimeException_t, std::exception ) SAL_OVERRIDE
{
- return getCppuType( static_cast<T*>( NULL ) );
+ return cppu::UnoType<T>::get();
}
virtual sal_Bool SAL_CALL hasElements()
diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index 4dee77454adc..be41419df6ea 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -52,7 +52,7 @@ Convert::Convert()
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
{
diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index f3a156c3bcea..ab3ea3c27eae 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -74,12 +74,12 @@ namespace xforms
void OXSDDataType::registerProperties()
{
- registerProperty( PROPERTY_NAME, PROPERTY_ID_NAME, BOUND, &m_sName, ::getCppuType( &m_sName ) );
- registerProperty( PROPERTY_XSD_WHITESPACE, PROPERTY_ID_XSD_WHITESPACE, BOUND, &m_nWST, ::getCppuType( &m_nWST ) );
- registerProperty( PROPERTY_XSD_PATTERN, PROPERTY_ID_XSD_PATTERN, BOUND, &m_sPattern, ::getCppuType( &m_sPattern ) );
+ 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, cppu::UnoType<cppu::UnoUnsignedShortType>::get() );
+ 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_TYPE_CLASS, PROPERTY_ID_XSD_TYPE_CLASS, READONLY, &m_nTypeClass, ::getCppuType( &m_nTypeClass ) );
+ 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, cppu::UnoType<decltype(m_nTypeClass)>::get() );
}
diff --git a/forms/source/xforms/datatypes.hxx b/forms/source/xforms/datatypes.hxx
index a2422bea6ac8..67e00853616c 100644
--- a/forms/source/xforms/datatypes.hxx
+++ b/forms/source/xforms/datatypes.hxx
@@ -154,7 +154,7 @@ namespace xforms
#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, \
- &memberAny, ::getCppuType( static_cast< type* >( NULL ) ) );
+ &memberAny, cppu::UnoType<type>::get() );
class OValueLimitedType_Base : public OXSDDataType
{
diff --git a/forms/source/xforms/propertysetbase.hxx b/forms/source/xforms/propertysetbase.hxx
index 8b70d7a41889..fd07fc8acb15 100644
--- a/forms/source/xforms/propertysetbase.hxx
+++ b/forms/source/xforms/propertysetbase.hxx
@@ -350,7 +350,7 @@ public:
#define PROPERTY_FLAGS( NAME, TYPE, FLAG ) com::sun::star::beans::Property( \
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_RO( NAME, TYPE ) PROPERTY_FLAGS( NAME, TYPE, com::sun::star::beans::PropertyAttribute::BOUND | com::sun::star::beans::PropertyAttribute::READONLY )