summaryrefslogtreecommitdiff
path: root/sw
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 /sw
parent67f85d7419a475c1e10b6b1d829bb0c575a39fbf (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part12
Change-Id: I7c514b7a1d86f52d77672b826b1f08b825fd7aa7
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/acccell.cxx4
-rw-r--r--sw/source/core/access/accdoc.cxx4
-rw-r--r--sw/source/core/access/accnotextframe.cxx4
-rw-r--r--sw/source/core/access/accpara.cxx10
-rw-r--r--sw/source/core/unocore/unofield.cxx4
-rw-r--r--sw/source/core/unocore/unoframe.cxx2
6 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index b92d33421099..3c8188d80bdc 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -302,7 +302,7 @@ uno::Any SwAccessibleCell::queryInterface( const uno::Type& rType )
aR <<= uno::Reference<XAccessibleSelection>(this);
return aR;
}
- if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleValue > * >( 0 ) ) )
+ if ( rType == ::cppu::UnoType<XAccessibleValue>::get() )
{
uno::Reference<XAccessibleValue> xValue = this;
uno::Any aRet;
@@ -325,7 +325,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleCell::getTypes()
aTypes.realloc( nIndex + 1 );
uno::Type* pTypes = aTypes.getArray();
- pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleValue > * >( 0 ) );
+ pTypes[nIndex] = ::cppu::UnoType<XAccessibleValue>::get();
return aTypes;
}
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 101415db0867..f9eb93d7412b 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -461,7 +461,7 @@ uno::Any SwAccessibleDocument::queryInterface(
throw ( uno::RuntimeException, std::exception )
{
uno::Any aRet;
- if ( rType == ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) ) )
+ if ( rType == cppu::UnoType<XAccessibleSelection>::get() )
{
uno::Reference<XAccessibleSelection> aSelect = this;
aRet <<= aSelect;
@@ -499,7 +499,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleDocument::getTypes()
aTypes.realloc( nIndex + 2 );
uno::Type* pTypes = aTypes.getArray();
- pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) );
+ pTypes[nIndex] = cppu::UnoType<XAccessibleSelection>::get();
//Add XEventListener interface support.
pTypes[nIndex + 1 ] = ::getCppuType( static_cast< uno::Reference< com::sun::star::document::XEventListener > * >( 0 ) );
return aTypes;
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index 7481b1254997..20035fd50d08 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -202,7 +202,7 @@ uno::Any SAL_CALL SwAccessibleNoTextFrame::queryInterface( const uno::Type& aTyp
throw (uno::RuntimeException, std::exception)
{
if( aType ==
- ::getCppuType( static_cast<uno::Reference<XAccessibleImage>*>( NULL ) ) )
+ ::cppu::UnoType<XAccessibleImage>::get() )
{
uno::Reference<XAccessibleImage> xImage = this;
uno::Any aAny;
@@ -230,7 +230,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleNoTextFrame::getTypes() throw(un
aTypes.realloc( nIndex + 1 );
uno::Type* pTypes = aTypes.getArray();
- pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleImage > * >( 0 ) );
+ pTypes[nIndex] = ::cppu::UnoType<XAccessibleImage>::get();
return aTypes;
}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 64ba629b1fce..a02e4a0ab08e 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1264,11 +1264,11 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(uno:
aTypes.realloc( nIndex + 6 );
uno::Type* pTypes = aTypes.getArray();
- pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleEditableText > * >( 0 ) );
- pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleTextAttributes > * >( 0 ) );
- pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleSelection > * >( 0 ) );
- pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleTextMarkup > * >( 0 ) );
- pTypes[nIndex++] = ::getCppuType( static_cast< uno::Reference< XAccessibleMultiLineText > * >( 0 ) );
+ pTypes[nIndex++] = cppu::UnoType<XAccessibleEditableText>::get();
+ pTypes[nIndex++] = cppu::UnoType<XAccessibleTextAttributes>::get();
+ pTypes[nIndex++] = ::cppu::UnoType<XAccessibleSelection>::get();
+ pTypes[nIndex++] = cppu::UnoType<XAccessibleTextMarkup>::get();
+ pTypes[nIndex++] = cppu::UnoType<XAccessibleMultiLineText>::get();
pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleHypertext > * >( 0 ) );
return aTypes;
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 3a1210b8434d..2ef5ecbc847e 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2807,7 +2807,7 @@ sal_Bool SwXTextFieldMasters::hasByName(const OUString& rName) throw( uno::Runti
uno::Type SwXTextFieldMasters::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType(static_cast<const uno::Reference<beans::XPropertySet>*>(0));
+ return cppu::UnoType<beans::XPropertySet>::get();
}
@@ -2876,7 +2876,7 @@ uno::Reference< container::XEnumeration > SwXTextFieldTypes::createEnumeration(
uno::Type SwXTextFieldTypes::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType(static_cast<const uno::Reference<text::XDependentTextField>*>(0));
+ return cppu::UnoType<text::XDependentTextField>::get();
}
sal_Bool SwXTextFieldTypes::hasElements(void) throw( uno::RuntimeException, std::exception )
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index b1e315fe146b..a89540756805 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -3316,7 +3316,7 @@ uno::Reference< container::XEnumeration > SwXTextFrame::createEnumeration(void)
uno::Type SwXTextFrame::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType(static_cast<uno::Reference<text::XTextRange>*>(0));
+ return cppu::UnoType<text::XTextRange>::get();
}
sal_Bool SwXTextFrame::hasElements(void) throw( uno::RuntimeException, std::exception )