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 /dbaccess/source | |
parent | be44f0e91b6061f6bbe6b4da2f264eed70fb6542 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part10
Change-Id: I67acda35fa127547dcea0cd18c9dc16db7c00294
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/core/api/TableDeco.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/columnsettings.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/datasettings.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/api/table.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/ModelImpl.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/bookmarkcontainer.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/documentdefinition.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlDataSourceSetting.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/exsrcbrw.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/ColumnModel.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/unosqlmessage.cxx | 2 |
12 files changed, 29 insertions, 29 deletions
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index e7dfba17b3b7..ccaadc6d2ea1 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -314,7 +314,7 @@ void ODBTableDecorator::construct() } if ( bNotFound ) registerProperty(PROPERTY_PRIVILEGES, PROPERTY_ID_PRIVILEGES, PropertyAttribute::BOUND | PropertyAttribute::READONLY, - &m_nPrivileges, ::getCppuType(static_cast<sal_Int32*>(NULL))); + &m_nPrivileges, ::cppu::UnoType<sal_Int32>::get()); } ::cppu::IPropertyArrayHelper* ODBTableDecorator::createArrayHelper(sal_Int32 /*_nId*/) const diff --git a/dbaccess/source/core/api/columnsettings.cxx b/dbaccess/source/core/api/columnsettings.cxx index d6b673402646..da3ed553bc21 100644 --- a/dbaccess/source/core/api/columnsettings.cxx +++ b/dbaccess/source/core/api/columnsettings.cxx @@ -63,8 +63,8 @@ namespace dbaccess const sal_Int32 nBoundAttr = PropertyAttribute::BOUND; const sal_Int32 nMayBeVoidAttr = PropertyAttribute::MAYBEVOID | nBoundAttr; - const Type& rSalInt32Type = ::getCppuType( static_cast< sal_Int32* >( NULL ) ); - const Type& rStringType = ::getCppuType( static_cast< OUString* >( NULL ) ); + const Type& rSalInt32Type = ::cppu::UnoType<sal_Int32>::get(); + const Type& rStringType = ::cppu::UnoType<OUString>::get(); _rPropertyContainer.registerMayBeVoidProperty( PROPERTY_ALIGN, PROPERTY_ID_ALIGN, nMayBeVoidAttr, &m_aAlignment, rSalInt32Type ); _rPropertyContainer.registerMayBeVoidProperty( PROPERTY_NUMBERFORMAT, PROPERTY_ID_NUMBERFORMAT, nMayBeVoidAttr, &m_aFormatKey, rSalInt32Type ); diff --git a/dbaccess/source/core/api/datasettings.cxx b/dbaccess/source/core/api/datasettings.cxx index 8221ca4bbcb6..ebc044327e99 100644 --- a/dbaccess/source/core/api/datasettings.cxx +++ b/dbaccess/source/core/api/datasettings.cxx @@ -65,13 +65,13 @@ void ODataSettings::registerPropertiesFor(ODataSettings_Base* _pItem) &_pItem->m_aFont, ::getCppuType(&_pItem->m_aFont)); registerMayBeVoidProperty(PROPERTY_ROW_HEIGHT, PROPERTY_ID_ROW_HEIGHT, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, - &_pItem->m_aRowHeight, ::getCppuType(static_cast<sal_Int32*>(NULL))); + &_pItem->m_aRowHeight, ::cppu::UnoType<sal_Int32>::get()); registerMayBeVoidProperty(PROPERTY_TEXTCOLOR, PROPERTY_ID_TEXTCOLOR, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, - &_pItem->m_aTextColor, ::getCppuType(static_cast<sal_Int32*>(NULL))); + &_pItem->m_aTextColor, ::cppu::UnoType<sal_Int32>::get()); registerMayBeVoidProperty(PROPERTY_TEXTLINECOLOR, PROPERTY_ID_TEXTLINECOLOR, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, - &_pItem->m_aTextLineColor, ::getCppuType(static_cast<sal_Int32*>(NULL))); + &_pItem->m_aTextLineColor, ::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_TEXTEMPHASIS, PROPERTY_ID_TEXTEMPHASIS, PropertyAttribute::BOUND, &_pItem->m_nFontEmphasis, ::getCppuType(&_pItem->m_nFontEmphasis)); diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 048990576130..9f1661033516 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -189,16 +189,16 @@ void ODBTable::construct() &m_aFont, ::getCppuType(&m_aFont)); registerMayBeVoidProperty(PROPERTY_ROW_HEIGHT, PROPERTY_ID_ROW_HEIGHT, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, - &m_aRowHeight, ::getCppuType(static_cast<sal_Int32*>(NULL))); + &m_aRowHeight, ::cppu::UnoType<sal_Int32>::get()); registerMayBeVoidProperty(PROPERTY_TEXTCOLOR, PROPERTY_ID_TEXTCOLOR, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, - &m_aTextColor, ::getCppuType(static_cast<sal_Int32*>(NULL))); + &m_aTextColor, ::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_PRIVILEGES, PROPERTY_ID_PRIVILEGES, PropertyAttribute::BOUND | PropertyAttribute::READONLY, - &m_nPrivileges, ::getCppuType(static_cast<sal_Int32*>(NULL))); + &m_nPrivileges, ::cppu::UnoType<sal_Int32>::get()); registerMayBeVoidProperty(PROPERTY_TEXTLINECOLOR, PROPERTY_ID_TEXTLINECOLOR, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, - &m_aTextLineColor, ::getCppuType(static_cast<sal_Int32*>(NULL))); + &m_aTextLineColor, ::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_TEXTEMPHASIS, PROPERTY_ID_TEXTEMPHASIS, PropertyAttribute::BOUND, &m_nFontEmphasis, ::getCppuType(&m_nFontEmphasis)); diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 87e62ca36343..07331079b3ab 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -465,11 +465,11 @@ void ODatabaseModelImpl::impl_construct_nothrow() // the set of property value types in the bag is limited: Sequence< Type > aAllowedTypes(6); Type* pAllowedType = aAllowedTypes.getArray(); - *pAllowedType++ = ::getCppuType( static_cast< sal_Bool* >( NULL ) ); - *pAllowedType++ = ::getCppuType( static_cast< double* >( NULL ) ); - *pAllowedType++ = ::getCppuType( static_cast< OUString* >( NULL ) ); - *pAllowedType++ = ::getCppuType( static_cast< sal_Int32* >( NULL ) ); - *pAllowedType++ = ::getCppuType( static_cast< sal_Int16* >( NULL ) ); + *pAllowedType++ = ::cppu::UnoType<sal_Bool>::get(); + *pAllowedType++ = ::cppu::UnoType<double>::get(); + *pAllowedType++ = ::cppu::UnoType<OUString>::get(); + *pAllowedType++ = ::cppu::UnoType<sal_Int32>::get(); + *pAllowedType++ = ::cppu::UnoType<sal_Int16>::get(); *pAllowedType++ = ::getCppuType( static_cast< Sequence< Any >* >( NULL ) ); m_xSettings = PropertyBag::createWithTypes( m_aContext, aAllowedTypes, sal_False/*AllowEmptyPropertyName*/, sal_True/*AutomaticAddition*/ ); diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx index 40276e6ae5ef..17f28f8ecc34 100644 --- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx +++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx @@ -212,7 +212,7 @@ Type SAL_CALL OBookmarkContainer::getElementType( ) throw (RuntimeException, std { MutexGuard aGuard(m_rMutex); checkValid(false); - return ::getCppuType( static_cast< OUString* >(NULL) ); + return ::cppu::UnoType<OUString>::get(); } sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException, std::exception) diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index b448319fe53b..2b8e2cf05819 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -482,9 +482,9 @@ namespace /** property map for import/exmport info set */ comphelper::PropertyMapEntry const aExportInfoMap[] = { - { OUString("BaseURI"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamName"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("UsePrettyPrinting"), 0, ::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0}, + { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get()0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get()0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("UsePrettyPrinting"), 0, ::cppu::UnoType<sal_Bool>::get()0), beans::PropertyAttribute::MAYBEVOID, 0}, { OUString(), 0, css::uno::Type(), 0, 0 } }; } diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 1228452da874..1c06b44da5d7 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -555,7 +555,7 @@ IPropertyArrayHelper* ODocumentDefinition::createArrayHelper( ) const Sequence< Property > aManualProps( 1 ); aManualProps[0].Name = PROPERTY_PERSISTENT_PATH; aManualProps[0].Handle = PROPERTY_ID_PERSISTENT_PATH; - aManualProps[0].Type = ::getCppuType( static_cast< const OUString* >( NULL ) ); + aManualProps[0].Type = ::cppu::UnoType<OUString>::get(); aManualProps[0].Attributes = PropertyAttribute::READONLY; return new OPropertyArrayHelper( ::comphelper::concatSequences( aProps, aManualProps ) ); diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx index b9540a49306a..5618378666a1 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx @@ -74,11 +74,11 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport if (s_aTypeNameMap.empty()) { s_aTypeNameMap[GetXMLToken( XML_BOOLEAN)] = ::getBooleanCppuType(); - s_aTypeNameMap[GetXMLToken( XML_FLOAT)] = ::getCppuType( static_cast< double* >(NULL) ); - s_aTypeNameMap[GetXMLToken( XML_DOUBLE)] = ::getCppuType( static_cast< double* >(NULL) ); - s_aTypeNameMap[GetXMLToken( XML_STRING)] = ::getCppuType( static_cast< OUString* >(NULL) ); - s_aTypeNameMap[GetXMLToken( XML_INT)] = ::getCppuType( static_cast< sal_Int32* >(NULL) ); - s_aTypeNameMap[GetXMLToken( XML_SHORT)] = ::getCppuType( static_cast< sal_Int16* >(NULL) ); + s_aTypeNameMap[GetXMLToken( XML_FLOAT)] = ::cppu::UnoType<double>::get(); + s_aTypeNameMap[GetXMLToken( XML_DOUBLE)] = ::cppu::UnoType<double>::get(); + s_aTypeNameMap[GetXMLToken( XML_STRING)] = ::cppu::UnoType<OUString>::get(); + s_aTypeNameMap[GetXMLToken( XML_INT)] = ::cppu::UnoType<sal_Int32>::get(); + s_aTypeNameMap[GetXMLToken( XML_SHORT)] = ::cppu::UnoType<sal_Int16>::get(); s_aTypeNameMap[GetXMLToken( XML_VOID)] = ::getVoidCppuType(); } diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index e7bf020c8d06..1dbfcdb84b78 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -143,14 +143,14 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U { if ( pArguments->Name == "ColumnType" ) { - bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const OUString*)0)); + bool bCorrectType = pArguments->Value.getValueType().equals(::cppu::UnoType<OUString>::get()0)); OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnType\" !"); if (bCorrectType) sControlType = ::comphelper::getString(pArguments->Value); } else if ( pArguments->Name == "ColumnPosition" ) { - bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const sal_Int16*)0)); + bool bCorrectType = pArguments->Value.getValueType().equals(::cppu::UnoType<sal_Int16>::get()0)); OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnPosition\" !"); if (bCorrectType) nControlPos = ::comphelper::getINT16(pArguments->Value); diff --git a/dbaccess/source/ui/uno/ColumnModel.cxx b/dbaccess/source/ui/uno/ColumnModel.cxx index 11c48483a8e7..685ab1d1eb3a 100644 --- a/dbaccess/source/ui/uno/ColumnModel.cxx +++ b/dbaccess/source/ui/uno/ColumnModel.cxx @@ -90,7 +90,7 @@ void OColumnControlModel::registerProperties() &m_xColumn, ::getCppuType( &m_xColumn ) ); registerMayBeVoidProperty( PROPERTY_TABSTOP, PROPERTY_ID_TABSTOP, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID, - &m_aTabStop, ::getCppuType( static_cast<sal_Int16*>(NULL) ) ); + &m_aTabStop, ::cppu::UnoType<sal_Int16>::get() ); registerProperty( PROPERTY_DEFAULTCONTROL, PROPERTY_ID_DEFAULTCONTROL, PropertyAttribute::BOUND, &m_sDefaultControl, ::getCppuType( &m_sDefaultControl ) ); registerProperty( PROPERTY_ENABLED, PROPERTY_ID_ENABLED, PropertyAttribute::BOUND, diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx index f13270ee7e73..9235528c52a4 100644 --- a/dbaccess/source/ui/uno/unosqlmessage.cxx +++ b/dbaccess/source/ui/uno/unosqlmessage.cxx @@ -48,7 +48,7 @@ OSQLMessageDialog::OSQLMessageDialog(const Reference< XComponentContext >& _rxOR :OSQLMessageDialogBase(_rxORB) { registerMayBeVoidProperty(PROPERTY_SQLEXCEPTION, PROPERTY_ID_SQLEXCEPTION, PropertyAttribute::TRANSIENT | PropertyAttribute::MAYBEVOID, - &m_aException, ::getCppuType(static_cast<SQLException*>(NULL))); + &m_aException, ::cppu::UnoType<SQLException>::get()); registerProperty( PROPERTY_HELP_URL, PROPERTY_ID_HELP_URL, PropertyAttribute::TRANSIENT, &m_sHelpURL, ::getCppuType( &m_sHelpURL ) ); } |