[Libreoffice-commits] core.git: comphelper/source connectivity/source cppuhelper/source extensions/source filter/source forms/source reportdesign/source sc/source sd/source sfx2/source starmath/source stoc/source sw/source ucb/source vcl/qa xmloff/source

Julien Nabet serval2412 at yahoo.fr
Wed May 14 14:19:42 PDT 2014


 comphelper/source/property/propertycontainerhelper.cxx |    6 +++---
 connectivity/source/commontools/dbexception.cxx        |    2 +-
 cppuhelper/source/propertysetmixin.cxx                 |   10 +++-------
 extensions/source/propctrlr/standardcontrol.cxx        |    6 +++---
 extensions/source/resource/ResourceIndexAccess.hxx     |    2 +-
 filter/source/config/cache/basecontainer.cxx           |    8 +++-----
 forms/source/component/DatabaseForm.cxx                |   14 +++++++-------
 forms/source/component/Date.cxx                        |    2 +-
 forms/source/component/ListBox.cxx                     |    6 +++---
 forms/source/component/Time.cxx                        |    2 +-
 forms/source/component/formcontrolfont.cxx             |    4 ++--
 forms/source/component/refvaluecomponent.cxx           |    2 +-
 forms/source/component/scrollbar.cxx                   |    2 +-
 forms/source/component/spinbutton.cxx                  |    2 +-
 reportdesign/source/core/api/FixedLine.cxx             |    2 +-
 reportdesign/source/core/api/FixedText.cxx             |    2 +-
 reportdesign/source/core/api/FormattedField.cxx        |    2 +-
 reportdesign/source/core/api/Functions.cxx             |    2 +-
 reportdesign/source/core/api/Groups.cxx                |    2 +-
 reportdesign/source/core/api/ImageControl.cxx          |    2 +-
 reportdesign/source/core/api/Section.cxx               |    2 +-
 reportdesign/source/core/api/Shape.cxx                 |    2 +-
 reportdesign/source/filter/xml/xmlControlProperty.cxx  |   14 +++++++-------
 sc/source/ui/unoobj/cellvaluebinding.cxx               |    2 +-
 sd/source/ui/framework/factories/ViewShellWrapper.cxx  |    2 +-
 sfx2/source/notify/globalevents.cxx                    |    2 +-
 starmath/source/unomodel.cxx                           |    2 +-
 stoc/source/corereflection/criface.cxx                 |    2 +-
 sw/source/core/access/acccell.cxx                      |    4 ++--
 sw/source/core/access/accdoc.cxx                       |    4 ++--
 sw/source/core/access/accnotextframe.cxx               |    4 ++--
 sw/source/core/access/accpara.cxx                      |   10 +++++-----
 sw/source/core/unocore/unofield.cxx                    |    4 ++--
 sw/source/core/unocore/unoframe.cxx                    |    2 +-
 ucb/source/core/ucbcmds.cxx                            |    8 ++------
 ucb/source/ucp/cmis/cmis_content.cxx                   |    2 +-
 ucb/source/ucp/ext/ucpext_content.cxx                  |    2 +-
 ucb/source/ucp/file/shell.cxx                          |    6 +++---
 ucb/source/ucp/ftp/ftpcontent.cxx                      |   12 ++++++------
 ucb/source/ucp/hierarchy/hierarchycontent.cxx          |    6 ++----
 ucb/source/ucp/tdoc/tdoc_content.cxx                   |   11 +++--------
 vcl/qa/cppunit/dndtest.cxx                             |    2 +-
 xmloff/source/draw/sdpropls.cxx                        |    4 ++--
 43 files changed, 86 insertions(+), 103 deletions(-)

New commits:
commit c288b17cc5a1d5051325e02a29aa40df5be6f016
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed May 14 23:17:17 2014 +0200

    Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part12
    
    Change-Id: I7c514b7a1d86f52d77672b826b1f08b825fd7aa7

diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index b13b7f5..0fd8e9e 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 77abf1e..3b68dde 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 cea90f5..51984db 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 894b505..b29a2c5 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 c6bb6c6..9a837cb 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 bc0073b..8bf3650 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 64caa17..162ff6f 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 187cd30..9ede646 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 e0c017f..5931ac7 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 36f5e7c..87a98c5 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 db64e80..1c8c991 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 3e9b652..d2562bf 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 97ad753..3de7203 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 14f0efa..a006e96 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 e982787..42df349 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 00862ab..a64edfb 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 5d4bc79..eefc18b 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 3a188e5..1ad9ed3 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 bd19c41..e7cd7b7 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 20593b1..36355d0 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 747e30b..a287bc1 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 17f67f9..ac5796e 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 36bc3ef..5545bb2 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 692d884..8eeb87d 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 f4842cb..69842bd 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 9b230454..fa09493 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 8cf201c..9959148 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 8cffc0a..ec79ebe 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 b92d334..3c8188d 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 101415d..f9eb93d 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 7481b12..20035fd 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 64ba629..a02e4a0 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 3a1210b..2ef5ecb 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 b1e315f..a895407 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 0a73f7c..22f5dc9 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 96a1639..80c60a6c 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 dfb9488..93af251 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 c5ac2ef..6fc7814 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 5d3a70e..fcd649d 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 a99d4b6..e541288 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 74e0423..81569d9 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 8e85894..c789f8c 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 e8089ca..ca68340 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;


More information about the Libreoffice-commits mailing list