summaryrefslogtreecommitdiff
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
parent67f85d7419a475c1e10b6b1d829bb0c575a39fbf (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part12
Change-Id: I7c514b7a1d86f52d77672b826b1f08b825fd7aa7
-rw-r--r--comphelper/source/property/propertycontainerhelper.cxx6
-rw-r--r--connectivity/source/commontools/dbexception.cxx2
-rw-r--r--cppuhelper/source/propertysetmixin.cxx10
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx6
-rw-r--r--extensions/source/resource/ResourceIndexAccess.hxx2
-rw-r--r--filter/source/config/cache/basecontainer.cxx8
-rw-r--r--forms/source/component/DatabaseForm.cxx14
-rw-r--r--forms/source/component/Date.cxx2
-rw-r--r--forms/source/component/ListBox.cxx6
-rw-r--r--forms/source/component/Time.cxx2
-rw-r--r--forms/source/component/formcontrolfont.cxx4
-rw-r--r--forms/source/component/refvaluecomponent.cxx2
-rw-r--r--forms/source/component/scrollbar.cxx2
-rw-r--r--forms/source/component/spinbutton.cxx2
-rw-r--r--reportdesign/source/core/api/FixedLine.cxx2
-rw-r--r--reportdesign/source/core/api/FixedText.cxx2
-rw-r--r--reportdesign/source/core/api/FormattedField.cxx2
-rw-r--r--reportdesign/source/core/api/Functions.cxx2
-rw-r--r--reportdesign/source/core/api/Groups.cxx2
-rw-r--r--reportdesign/source/core/api/ImageControl.cxx2
-rw-r--r--reportdesign/source/core/api/Section.cxx2
-rw-r--r--reportdesign/source/core/api/Shape.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlControlProperty.cxx14
-rw-r--r--sc/source/ui/unoobj/cellvaluebinding.cxx2
-rw-r--r--sd/source/ui/framework/factories/ViewShellWrapper.cxx2
-rw-r--r--sfx2/source/notify/globalevents.cxx2
-rw-r--r--starmath/source/unomodel.cxx2
-rw-r--r--stoc/source/corereflection/criface.cxx2
-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
-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
-rw-r--r--vcl/qa/cppunit/dndtest.cxx2
-rw-r--r--xmloff/source/draw/sdpropls.cxx4
43 files changed, 86 insertions, 103 deletions
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index b13b7f5ebead..0fd8e9ee288f 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -81,7 +81,7 @@ void OPropertyContainerHelper::registerProperty(const OUString& _rName, sal_Int3
{
OSL_ENSURE((_nAttributes & PropertyAttribute::MAYBEVOID) == 0,
"OPropertyContainerHelper::registerProperty: don't use this for properties which may be void ! There is a method called \"registerMayBeVoidProperty\" for this !");
- OSL_ENSURE(!_rMemberType.equals(::getCppuType(static_cast< Any* >(NULL))),
+ OSL_ENSURE(!_rMemberType.equals(cppu::UnoType<Any>::get()),
"OPropertyContainerHelper::registerProperty: don't give my the type of an uno::Any ! Really can't handle this !");
OSL_ENSURE(_pPointerToMember,
"OPropertyContainerHelper::registerProperty: you gave me nonsense : the pointer must be non-NULL");
@@ -109,7 +109,7 @@ void OPropertyContainerHelper::registerMayBeVoidProperty(const OUString& _rName,
{
OSL_ENSURE((_nAttributes & PropertyAttribute::MAYBEVOID) != 0,
"OPropertyContainerHelper::registerMayBeVoidProperty: why calling this when the attributes say nothing about may-be-void ?");
- OSL_ENSURE(!_rExpectedType.equals(::getCppuType(static_cast< Any* >(NULL))),
+ OSL_ENSURE(!_rExpectedType.equals(cppu::UnoType<Any>::get()),
"OPropertyContainerHelper::registerMayBeVoidProperty: don't give my the type of an uno::Any ! Really can't handle this !");
OSL_ENSURE(_pPointerToMember,
"OPropertyContainerHelper::registerMayBeVoidProperty: you gave me nonsense : the pointer must be non-NULL");
@@ -129,7 +129,7 @@ void OPropertyContainerHelper::registerMayBeVoidProperty(const OUString& _rName,
void OPropertyContainerHelper::registerPropertyNoMember(const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes,
const Type& _rType, const void* _pInitialValue)
{
- OSL_ENSURE(!_rType.equals(::getCppuType(static_cast< Any* >(NULL))),
+ OSL_ENSURE(!_rType.equals(cppu::UnoType<Any>::get()),
"OPropertyContainerHelper::registerPropertyNoMember : don't give my the type of an uno::Any ! Really can't handle this !");
OSL_ENSURE(_pInitialValue || ((_nAttributes & PropertyAttribute::MAYBEVOID) != 0),
"OPropertyContainerHelper::registerPropertyNoMember : you should not omit the initial value if the property can't be void ! This will definitivly crash later !");
diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx
index 77abf1e241fa..3b68dde5b8c8 100644
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -128,7 +128,7 @@ const SQLExceptionInfo& SQLExceptionInfo::operator=(const ::com::sun::star::uno:
SQLExceptionInfo::SQLExceptionInfo(const staruno::Any& _rError)
{
- const staruno::Type& aSQLExceptionType = ::getCppuType(static_cast< ::com::sun::star::sdbc::SQLException*>(0));
+ const staruno::Type& aSQLExceptionType = cppu::UnoType<com::sun::star::sdbc::SQLException>::get();
bool bValid = isAssignableFrom(aSQLExceptionType, _rError.getValueType());
if (bValid)
m_aContent = _rError;
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index cea90f5dc554..51984dbe0244 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -537,17 +537,14 @@ void PropertySetMixinImpl::Impl::setProperty(
// the expected semantics); it might also be passed through from lower
// layers.
if (e.TargetException.isExtractableTo(
- getCppuType(
- static_cast< css::beans::UnknownPropertyException * >(0)))
+ cppu::UnoType<css::beans::UnknownPropertyException>::get())
&& ((i->second.property.Attributes
& css::beans::PropertyAttribute::OPTIONAL)
!= 0))
{
throw css::beans::UnknownPropertyException(name, object);
} else if (e.TargetException.isExtractableTo(
- getCppuType(
- static_cast< css::beans::PropertyVetoException * >(
- 0)))
+ cppu::UnoType<css::beans::PropertyVetoException>::get())
&& ((i->second.property.Attributes
& css::beans::PropertyAttribute::CONSTRAINED)
!= 0))
@@ -589,8 +586,7 @@ css::uno::Any PropertySetMixinImpl::Impl::getProperty(
// the expected semantics); it might also be passed through from lower
// layers.
if (e.TargetException.isExtractableTo(
- getCppuType(
- static_cast< css::beans::UnknownPropertyException * >(0)))
+ cppu::UnoType<css::beans::UnknownPropertyException>::get())
&& ((i->second.property.Attributes
& css::beans::PropertyAttribute::OPTIONAL)
!= 0))
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 894b505836f3..b29a2c5402b8 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -106,7 +106,7 @@ namespace pcr
Type SAL_CALL OTimeControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< util::Time* >( NULL ) );
+ return ::cppu::UnoType<util::Time>::get();
}
@@ -160,7 +160,7 @@ namespace pcr
Type SAL_CALL ODateControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< util::Date* >( NULL ) );
+ return ::cppu::UnoType<util::Date>::get();
}
@@ -319,7 +319,7 @@ namespace pcr
Type SAL_CALL ODateTimeControl::getValueType() throw (RuntimeException, std::exception)
{
- return ::getCppuType( static_cast< util::DateTime* >( NULL ) );
+ return ::cppu::UnoType<util::DateTime>::get();
}
diff --git a/extensions/source/resource/ResourceIndexAccess.hxx b/extensions/source/resource/ResourceIndexAccess.hxx
index c6bb6c6b1aad..9a837cb0d1c1 100644
--- a/extensions/source/resource/ResourceIndexAccess.hxx
+++ b/extensions/source/resource/ResourceIndexAccess.hxx
@@ -40,7 +40,7 @@ namespace extensions { namespace resource
virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XElementAccess
virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>*>(0)); };
+ { return cppu::UnoType<com::sun::star::uno::XInterface>::get(); };
virtual sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ return static_cast<bool>(m_pResMgr.get()); };
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx
index bc0073b144ad..8bf3650cfc93 100644
--- a/filter/source/config/cache/basecontainer.cxx
+++ b/filter/source/config/cache/basecontainer.cxx
@@ -532,7 +532,7 @@ void SAL_CALL BaseContainer::flush()
// Further its not a good idea to hold the own lock
// if an outside object is called :-)
css::lang::EventObject aSource (static_cast< css::util::XFlushable* >(this));
- ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer(::getCppuType(static_cast< css::uno::Reference< css::util::XFlushListener >* >(NULL)));
+ ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer(cppu::UnoType<css::util::XFlushListener>::get());
if (pContainer)
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
@@ -562,8 +562,7 @@ void SAL_CALL BaseContainer::addFlushListener(const css::uno::Reference< css::ut
{
// no locks necessary
// used helper lives if we live and is threadsafe by itself ...
- m_lListener.addInterface(::getCppuType(static_cast< css::uno::Reference< css::util::XFlushListener >* >(NULL)),
- xListener );
+ m_lListener.addInterface(cppu::UnoType<css::util::XFlushListener>::get(), xListener);
}
@@ -573,8 +572,7 @@ void SAL_CALL BaseContainer::removeFlushListener(const css::uno::Reference< css:
{
// no locks necessary
// used helper lives if we live and is threadsafe by itself ...
- m_lListener.removeInterface(::getCppuType(static_cast< css::uno::Reference< css::util::XFlushListener >* >(NULL)),
- xListener );
+ m_lListener.removeInterface(cppu::UnoType<css::util::XFlushListener>::get(), xListener);
}
} // namespace config
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 64caa172e4bd..162ff6fd95f6 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1621,7 +1621,7 @@ sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOl
{
Any aAggregateProperty;
getFastPropertyValue(aAggregateProperty, PROPERTY_ID_DATASOURCE);
- bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, aAggregateProperty, ::getCppuType(static_cast<const OUString*>(NULL)));
+ bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, aAggregateProperty, cppu::UnoType<OUString>::get());
}
break;
case PROPERTY_ID_TARGET_URL:
@@ -1646,7 +1646,7 @@ sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOl
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDetailFields);
break;
case PROPERTY_ID_CYCLE:
- bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aCycle, ::getCppuType(static_cast<const TabulatorCycle*>(NULL)));
+ bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aCycle, cppu::UnoType<TabulatorCycle>::get());
break;
case PROPERTY_ID_NAVIGATION:
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_eNavigation);
@@ -1664,13 +1664,13 @@ sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOl
bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aDynamicControlBorder, ::getBooleanCppuType() );
break;
case PROPERTY_ID_CONTROL_BORDER_COLOR_FOCUS:
- bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorFocus, getCppuType( static_cast< sal_Int32* >( NULL ) ) );
+ bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorFocus, cppu::UnoType<sal_Int32>::get() );
break;
case PROPERTY_ID_CONTROL_BORDER_COLOR_MOUSE:
- bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorMouse, getCppuType( static_cast< sal_Int32* >( NULL ) ) );
+ bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorMouse, cppu::UnoType<sal_Int32>::get() );
break;
case PROPERTY_ID_CONTROL_BORDER_COLOR_INVALID:
- bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorInvalid, getCppuType( static_cast< sal_Int32* >( NULL ) ) );
+ bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorInvalid, cppu::UnoType<sal_Int32>::get() );
break;
default:
if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle ( nHandle ) )
@@ -4033,7 +4033,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
if (nVersion > 1)
{
sal_Int32 nCycle = _rxInStream->readShort();
- m_aCycle = ::cppu::int2enum(nCycle, ::getCppuType(static_cast<const TabulatorCycle*>(NULL)));
+ m_aCycle = ::cppu::int2enum(nCycle, cppu::UnoType<TabulatorCycle>::get());
m_eNavigation = (NavigationBarMode)_rxInStream->readShort();
_rxInStream >> sAggregateProp;
@@ -4051,7 +4051,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
if (nAnyMask & CYCLE)
{
sal_Int32 nCycle = _rxInStream->readShort();
- m_aCycle = ::cppu::int2enum(nCycle, ::getCppuType(static_cast<const TabulatorCycle*>(NULL)));
+ m_aCycle = ::cppu::int2enum(nCycle, cppu::UnoType<TabulatorCycle>::get());
}
else
m_aCycle.clear();
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 187cd30c22e5..9ede6468514b 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -318,7 +318,7 @@ void ODateModel::resetNoBroadcast()
Sequence< Type > ODateModel::getSupportedBindingTypes()
{
- return Sequence< Type >( &::getCppuType( static_cast< util::Date* >( NULL ) ), 1 );
+ return Sequence< Type >( & cppu::UnoType<util::Date>::get(), 1 );
}
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index e0c017febbb8..5931ac7e280d 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -1656,11 +1656,11 @@ namespace frm
{
Sequence< Type > aTypes(6);
aTypes[0] = ::getCppuType( static_cast< Sequence< Any >* >( NULL ) );
- aTypes[1] = ::getCppuType( static_cast< Any* >( NULL ) );
+ aTypes[1] = cppu::UnoType<Any>::get();
aTypes[2] = ::getCppuType( static_cast< Sequence< sal_Int32 >* >( NULL ) );
- aTypes[3] = ::getCppuType( static_cast< sal_Int32* >( NULL ) );
+ aTypes[3] = cppu::UnoType<sal_Int32>::get();
aTypes[4] = ::getCppuType( static_cast< Sequence< OUString >* >( NULL ) );
- aTypes[5] = ::getCppuType( static_cast< OUString* >( NULL ) );
+ aTypes[5] = cppu::UnoType<OUString>::get();
return aTypes;
}
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 36f5e7c64ca3..87a98c591deb 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -316,7 +316,7 @@ void OTimeModel::resetNoBroadcast()
Sequence< Type > OTimeModel::getSupportedBindingTypes()
{
- return Sequence< Type >( &::getCppuType( static_cast< util::Time* >( NULL ) ), 1 );
+ return Sequence< Type >( & cppu::UnoType<util::Time>::get(), 1 );
}
diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx
index db64e80a676e..1c8c991fefa1 100644
--- a/forms/source/component/formcontrolfont.cxx
+++ b/forms/source/component/formcontrolfont.cxx
@@ -259,11 +259,11 @@ namespace frm
switch( _nHandle )
{
case PROPERTY_ID_TEXTCOLOR:
- bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aTextColor, ::getCppuType( static_cast< const sal_Int32* >( NULL ) ) );
+ bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aTextColor, cppu::UnoType<sal_Int32>::get() );
break;
case PROPERTY_ID_TEXTLINECOLOR:
- bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aTextLineColor, ::getCppuType( static_cast< sal_Int32* >( NULL ) ) );
+ bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aTextLineColor, cppu::UnoType<sal_Int32>::get() );
break;
case PROPERTY_ID_FONTEMPHASISMARK:
diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx
index 3e9b652529b1..d2562bf0cbdb 100644
--- a/forms/source/component/refvaluecomponent.cxx
+++ b/forms/source/component/refvaluecomponent.cxx
@@ -167,7 +167,7 @@ namespace frm
aTypes.push_back( ::getCppuType( static_cast< sal_Bool* >( NULL ) ) );
if ( !m_sReferenceValue.isEmpty() )
- aTypes.push_front( ::getCppuType( static_cast< OUString* >( NULL ) ) );
+ aTypes.push_front( cppu::UnoType<OUString>::get() );
// push_front, because this is the preferred type
Sequence< Type > aTypesRet( aTypes.size() );
diff --git a/forms/source/component/scrollbar.cxx b/forms/source/component/scrollbar.cxx
index 97ad753dc730..3de7203292ca 100644
--- a/forms/source/component/scrollbar.cxx
+++ b/forms/source/component/scrollbar.cxx
@@ -297,7 +297,7 @@ namespace frm
Sequence< Type > OScrollBarModel::getSupportedBindingTypes()
{
- return Sequence< Type >( &::getCppuType( static_cast< double* >( NULL ) ), 1 );
+ return Sequence< Type >( & cppu::UnoType<double>::get(), 1 );
}
diff --git a/forms/source/component/spinbutton.cxx b/forms/source/component/spinbutton.cxx
index 14f0efa80389..a006e9667919 100644
--- a/forms/source/component/spinbutton.cxx
+++ b/forms/source/component/spinbutton.cxx
@@ -253,7 +253,7 @@ namespace frm
Sequence< Type > OSpinButtonModel::getSupportedBindingTypes()
{
- return Sequence< Type >( &::getCppuType( static_cast< double* >( NULL ) ), 1 );
+ return Sequence< Type >( &cppu::UnoType<double>::get(), 1 );
}
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index e982787c18af..42df349e9998 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -458,7 +458,7 @@ void SAL_CALL OFixedLine::removeContainerListener( const uno::Reference< contain
// XElementAccess
uno::Type SAL_CALL OFixedLine::getElementType( ) throw (uno::RuntimeException, std::exception)
{
- return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
+ return cppu::UnoType<report::XFormatCondition>::get();
}
sal_Bool SAL_CALL OFixedLine::hasElements( ) throw (uno::RuntimeException, std::exception)
diff --git a/reportdesign/source/core/api/FixedText.cxx b/reportdesign/source/core/api/FixedText.cxx
index 00862ab08947..a64edfb08b2a 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -256,7 +256,7 @@ void SAL_CALL OFixedText::removeContainerListener( const uno::Reference< contain
// XElementAccess
uno::Type SAL_CALL OFixedText::getElementType( ) throw (uno::RuntimeException, std::exception)
{
- return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
+ return cppu::UnoType<report::XFormatCondition>::get();
}
sal_Bool SAL_CALL OFixedText::hasElements( ) throw (uno::RuntimeException, std::exception)
diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx
index 5d4bc79fe941..eefc18b4a774 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -299,7 +299,7 @@ void SAL_CALL OFormattedField::removeContainerListener( const uno::Reference< co
// XElementAccess
uno::Type SAL_CALL OFormattedField::getElementType( ) throw (uno::RuntimeException, std::exception)
{
- return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
+ return cppu::UnoType<report::XFormatCondition>::get();
}
sal_Bool SAL_CALL OFormattedField::hasElements( ) throw (uno::RuntimeException, std::exception)
diff --git a/reportdesign/source/core/api/Functions.cxx b/reportdesign/source/core/api/Functions.cxx
index 3a188e510378..1ad9ed3ab96b 100644
--- a/reportdesign/source/core/api/Functions.cxx
+++ b/reportdesign/source/core/api/Functions.cxx
@@ -150,7 +150,7 @@ uno::Any SAL_CALL OFunctions::getByIndex( ::sal_Int32 Index ) throw (lang::Index
// XElementAccess
uno::Type SAL_CALL OFunctions::getElementType( ) throw (uno::RuntimeException, std::exception)
{
- return ::getCppuType(static_cast< uno::Reference<report::XFunction>*>(NULL));
+ return cppu::UnoType<report::XFunction>::get();
}
sal_Bool SAL_CALL OFunctions::hasElements( ) throw (uno::RuntimeException, std::exception)
diff --git a/reportdesign/source/core/api/Groups.cxx b/reportdesign/source/core/api/Groups.cxx
index bd19c41d208a..e7cd7b7d94e9 100644
--- a/reportdesign/source/core/api/Groups.cxx
+++ b/reportdesign/source/core/api/Groups.cxx
@@ -163,7 +163,7 @@ uno::Any SAL_CALL OGroups::getByIndex( ::sal_Int32 Index ) throw (lang::IndexOut
// XElementAccess
uno::Type SAL_CALL OGroups::getElementType( ) throw (uno::RuntimeException, std::exception)
{
- return ::getCppuType(static_cast< uno::Reference<report::XGroup>*>(NULL));
+ return cppu::UnoType<report::XGroup>::get();
}
sal_Bool SAL_CALL OGroups::hasElements( ) throw (uno::RuntimeException, std::exception)
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx
index 20593b19e8e4..36355d0d53ae 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -392,7 +392,7 @@ void SAL_CALL OImageControl::removeContainerListener( const uno::Reference< cont
// XElementAccess
uno::Type SAL_CALL OImageControl::getElementType( ) throw (uno::RuntimeException, std::exception)
{
- return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
+ return cppu::UnoType<report::XFormatCondition>::get();
}
sal_Bool SAL_CALL OImageControl::hasElements( ) throw (uno::RuntimeException, std::exception)
diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx
index 747e30b7815a..a287bc1cf8fb 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -509,7 +509,7 @@ void SAL_CALL OSection::removeContainerListener( const uno::Reference< container
// XElementAccess
uno::Type SAL_CALL OSection::getElementType( ) throw (uno::RuntimeException, std::exception)
{
- return ::getCppuType(static_cast< uno::Reference<report::XReportComponent>*>(NULL));
+ return cppu::UnoType<report::XReportComponent>::get();
}
sal_Bool SAL_CALL OSection::hasElements( ) throw (uno::RuntimeException, std::exception)
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 17f67f9685d2..ac5796ee4850 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -359,7 +359,7 @@ void SAL_CALL OShape::removeContainerListener( const uno::Reference< container::
// XElementAccess
uno::Type SAL_CALL OShape::getElementType( ) throw (uno::RuntimeException, std::exception)
{
- return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
+ return cppu::UnoType<report::XFormatCondition>::get();
}
sal_Bool SAL_CALL OShape::hasElements( ) throw (uno::RuntimeException, std::exception)
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index 36bc3ef921d8..5545bb26c6eb 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -85,13 +85,13 @@ OXMLControlProperty::OXMLControlProperty( ORptFilter& rImport
if (s_aTypeNameMap.empty())
{
s_aTypeNameMap[GetXMLToken( XML_BOOLEAN)] = ::getBooleanCppuType();
- 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)] = ::getCppuType( static_cast< sal_Int16* >(NULL) );
- s_aTypeNameMap[GetXMLToken( XML_DATE)] = ::getCppuType( static_cast< com::sun::star::util::Date* >(NULL) );
- s_aTypeNameMap[GetXMLToken( XML_TIME)] = ::getCppuType( static_cast< com::sun::star::util::Time* >(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_DATE)] = cppu::UnoType<com::sun::star::util::Date>::get();
+ s_aTypeNameMap[GetXMLToken( XML_TIME)] = cppu::UnoType<com::sun::star::util::Time>::get();
s_aTypeNameMap[GetXMLToken( XML_VOID)] = ::getVoidCppuType();
}
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx
index 692d8849e24b..8eeb87d8a7c5 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -179,7 +179,7 @@ namespace calc
// add sal_Int32 only if constructed as ListPositionCellBinding
if ( m_bListPos )
- aTypes[nCount-1] = ::getCppuType( static_cast< sal_Int32* >( NULL ) );
+ aTypes[nCount-1] = cppu::UnoType<sal_Int32>::get();
}
return aTypes;
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index f4842cb3f4ee..69842bd26c14 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -99,7 +99,7 @@ void SAL_CALL ViewShellWrapper::disposing (void)
uno::Any SAL_CALL ViewShellWrapper::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException, std::exception)
{
if( mpSlideSorterViewShell &&
- rType == ::getCppuType( static_cast< uno::Reference< view::XSelectionSupplier > * >( 0 ) ) )
+ rType == cppu::UnoType<view::XSelectionSupplier>::get() )
{
uno::Any aAny;
uno::Reference<view::XSelectionSupplier> xSupplier( this );
diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx
index 9b23045417bd..fa0949382212 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globalevents.cxx
@@ -445,7 +445,7 @@ uno::Reference< container::XEnumeration > SAL_CALL SfxGlobalEvents_Impl::createE
uno::Type SAL_CALL SfxGlobalEvents_Impl::getElementType()
throw (uno::RuntimeException, std::exception)
{
- return ::getCppuType(static_cast< uno::Reference< frame::XModel >* >(NULL));
+ return cppu::UnoType<frame::XModel>::get();
}
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 8cf201c08bee..995914816343 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -292,7 +292,7 @@ static PropertySetInfo * lcl_createModelPropertyInfo ()
{ OUString("RelativeSymbolPrimaryHeight") , HANDLE_RELATIVE_SYMBOL_PRIMARY_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ORNAMENTSIZE },
{ OUString("RelativeUpperLimitDistance") , HANDLE_RELATIVE_UPPER_LIMIT_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_UPPERLIMIT },
{ OUString("RightMargin") , HANDLE_RIGHT_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_RIGHTSPACE },
- { OUString("RuntimeUID") , HANDLE_RUNTIME_UID , ::getCppuType(static_cast< const OUString * >(0)), PropertyAttribute::READONLY, 0 },
+ { OUString("RuntimeUID") , HANDLE_RUNTIME_UID , cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0 },
{ OUString("Symbols") , HANDLE_SYMBOLS , ::getCppuType((const Sequence < SymbolDescriptor > *)0), PROPERTY_NONE, 0 },
{ OUString("UserDefinedSymbolsInUse") , HANDLE_USED_SYMBOLS , ::getCppuType((const Sequence < SymbolDescriptor > *)0), PropertyAttribute::READONLY, 0 },
{ OUString("TopMargin") , HANDLE_TOP_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_TOPSPACE },
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx
index 8cffc0a40e73..ec79ebe4de46 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -307,7 +307,7 @@ void IdlAttributeFieldImpl::checkException(
getReflection()->getUno2Cpp().get());
uno_any_destruct(exception, 0);
if (e.isExtractableTo(
- getCppuType(static_cast< RuntimeException const * >(0))))
+ cppu::UnoType<RuntimeException>::get()))
{
cppu::throwException(e);
} else {
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 )
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(
diff --git a/vcl/qa/cppunit/dndtest.cxx b/vcl/qa/cppunit/dndtest.cxx
index 8e85894c78ec..c789f8cf71ba 100644
--- a/vcl/qa/cppunit/dndtest.cxx
+++ b/vcl/qa/cppunit/dndtest.cxx
@@ -109,7 +109,7 @@ public:
DataFlavor df;
df.MimeType = "text/plain;charset=utf-16";
- df.DataType = getCppuType( static_cast < OUString * > ( 0 ) );
+ df.DataType = cppu::UnoType<OUString>::get();
m_aFlavorList[0] = df;
};
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index e8089caa61d3..ca6834012639 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -1051,12 +1051,12 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
<= SvtSaveOptions::ODFVER_012))
{
pHdl = new XMLEnumPropertyHdl(pXML_FitToSize_Enum_Odf12,
- ::getCppuType(static_cast<const com::sun::star::drawing::TextFitToSizeType*>(0)));
+ cppu::UnoType<com::sun::star::drawing::TextFitToSizeType>::get());
}
else
{
pHdl = new XMLEnumPropertyHdl(pXML_FitToSize_Enum,
- ::getCppuType(static_cast<const com::sun::star::drawing::TextFitToSizeType*>(0)));
+ cppu::UnoType<com::sun::star::drawing::TextFitToSizeType>::get());
}
}
break;