summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-10 23:51:21 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-10 23:54:07 +0200
commitfa51b556800f332b311786770b3d6e57b65f615c (patch)
tree4218dbf7025f8d88550d941c2394c8c442324187 /xmloff
parent2241dd8d83fa8a89502ad7985427c5c79d94ce21 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part9
Change-Id: I82ed4a4868cb22566706ca0f4b1321e0d45016cf
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/forms/elementimport.cxx2
-rw-r--r--xmloff/source/forms/formattributes.cxx8
-rw-r--r--xmloff/source/forms/layerimport.cxx14
-rw-r--r--xmloff/source/forms/propertyimport.cxx2
4 files changed, 13 insertions, 13 deletions
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 8f4f34c15088..201291e3012b 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -1674,7 +1674,7 @@ namespace xmloff
sal_Int16 nLinkageType = 0;
PropertyConversion::convertString(
m_rContext.getGlobalContext(),
- ::getCppuType( static_cast< sal_Int16* >( NULL ) ),
+ ::cppu::UnoType<sal_Int16>::get(),
_rValue,
OEnumMapper::getEnumMap( OEnumMapper::epListLinkageType )
) >>= nLinkageType;
diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx
index 40532b561d91..9c61fd906b08 100644
--- a/xmloff/source/forms/formattributes.cxx
+++ b/xmloff/source/forms/formattributes.cxx
@@ -239,7 +239,7 @@ namespace xmloff
const sal_Char* _pAttributeName, const OUString& _rPropertyName,
const sal_Char* _pAttributeDefault)
{
- implAdd(_pAttributeName, _rPropertyName, ::getCppuType( static_cast< OUString* >(NULL) ),
+ implAdd(_pAttributeName, _rPropertyName, ::cppu::UnoType<OUString>::get(),
_pAttributeDefault ? OUString::createFromAscii(_pAttributeDefault) : OUString());
}
@@ -259,7 +259,7 @@ namespace xmloff
{
OUStringBuffer aDefault;
::sax::Converter::convertNumber(aDefault, (sal_Int32)_nAttributeDefault);
- implAdd(_pAttributeName, _rPropertyName, ::getCppuType( static_cast< sal_Int16* >(NULL) ), aDefault.makeStringAndClear());
+ implAdd(_pAttributeName, _rPropertyName, ::cppu::UnoType<sal_Int16>::get(), aDefault.makeStringAndClear());
}
void OAttribute2Property::addInt32Property(
@@ -268,7 +268,7 @@ namespace xmloff
{
OUStringBuffer aDefault;
::sax::Converter::convertNumber( aDefault, _nAttributeDefault );
- implAdd( _pAttributeName, _rPropertyName, ::getCppuType( static_cast< sal_Int32* >(NULL) ), aDefault.makeStringAndClear() );
+ implAdd( _pAttributeName, _rPropertyName, ::cppu::UnoType<sal_Int32>::get(), aDefault.makeStringAndClear() );
}
void OAttribute2Property::addEnumProperty(
@@ -279,7 +279,7 @@ namespace xmloff
OUStringBuffer aDefault;
SvXMLUnitConverter::convertEnum(aDefault, _nAttributeDefault, _pValueMap);
AttributeAssignment& aAssignment = implAdd(_pAttributeName, _rPropertyName,
- _pType ? *_pType : ::getCppuType( static_cast< sal_Int32* >(NULL) ),
+ _pType ? *_pType : ::cppu::UnoType<sal_Int32>::get(),
// this assumes that the setPropertyValue for enums can handle int32's ....
aDefault.makeStringAndClear());
aAssignment.pEnumMap = _pValueMap;
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 987543644432..3fa697193bf4 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -180,15 +180,15 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter)
m_aAttributeMetaData.addEnumProperty(
OAttributeMetaData::getCommonControlAttributeName( CCA_VISUAL_EFFECT ), PROPERTY_VISUAL_EFFECT,
VisualEffect::LOOK3D, OEnumMapper::getEnumMap( OEnumMapper::epVisualEffect ),
- &::getCppuType( static_cast< sal_Int16* >( NULL ) ) );
+ &::cppu::UnoType<sal_Int16>::get() );
m_aAttributeMetaData.addEnumProperty(
OAttributeMetaData::getCommonControlAttributeName( CCA_ORIENTATION ), PROPERTY_ORIENTATION,
ScrollBarOrientation::HORIZONTAL, OEnumMapper::getEnumMap( OEnumMapper::epOrientation ),
- &::getCppuType( static_cast< sal_Int32* >( NULL ) ) );
+ &::cppu::UnoType<sal_Int32>::get() );
m_aAttributeMetaData.addEnumProperty(
OAttributeMetaData::getCommonControlAttributeName(CCA_BUTTON_TYPE), PROPERTY_BUTTONTYPE,
FormButtonType_PUSH, OEnumMapper::getEnumMap(OEnumMapper::epButtonType),
- &::getCppuType( static_cast<FormButtonType*>(NULL) ));
+ &::cppu::UnoType<FormButtonType>::get());
m_aAttributeMetaData.addEnumProperty(
OAttributeMetaData::getDatabaseAttributeName(DA_LIST_SOURCE_TYPE), PROPERTY_LISTSOURCETYPE,
ListSourceType_VALUELIST, OEnumMapper::getEnumMap(OEnumMapper::epListSourceType),
@@ -196,19 +196,19 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter)
m_aAttributeMetaData.addEnumProperty(
OAttributeMetaData::getSpecialAttributeName(SCA_STATE), PROPERTY_DEFAULT_STATE, TRISTATE_FALSE,
OEnumMapper::getEnumMap(OEnumMapper::epCheckState),
- &::getCppuType( static_cast< sal_Int16* >(NULL)));
+ &::cppu::UnoType<sal_Int16>::get());
m_aAttributeMetaData.addEnumProperty(
OAttributeMetaData::getSpecialAttributeName(SCA_CURRENT_STATE), PROPERTY_STATE, TRISTATE_FALSE,
OEnumMapper::getEnumMap(OEnumMapper::epCheckState),
- &::getCppuType( static_cast< sal_Int16* >(NULL)));
+ &::cppu::UnoType<sal_Int16>::get());
m_aAttributeMetaData.addEnumProperty(
OAttributeMetaData::getFormAttributeName(faEnctype), PROPERTY_SUBMIT_ENCODING,
FormSubmitEncoding_URL, OEnumMapper::getEnumMap(OEnumMapper::epSubmitEncoding),
- &::getCppuType( static_cast<FormSubmitEncoding*>(NULL) ));
+ &::cppu::UnoType<FormSubmitEncoding>::get());
m_aAttributeMetaData.addEnumProperty(
OAttributeMetaData::getFormAttributeName(faMethod), PROPERTY_SUBMIT_METHOD,
FormSubmitMethod_GET, OEnumMapper::getEnumMap(OEnumMapper::epSubmitMethod),
- &::getCppuType( static_cast<FormSubmitMethod*>(NULL) ));
+ &::cppu::UnoType<FormSubmitMethod>::get());
m_aAttributeMetaData.addEnumProperty(
OAttributeMetaData::getFormAttributeName(faCommandType), PROPERTY_COMMAND_TYPE,
CommandType::COMMAND, OEnumMapper::getEnumMap(OEnumMapper::epCommandType));
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index 59bb88163d55..50d96efb4c13 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -242,7 +242,7 @@ Type PropertyConversion::xmlTypeToUnoType( const OUString& _rType )
{
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_STRING ) ] = ::getCppuType( static_cast< OUString* >(NULL) );
+ s_aTypeNameMap[ token::GetXMLToken( token::XML_STRING ) ] = ::cppu::UnoType<OUString>::get();
s_aTypeNameMap[ token::GetXMLToken( token::XML_VOID ) ] = ::getVoidCppuType();
}