summaryrefslogtreecommitdiff
path: root/extensions/source/propctrlr
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-11 10:09:04 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-11 10:16:42 +0200
commitbd596286207adf06936939a3ef8018efc1055591 (patch)
treedc8e079155868ffbc5d023f04620c83f402dc6c2 /extensions/source/propctrlr
parentbe44f0e91b6061f6bbe6b4da2f264eed70fb6542 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part10
Change-Id: I67acda35fa127547dcea0cd18c9dc16db7c00294
Diffstat (limited to 'extensions/source/propctrlr')
-rw-r--r--extensions/source/propctrlr/buttonnavigationhandler.cxx2
-rw-r--r--extensions/source/propctrlr/cellbindinghandler.cxx8
-rw-r--r--extensions/source/propctrlr/eformspropertyhandler.cxx4
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx2
-rw-r--r--extensions/source/propctrlr/formcontroller.cxx2
-rw-r--r--extensions/source/propctrlr/propertyhandler.hxx14
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx14
-rw-r--r--extensions/source/propctrlr/submissionhandler.cxx4
-rw-r--r--extensions/source/propctrlr/usercontrol.cxx6
9 files changed, 28 insertions, 28 deletions
diff --git a/extensions/source/propctrlr/buttonnavigationhandler.cxx b/extensions/source/propctrlr/buttonnavigationhandler.cxx
index 9e8de62367f0..46b72ff0a729 100644
--- a/extensions/source/propctrlr/buttonnavigationhandler.cxx
+++ b/extensions/source/propctrlr/buttonnavigationhandler.cxx
@@ -187,7 +187,7 @@ namespace pcr
if ( isNavigationCapableButton( m_xComponent ) )
{
addStringPropertyDescription( aProperties, PROPERTY_TARGET_URL );
- implAddPropertyDescription( aProperties, PROPERTY_BUTTONTYPE, ::getCppuType( static_cast< sal_Int32* >( NULL ) ) );
+ implAddPropertyDescription( aProperties, PROPERTY_BUTTONTYPE, ::cppu::UnoType<sal_Int32>::get() );
}
if ( aProperties.empty() )
diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx
index 3b72cd1db250..5782ff8cea52 100644
--- a/extensions/source/propctrlr/cellbindinghandler.cxx
+++ b/extensions/source/propctrlr/cellbindinghandler.cxx
@@ -55,7 +55,7 @@ namespace pcr
CellBindingPropertyHandler::CellBindingPropertyHandler( const Reference< XComponentContext >& _rxContext )
:CellBindingPropertyHandler_Base( _rxContext )
- ,m_pCellExchangeConverter( new DefaultEnumRepresentation( *m_pInfoService, ::getCppuType( static_cast< sal_Int16* >( NULL ) ), PROPERTY_ID_CELL_EXCHANGE_TYPE ) )
+ ,m_pCellExchangeConverter( new DefaultEnumRepresentation( *m_pInfoService, ::cppu::UnoType<sal_Int16>::get(), PROPERTY_ID_CELL_EXCHANGE_TYPE ) )
{
}
@@ -466,17 +466,17 @@ namespace pcr
if ( bAllowCellLinking )
{
aProperties[ --nPos ] = Property( PROPERTY_BOUND_CELL, PROPERTY_ID_BOUND_CELL,
- ::getCppuType( static_cast< OUString* >( NULL ) ), 0 );
+ ::cppu::UnoType<OUString>::get(), 0 );
}
if ( bAllowCellIntLinking )
{
aProperties[ --nPos ] = Property( PROPERTY_CELL_EXCHANGE_TYPE, PROPERTY_ID_CELL_EXCHANGE_TYPE,
- ::getCppuType( static_cast< sal_Int16* >( NULL ) ), 0 );
+ ::cppu::UnoType<sal_Int16>::get(), 0 );
}
if ( bAllowListCellRange )
{
aProperties[ --nPos ] = Property( PROPERTY_LIST_CELL_RANGE, PROPERTY_ID_LIST_CELL_RANGE,
- ::getCppuType( static_cast< OUString* >( NULL ) ), 0 );
+ ::cppu::UnoType<OUString>::get(), 0 );
}
}
diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx
index e51ae8a48078..d052ea3a8f1d 100644
--- a/extensions/source/propctrlr/eformspropertyhandler.cxx
+++ b/extensions/source/propctrlr/eformspropertyhandler.cxx
@@ -129,7 +129,7 @@ namespace pcr
if ( xBindingProps.is() )
{
aReturn = xBindingProps->getPropertyValue( _rPropertyName );
- DBG_ASSERT( aReturn.getValueType().equals( ::getCppuType( static_cast< OUString* >( NULL ) ) ),
+ DBG_ASSERT( aReturn.getValueType().equals( ::cppu::UnoType<OUString>::get() ),
"EFormsPropertyHandler::getPropertyValue: invalid BindingExpression value type!" );
}
else
@@ -246,7 +246,7 @@ namespace pcr
DBG_ASSERT( xBindingProps.is(), "EFormsPropertyHandler::setPropertyValue: how can I set a property if there's no binding?" );
if ( xBindingProps.is() )
{
- DBG_ASSERT( _rValue.getValueType().equals( ::getCppuType( static_cast< OUString* >( NULL ) ) ),
+ DBG_ASSERT( _rValue.getValueType().equals( ::cppu::UnoType<OUString>::get() ),
"EFormsPropertyHandler::setPropertyValue: invalid value type!" );
xBindingProps->setPropertyValue( _rPropertyName, _rValue );
}
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 9c3c98abe222..34c009944660 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -770,7 +770,7 @@ namespace pcr
{
aOrderedProperties[ loop->second.nId ] = Property(
loop->first, loop->second.nId,
- ::getCppuType( static_cast< const OUString* >( NULL ) ),
+ ::cppu::UnoType<OUString>::get(),
PropertyAttribute::BOUND );
}
diff --git a/extensions/source/propctrlr/formcontroller.cxx b/extensions/source/propctrlr/formcontroller.cxx
index d47c23fc4944..fc2279c82d57 100644
--- a/extensions/source/propctrlr/formcontroller.cxx
+++ b/extensions/source/propctrlr/formcontroller.cxx
@@ -170,7 +170,7 @@ namespace pcr
aProps[0] = Property(
PROPERTY_CURRENTPAGE,
OWN_PROPERTY_ID_CURRENTPAGE,
- ::getCppuType( static_cast< OUString* >( NULL ) ),
+ ::cppu::UnoType<OUString>::get(),
PropertyAttribute::TRANSIENT
);
aProps[1] = Property(
diff --git a/extensions/source/propctrlr/propertyhandler.hxx b/extensions/source/propctrlr/propertyhandler.hxx
index 4aed4c7b38f8..8e8ce9adeaaa 100644
--- a/extensions/source/propctrlr/propertyhandler.hxx
+++ b/extensions/source/propctrlr/propertyhandler.hxx
@@ -300,37 +300,37 @@ namespace pcr
inline void PropertyHandler::addStringPropertyDescription( ::std::vector< ::com::sun::star::beans::Property >& _rProperties, const OUString& _rPropertyName, sal_Int16 _nAttribs ) const
{
- implAddPropertyDescription( _rProperties, _rPropertyName, ::getCppuType( static_cast< OUString* >( NULL ) ), _nAttribs );
+ implAddPropertyDescription( _rProperties, _rPropertyName, ::cppu::UnoType<OUString>::get(), _nAttribs );
}
inline void PropertyHandler::addInt32PropertyDescription( ::std::vector< ::com::sun::star::beans::Property >& _rProperties, const OUString& _rPropertyName, sal_Int16 _nAttribs ) const
{
- implAddPropertyDescription( _rProperties, _rPropertyName, ::getCppuType( static_cast< sal_Int32* >( NULL ) ), _nAttribs );
+ implAddPropertyDescription( _rProperties, _rPropertyName, ::cppu::UnoType<sal_Int32>::get(), _nAttribs );
}
inline void PropertyHandler::addInt16PropertyDescription( ::std::vector< ::com::sun::star::beans::Property >& _rProperties, const OUString& _rPropertyName, sal_Int16 _nAttribs ) const
{
- implAddPropertyDescription( _rProperties, _rPropertyName, ::getCppuType( static_cast< sal_Int16* >( NULL ) ), _nAttribs );
+ implAddPropertyDescription( _rProperties, _rPropertyName, ::cppu::UnoType<sal_Int16>::get(), _nAttribs );
}
inline void PropertyHandler::addDoublePropertyDescription( ::std::vector< ::com::sun::star::beans::Property >& _rProperties, const OUString& _rPropertyName, sal_Int16 _nAttribs ) const
{
- implAddPropertyDescription( _rProperties, _rPropertyName, ::getCppuType( static_cast< double* >( NULL ) ), _nAttribs );
+ implAddPropertyDescription( _rProperties, _rPropertyName, ::cppu::UnoType<double>::get(), _nAttribs );
}
inline void PropertyHandler::addDatePropertyDescription( ::std::vector< ::com::sun::star::beans::Property >& _rProperties, const OUString& _rPropertyName, sal_Int16 _nAttribs ) const
{
- implAddPropertyDescription( _rProperties, _rPropertyName, ::getCppuType( static_cast< com::sun::star::util::Date* >( NULL ) ), _nAttribs );
+ implAddPropertyDescription( _rProperties, _rPropertyName, ::cppu::UnoType<com::sun::star::util::Date>::get(), _nAttribs );
}
inline void PropertyHandler::addTimePropertyDescription( ::std::vector< ::com::sun::star::beans::Property >& _rProperties, const OUString& _rPropertyName, sal_Int16 _nAttribs ) const
{
- implAddPropertyDescription( _rProperties, _rPropertyName, ::getCppuType( static_cast< com::sun::star::util::Time* >( NULL ) ), _nAttribs );
+ implAddPropertyDescription( _rProperties, _rPropertyName, ::cppu::UnoType<com::sun::star::util::Time>::get(), _nAttribs );
}
inline void PropertyHandler::addDateTimePropertyDescription( ::std::vector< ::com::sun::star::beans::Property >& _rProperties, const OUString& _rPropertyName, sal_Int16 _nAttribs ) const
{
- implAddPropertyDescription( _rProperties, _rPropertyName, ::getCppuType( static_cast< com::sun::star::util::DateTime* >( NULL ) ), _nAttribs );
+ implAddPropertyDescription( _rProperties, _rPropertyName, ::cppu::UnoType<com::sun::star::util::DateTime>::get(), _nAttribs );
}
inline OUString PropertyHandler::impl_getPropertyNameFromId_nothrow( PropertyId _nPropId ) const
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index cb8860bca9b0..894b505836f3 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -215,7 +215,7 @@ namespace pcr
Type SAL_CALL OEditControl::getValueType() throw (RuntimeException, std::exception)
{
- return m_bIsPassword ? ::getCppuType( static_cast< sal_Int16* >( NULL ) ) : ::getCppuType( static_cast< OUString* >( NULL ) );
+ return m_bIsPassword ? ::cppu::UnoType<sal_Int16>::get() : ::cppu::UnoType<OUString>::get();
}
@@ -436,7 +436,7 @@ namespace pcr
Type SAL_CALL OHyperlinkControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< OUString* >( NULL ) );
+ return ::cppu::UnoType<OUString>::get();
}
@@ -640,7 +640,7 @@ namespace pcr
Type SAL_CALL ONumericControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< double* >( NULL ) );
+ return ::cppu::UnoType<double>::get();
}
@@ -754,7 +754,7 @@ namespace pcr
Type SAL_CALL OColorControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< sal_Int32* >( NULL ) );
+ return ::cppu::UnoType<sal_Int32>::get();
}
@@ -823,7 +823,7 @@ namespace pcr
Type SAL_CALL OListboxControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< OUString* >( NULL ) );
+ return ::cppu::UnoType<OUString>::get();
}
@@ -914,7 +914,7 @@ namespace pcr
Type SAL_CALL OComboboxControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< OUString* >( NULL ) );
+ return ::cppu::UnoType<OUString>::get();
}
@@ -1412,7 +1412,7 @@ namespace pcr
Type SAL_CALL OMultilineEditControl::getValueType() throw (RuntimeException, std::exception)
{
if ( getTypedControlWindow()->getOperationMode() == eMultiLineText )
- return ::getCppuType( static_cast< OUString* >( NULL ) );
+ return ::cppu::UnoType<OUString>::get();
return ::getCppuType( static_cast< Sequence< OUString >* >( NULL ) );
}
diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx
index f53037a2f8c9..04f9c1627687 100644
--- a/extensions/source/propctrlr/submissionhandler.cxx
+++ b/extensions/source/propctrlr/submissionhandler.cxx
@@ -269,7 +269,7 @@ namespace pcr
if ( m_pHelper.get() )
{
implAddPropertyDescription( aProperties, PROPERTY_SUBMISSION_ID, ::getCppuType( static_cast< Reference< submission::XSubmission > * >( NULL ) ) );
- implAddPropertyDescription( aProperties, PROPERTY_XFORMS_BUTTONTYPE, ::getCppuType( static_cast< FormButtonType* >( NULL ) ) );
+ implAddPropertyDescription( aProperties, PROPERTY_XFORMS_BUTTONTYPE, ::cppu::UnoType<FormButtonType>::get() );
}
if ( aProperties.empty() )
return Sequence< Property >();
@@ -369,7 +369,7 @@ namespace pcr
case PROPERTY_ID_XFORMS_BUTTONTYPE:
{
::rtl::Reference< IPropertyEnumRepresentation > aEnumConversion(
- new DefaultEnumRepresentation( *m_pInfoService, ::getCppuType( static_cast< FormButtonType* >( NULL ) ), PROPERTY_ID_BUTTONTYPE ) );
+ new DefaultEnumRepresentation( *m_pInfoService, ::cppu::UnoType<FormButtonType>::get(), PROPERTY_ID_BUTTONTYPE ) );
// TODO/UNOize: make aEnumConversion a member?
aEnumConversion->getValueFromDescription( sControlValue, aPropertyValue );
}
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx
index be9caab8bd3a..043535b501bf 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -162,7 +162,7 @@ namespace pcr
Type SAL_CALL OFormatSampleControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< sal_Int32* >( NULL ) );
+ return ::cppu::UnoType<sal_Int32>::get();
}
@@ -204,7 +204,7 @@ namespace pcr
Type SAL_CALL OFormattedNumericControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< double* >( NULL ) );
+ return ::cppu::UnoType<double>::get();
}
@@ -300,7 +300,7 @@ namespace pcr
Type SAL_CALL OFileUrlControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< OUString* >( NULL ) );
+ return ::cppu::UnoType<OUString>::get();
}