diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-13 23:19:08 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-13 23:20:26 +0200 |
commit | 036a660a86c225992c7cab083073374c40b1f366 (patch) | |
tree | 6271d26cc317e682a471d6c4a787f47740af680b /ucb/source/ucp | |
parent | e1f0d790832098a7f8b323ab04809b6b55ade3d9 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part11
Change-Id: Ibe0a1006aba2b6cbd87c0bd6ca3acbf9ba7b0fbe
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r-- | ucb/source/ucp/file/filid.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpcontentcaps.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpcontentprovider.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx | 12 | ||||
-rw-r--r-- | ucb/source/ucp/package/pkgcontentcaps.cxx | 15 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_contentcaps.cxx | 21 | ||||
-rw-r--r-- | ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx | 15 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontentcaps.cxx | 15 |
8 files changed, 33 insertions, 61 deletions
diff --git a/ucb/source/ucp/file/filid.cxx b/ucb/source/ucp/file/filid.cxx index 383589ef7cc2..8351810f40a7 100644 --- a/ucb/source/ucp/file/filid.cxx +++ b/ucb/source/ucp/file/filid.cxx @@ -99,8 +99,8 @@ FileContentIdentifier::getTypes( if ( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( static_cast< uno::Reference< lang::XTypeProvider >* >( 0 ) ), - getCppuType( static_cast< uno::Reference< XContentIdentifier >* >( 0 ) ) ); + cppu::UnoType<lang::XTypeProvider>::get(), + cppu::UnoType<XContentIdentifier>::get() ); pCollection = &collection; } } diff --git a/ucb/source/ucp/ftp/ftpcontentcaps.cxx b/ucb/source/ucp/ftp/ftpcontentcaps.cxx index 8e4aa4e993bf..8b6cb3fed130 100644 --- a/ucb/source/ucp/ftp/ftpcontentcaps.cxx +++ b/ucb/source/ucp/ftp/ftpcontentcaps.cxx @@ -148,14 +148,12 @@ uno::Sequence< ucb::CommandInfo > FTPContent::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ), ucb::CommandInfo( OUString( "insert" ), -1, - getCppuType( - static_cast< ucb::InsertCommandArgument * >( 0 ) ) + cppu::UnoType<ucb::InsertCommandArgument>::get() ), ucb::CommandInfo( OUString( "delete" ), diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index 8e12847fc34e..07051ab758e9 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx @@ -98,9 +98,9 @@ css::uno::Sequence< css::uno::Type > SAL_CALL FTPContentProvider::getTypes() if ( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( static_cast< css::uno::Reference< XTypeProvider >*>(0) ), - getCppuType( static_cast< css::uno::Reference< XServiceInfo>*> (0) ), - getCppuType( static_cast< css::uno::Reference< XContentProvider>*> (0) ) + cppu::UnoType<XTypeProvider>::get(), + cppu::UnoType<XServiceInfo>::get(), + cppu::UnoType<XContentProvider>::get() ); pCollection = &collection; } diff --git a/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx b/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx index 67bdb2d1cc1d..564bafe3af70 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx @@ -535,8 +535,7 @@ uno::Sequence< ucb::CommandInfo > HierarchyContent::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ) // New commands @@ -590,8 +589,7 @@ uno::Sequence< ucb::CommandInfo > HierarchyContent::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ), ucb::CommandInfo( OUString( "transfer" ), @@ -654,8 +652,7 @@ uno::Sequence< ucb::CommandInfo > HierarchyContent::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ) // New commands @@ -699,8 +696,7 @@ uno::Sequence< ucb::CommandInfo > HierarchyContent::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ), ucb::CommandInfo( OUString( "transfer" ), diff --git a/ucb/source/ucp/package/pkgcontentcaps.cxx b/ucb/source/ucp/package/pkgcontentcaps.cxx index 2e81cb493a3a..54b4cbe1a2aa 100644 --- a/ucb/source/ucp/package/pkgcontentcaps.cxx +++ b/ucb/source/ucp/package/pkgcontentcaps.cxx @@ -363,14 +363,12 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ), ucb::CommandInfo( OUString( "transfer" ), -1, - getCppuType( - static_cast< ucb::TransferInfo * >( 0 ) ) + cppu::UnoType<ucb::TransferInfo>::get() ), ucb::CommandInfo( OUString( "createNewContent" ), @@ -442,14 +440,12 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ), ucb::CommandInfo( OUString( "transfer" ), -1, - getCppuType( - static_cast< ucb::TransferInfo * >( 0 ) ) + cppu::UnoType<ucb::TransferInfo>::get() ), ucb::CommandInfo( OUString( "createNewContent" ), @@ -521,8 +517,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ) // New commands diff --git a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx index 5e0cce07f5bd..f3a00c3fbf6c 100644 --- a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx +++ b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx @@ -212,8 +212,7 @@ uno::Sequence< beans::Property > Content::getProperties( beans::Property( OUString( "Storage" ), -1, - getCppuType( static_cast< - const uno::Reference< embed::XStorage > * >( 0 ) ), + cppu::UnoType<embed::XStorage>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ) @@ -279,8 +278,7 @@ uno::Sequence< beans::Property > Content::getProperties( beans::Property( OUString( "DocumentModel" ), -1, - getCppuType( static_cast< - const uno::Reference< frame::XModel > * >( 0 ) ), + cppu::UnoType<frame::XModel>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ) @@ -410,8 +408,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ) // New commands @@ -470,8 +467,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ) // New commands @@ -531,8 +527,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ), ucb::CommandInfo( OUString( "transfer" ), @@ -592,8 +587,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ), ucb::CommandInfo( OUString( "transfer" ), @@ -655,8 +649,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( - static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) + cppu::UnoType<ucb::OpenCommandArgument2>::get() ) // New commands diff --git a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx index 8d040ce38ae6..f052e06d5755 100644 --- a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx @@ -563,14 +563,12 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "insert" ), -1, - getCppuType( static_cast< - ucb::InsertCommandArgument * >( 0 ) ) ); + cppu::UnoType<ucb::InsertCommandArgument>::get() ); aCmdInfo[ 6 ] = ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( static_cast< - ucb::OpenCommandArgument2 * >( 0 ) ) ); + cppu::UnoType<ucb::OpenCommandArgument2>::get() ); // New commands @@ -580,20 +578,17 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "post" ), -1, - getCppuType( static_cast< - ucb::PostCommandArgument2 * >( 0 ) ) ); + cppu::UnoType<ucb::PostCommandArgument2>::get() ); aCmdInfo[ 8 ] = ucb::CommandInfo( OUString( "addProperty" ), -1, - getCppuType( static_cast< - ucb::PropertyCommandArgument * >( 0 ) ) ); + cppu::UnoType<ucb::PropertyCommandArgument>::get() ); aCmdInfo[ 9 ] = ucb::CommandInfo( OUString( "removeProperty" ), -1, - getCppuType( static_cast< - rtl::OUString * >( 0 ) ) ); + cppu::UnoType<rtl::OUString>::get() ); bool bFolder = false; diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx index a68231e082fb..f5feb22cd9ec 100644 --- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx @@ -535,14 +535,12 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "insert" ), -1, - getCppuType( static_cast< - ucb::InsertCommandArgument * >( 0 ) ) ); + cppu::UnoType<ucb::InsertCommandArgument>::get() ); aCmdInfo[ 6 ] = ucb::CommandInfo( OUString( "open" ), -1, - getCppuType( static_cast< - ucb::OpenCommandArgument2 * >( 0 ) ) ); + cppu::UnoType<ucb::OpenCommandArgument2>::get() ); // New commands @@ -552,20 +550,17 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo( OUString( "post" ), -1, - getCppuType( static_cast< - ucb::PostCommandArgument2 * >( 0 ) ) ); + cppu::UnoType<ucb::PostCommandArgument2>::get() ); aCmdInfo[ 8 ] = ucb::CommandInfo( OUString( "addProperty" ), -1, - getCppuType( static_cast< - ucb::PropertyCommandArgument * >( 0 ) ) ); + cppu::UnoType<ucb::PropertyCommandArgument>::get() ); aCmdInfo[ 9 ] = ucb::CommandInfo( OUString( "removeProperty" ), -1, - getCppuType( static_cast< - rtl::OUString * >( 0 ) ) ); + cppu::UnoType<rtl::OUString>::get() ); sal_Bool bFolder = sal_False; |