summaryrefslogtreecommitdiff
path: root/ucb/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-14 23:17:17 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-14 23:18:57 +0200
commitc288b17cc5a1d5051325e02a29aa40df5be6f016 (patch)
treea18b17b49cd5917c456fc2e0c1697fdbbb273195 /ucb/source
parent67f85d7419a475c1e10b6b1d829bb0c575a39fbf (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part12
Change-Id: I7c514b7a1d86f52d77672b826b1f08b825fd7aa7
Diffstat (limited to 'ucb/source')
-rw-r--r--ucb/source/core/ucbcmds.cxx8
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx2
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx2
-rw-r--r--ucb/source/ucp/file/shell.cxx6
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx12
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx6
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx11
7 files changed, 18 insertions, 29 deletions
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 0a73f7c6e7a9..22f5dc988c3e 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -246,16 +246,12 @@ CommandProcessorInfo::CommandProcessorInfo()
= ucb::CommandInfo(
OUString( GLOBALTRANSFER_NAME ), // Name
GLOBALTRANSFER_HANDLE, // Handle
- getCppuType(
- static_cast<
- ucb::GlobalTransferCommandArgument * >( 0 ) ) ); // ArgType
+ cppu::UnoType<ucb::GlobalTransferCommandArgument>::get() ); // ArgType
(*m_pInfo)[ 2 ]
= ucb::CommandInfo(
OUString( CHECKIN_NAME ), // Name
CHECKIN_HANDLE, // Handle
- getCppuType(
- static_cast<
- ucb::GlobalTransferCommandArgument * >( 0 ) ) ); // ArgType
+ cppu::UnoType<ucb::GlobalTransferCommandArgument>::get() ); // ArgType
}
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 96a16390227d..80c60a6c5fc7 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1520,7 +1520,7 @@ namespace cmis
-1, getCppuBooleanType() ),
ucb::CommandInfo
( OUString( "insert" ),
- -1, getCppuType( static_cast<ucb::InsertCommandArgument2 * >( 0 ) ) ),
+ -1, cppu::UnoType<ucb::InsertCommandArgument2>::get() ),
ucb::CommandInfo
( OUString( "open" ),
-1, cppu::UnoType<ucb::OpenCommandArgument2>::get() ),
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index dfb94886835d..93af251b0e9d 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -579,7 +579,7 @@ namespace ucb { namespace ucp { namespace ext
, CommandInfo(
OUString( "open" ),
-1,
- getCppuType( static_cast< OpenCommandArgument2 * >( 0 ) )
+ cppu::UnoType<OpenCommandArgument2>::get()
)
};
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index c5ac2ef43ec1..6fc7814c4ba2 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -368,11 +368,11 @@ shell::shell( const uno::Reference< uno::XComponentContext >& rxContext,
m_sCommandInfo[4].Name = "open";
m_sCommandInfo[4].Handle = -1;
- m_sCommandInfo[4].ArgType = getCppuType( static_cast< OpenCommandArgument* >( 0 ) );
+ m_sCommandInfo[4].ArgType = cppu::UnoType<OpenCommandArgument>::get();
m_sCommandInfo[5].Name = "transfer";
m_sCommandInfo[5].Handle = -1;
- m_sCommandInfo[5].ArgType = getCppuType( static_cast< TransferInfo* >( 0 ) );
+ m_sCommandInfo[5].ArgType = cppu::UnoType<TransferInfo>::get();
m_sCommandInfo[6].Name = "delete";
m_sCommandInfo[6].Handle = -1;
@@ -380,7 +380,7 @@ shell::shell( const uno::Reference< uno::XComponentContext >& rxContext,
m_sCommandInfo[7].Name = "insert";
m_sCommandInfo[7].Handle = -1;
- m_sCommandInfo[7].ArgType = getCppuType( static_cast< InsertCommandArgument* > ( 0 ) );
+ m_sCommandInfo[7].ArgType = cppu::UnoType<InsertCommandArgument>::get();
m_sCommandInfo[7].Name = "createNewContent";
m_sCommandInfo[7].Handle = -1;
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 5d3a70e1156f..fcd649daa37d 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -159,12 +159,12 @@ css::uno::Sequence< css::uno::Type > SAL_CALL FTPContent::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< XContent > *> (0)),
- getCppuType( static_cast< css::uno::Reference< XCommandProcessor >*> (0) ),
- getCppuType( static_cast< css::uno::Reference< XContentCreator >*> (0)),
- getCppuType( static_cast< css::uno::Reference< XChild >*> (0) )
+ cppu::UnoType<XTypeProvider>::get(),
+ cppu::UnoType<XServiceInfo>::get(),
+ cppu::UnoType<XContent>::get(),
+ cppu::UnoType<XCommandProcessor>::get(),
+ cppu::UnoType<XContentCreator>::get(),
+ cppu::UnoType<XChild>::get()
);
pCollection = &collection;
}
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index a99d4b63f13b..e541288dc411 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -1035,8 +1035,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues(
xRow->appendString(
beans::Property( OUString("TargetURL"),
-1,
- getCppuType(
- static_cast< const OUString * >( 0 ) ),
+ cppu::UnoType<OUString>::get(),
// @@@ Might actually be read-only!
beans::PropertyAttribute::BOUND ),
rData.getTargetURL() );
@@ -1044,8 +1043,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues(
beans::Property(
OUString("CreatableContentsInfo"),
-1,
- getCppuType( static_cast<
- const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
+ getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::READONLY ),
uno::makeAny( rData.getCreatableContentsInfo() ) );
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 74e04233ec8f..81569d9fc9af 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -1072,8 +1072,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
beans::Property(
OUString("CreatableContentsInfo"),
-1,
- getCppuType( static_cast<
- const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
+ getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::READONLY ),
uno::makeAny( rData.getCreatableContentsInfo() ) );
@@ -1083,9 +1082,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
xRow->appendObject(
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 ),
uno::makeAny( pProvider->queryStorageClone( rContentId ) ) );
@@ -1095,9 +1092,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
xRow->appendObject(
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 ),
uno::makeAny(