diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-11 10:09:04 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-11 10:16:42 +0200 |
commit | bd596286207adf06936939a3ef8018efc1055591 (patch) | |
tree | dc8e079155868ffbc5d023f04620c83f402dc6c2 /xmloff | |
parent | be44f0e91b6061f6bbe6b4da2f264eed70fb6542 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part10
Change-Id: I67acda35fa127547dcea0cd18c9dc16db7c00294
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/forms/eventexport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/forms/gridcolumnproptranslator.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/forms/layerimport.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/forms/propertyimport.cxx | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/xmloff/source/forms/eventexport.cxx b/xmloff/source/forms/eventexport.cxx index e3454d5801e6..667d135dc8e8 100644 --- a/xmloff/source/forms/eventexport.cxx +++ b/xmloff/source/forms/eventexport.cxx @@ -125,7 +125,7 @@ namespace xmloff Type SAL_CALL OEventDescriptorMapper::getElementType( ) throw(RuntimeException, std::exception) { - return ::getCppuType(static_cast< PropertyValue* >(NULL)); + return ::cppu::UnoType<PropertyValue>::get(); } sal_Bool SAL_CALL OEventDescriptorMapper::hasElements( ) throw(RuntimeException, std::exception) diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx b/xmloff/source/forms/gridcolumnproptranslator.cxx index efb4ff1e5869..aebb2c578124 100644 --- a/xmloff/source/forms/gridcolumnproptranslator.cxx +++ b/xmloff/source/forms/gridcolumnproptranslator.cxx @@ -160,7 +160,7 @@ namespace xmloff { if ( aName == getParaAlignProperty() ) return Property( getParaAlignProperty(), -1, - ::getCppuType( static_cast< const ParagraphAdjust* >( NULL ) ), 0 ); + ::cppu::UnoType<ParagraphAdjust>::get(), 0 ); if ( !m_xMasterInfo.is() ) return Property(); diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index 3fa697193bf4..fa1ff91a3286 100644 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -192,7 +192,7 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter) m_aAttributeMetaData.addEnumProperty( OAttributeMetaData::getDatabaseAttributeName(DA_LIST_SOURCE_TYPE), PROPERTY_LISTSOURCETYPE, ListSourceType_VALUELIST, OEnumMapper::getEnumMap(OEnumMapper::epListSourceType), - &::getCppuType( static_cast<ListSourceType*>(NULL) )); + &::cppu::UnoType<ListSourceType>::get()); m_aAttributeMetaData.addEnumProperty( OAttributeMetaData::getSpecialAttributeName(SCA_STATE), PROPERTY_DEFAULT_STATE, TRISTATE_FALSE, OEnumMapper::getEnumMap(OEnumMapper::epCheckState), @@ -215,11 +215,11 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter) m_aAttributeMetaData.addEnumProperty( OAttributeMetaData::getFormAttributeName(faNavigationMode), PROPERTY_NAVIGATION, NavigationBarMode_NONE, OEnumMapper::getEnumMap(OEnumMapper::epNavigationType), - &::getCppuType( static_cast<NavigationBarMode*>(NULL) )); + &::cppu::UnoType<NavigationBarMode>::get()); m_aAttributeMetaData.addEnumProperty( OAttributeMetaData::getFormAttributeName(faTabbingCycle), PROPERTY_CYCLE, TabulatorCycle_RECORDS, OEnumMapper::getEnumMap(OEnumMapper::epTabCyle), - &::getCppuType( static_cast<TabulatorCycle*>(NULL) )); + &::cppu::UnoType<TabulatorCycle>::get()); // 'initialize' m_aCurrentPageIds = m_aControlIds.end(); diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 50d96efb4c13..1b47bf3be147 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -241,7 +241,7 @@ Type PropertyConversion::xmlTypeToUnoType( const OUString& _rType ) if ( s_aTypeNameMap.empty() ) { s_aTypeNameMap[ token::GetXMLToken( token::XML_BOOLEAN ) ] = ::getBooleanCppuType(); - s_aTypeNameMap[ token::GetXMLToken( token::XML_FLOAT ) ] = ::getCppuType( static_cast< double* >(NULL) ); + s_aTypeNameMap[ token::GetXMLToken( token::XML_FLOAT ) ] = ::cppu::UnoType<double>::get(); s_aTypeNameMap[ token::GetXMLToken( token::XML_STRING ) ] = ::cppu::UnoType<OUString>::get(); s_aTypeNameMap[ token::GetXMLToken( token::XML_VOID ) ] = ::getVoidCppuType(); } |