[Libreoffice-commits] core.git: comphelper/source include/comphelper include/cppuhelper ucbhelper/source

Noel Grandin noel at peralex.com
Mon Sep 22 03:25:28 PDT 2014


 comphelper/source/eventattachermgr/eventattachermgr.cxx |    4 ++--
 comphelper/source/misc/accessiblewrapper.cxx            |    6 +++---
 comphelper/source/misc/numberedcollection.cxx           |    4 ++--
 comphelper/source/property/propagg.cxx                  |    4 ++--
 include/comphelper/extract.hxx                          |    4 ++--
 include/comphelper/sequenceasvector.hxx                 |    4 ++--
 include/comphelper/uno3.hxx                             |    4 ++--
 include/cppuhelper/implbase10.hxx                       |    4 ++--
 include/cppuhelper/implbase11.hxx                       |    4 ++--
 include/cppuhelper/implbase12.hxx                       |    4 ++--
 include/cppuhelper/implbase13.hxx                       |    4 ++--
 include/cppuhelper/implbase5.hxx                        |    4 ++--
 include/cppuhelper/implbase6.hxx                        |    4 ++--
 include/cppuhelper/implbase7.hxx                        |    4 ++--
 include/cppuhelper/implbase9.hxx                        |    4 ++--
 include/cppuhelper/implbase_ex_post.hxx                 |    4 ++--
 ucbhelper/source/provider/contenthelper.cxx             |    2 +-
 17 files changed, 34 insertions(+), 34 deletions(-)

New commits:
commit 5139fad429cc70c5c235714e1e9530c28f9b722d
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Sep 18 14:38:54 2014 +0200

    loplugin: cstylecast
    
    Change-Id: I84873c9f84651dc8a1337f37c63020b461314e1b

diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 1de5211..21d8c39 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -195,7 +195,7 @@ void SAL_CALL AttacherAllListener_Impl::firing(const AllEventObject& Event)
     // Iterate over all listeners and pass events.
     OInterfaceIteratorHelper aIt( mpManager->aScriptListeners );
     while( aIt.hasMoreElements() )
-        ((XScriptListener *)aIt.next())->firing( aScriptEvent );
+        static_cast<XScriptListener *>(aIt.next())->firing( aScriptEvent );
 }
 
 
@@ -263,7 +263,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
     OInterfaceIteratorHelper aIt( mpManager->aScriptListeners );
     while( aIt.hasMoreElements() )
     {
-        aRet = ((XScriptListener *)aIt.next())->approveFiring( aScriptEvent );
+        aRet = static_cast<XScriptListener *>(aIt.next())->approveFiring( aScriptEvent );
         try
         {
             Reference< XIdlClass > xListenerType = mpManager->getReflection()->
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index 1b4d26e..7a1fba5 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -142,7 +142,7 @@ namespace comphelper
         else if ( _bCreate )
         {   // not found in the cache, and allowed to create
             // -> new wrapper
-            xValue = new OAccessibleWrapper( m_xContext, _rxKey, (Reference< XAccessible >)m_aOwningAccessible );
+            xValue = new OAccessibleWrapper( m_xContext, _rxKey, m_aOwningAccessible );
 
             // see if we do cache children
             if ( !m_bTransientChildren )
@@ -336,7 +336,7 @@ namespace comphelper
 
     Reference< XAccessibleContext > OAccessibleWrapper::getContextNoCreate( ) const
     {
-        return (Reference< XAccessibleContext >)m_aContext;
+        return m_aContext;
     }
 
 
@@ -349,7 +349,7 @@ namespace comphelper
     Reference< XAccessibleContext > SAL_CALL OAccessibleWrapper::getAccessibleContext(  ) throw (RuntimeException, std::exception)
     {
         // see if the context is still alive (we cache it)
-        Reference< XAccessibleContext > xContext = (Reference< XAccessibleContext >)m_aContext;
+        Reference< XAccessibleContext > xContext = m_aContext;
         if ( !xContext.is() )
         {
             // create a new context
diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx
index 4283360..e927475 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -74,7 +74,7 @@ void NumberedCollection::setUntitledPrefix(const OUString& sPrefix)
         if ( ! xComponent.is ())
             throw css::lang::IllegalArgumentException (OUString(ERRMSG_INVALID_COMPONENT_PARAM), m_xOwner.get(), 1);
 
-        sal_IntPtr pComponent = (sal_IntPtr) xComponent.get ();
+        sal_IntPtr pComponent = reinterpret_cast<sal_IntPtr>( xComponent.get() );
         TNumberedItemHash::const_iterator pIt = m_lComponents.find (pComponent);
 
         // a) component already exists - return it's number directly
@@ -150,7 +150,7 @@ void SAL_CALL NumberedCollection::releaseNumberForComponent(const css::uno::Refe
         if ( ! xComponent.is ())
             throw css::lang::IllegalArgumentException (OUString(ERRMSG_INVALID_COMPONENT_PARAM), m_xOwner.get(), 1);
 
-        sal_IntPtr pComponent = (sal_IntPtr) xComponent.get ();
+        sal_IntPtr pComponent = reinterpret_cast<sal_IntPtr>( xComponent.get() );
         TNumberedItemHash::iterator pIt = m_lComponents.find (pComponent);
 
         // a) component exists and will be removed
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index 95fe1f5..9edc064 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -624,7 +624,7 @@ void SAL_CALL OPropertySetAggregationHelper::addPropertiesChangeListener(const
 
 sal_Int32 OPropertySetAggregationHelper::getOriginalHandle(sal_Int32 nHandle) const
 {
-    OPropertyArrayAggregationHelper& rPH = (OPropertyArrayAggregationHelper&)const_cast<OPropertySetAggregationHelper*>(this)->getInfoHelper();
+    OPropertyArrayAggregationHelper& rPH = static_cast<OPropertyArrayAggregationHelper&>( const_cast<OPropertySetAggregationHelper*>(this)->getInfoHelper() );
     sal_Int32 nOriginalHandle = -1;
     (void)rPH.fillAggregatePropertyInfoByHandle(NULL, &nOriginalHandle, nHandle);
     return nOriginalHandle;
@@ -662,7 +662,7 @@ void SAL_CALL OPropertySetAggregationHelper::setFastPropertyValue(sal_Int32 _nHa
 
 void OPropertySetAggregationHelper::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle) const
 {
-    OPropertyArrayAggregationHelper& rPH = (OPropertyArrayAggregationHelper&)const_cast<OPropertySetAggregationHelper*>(this)->getInfoHelper();
+    OPropertyArrayAggregationHelper& rPH = static_cast<OPropertyArrayAggregationHelper&>( const_cast<OPropertySetAggregationHelper*>(this)->getInfoHelper() );
     OUString aPropName;
     sal_Int32   nOriginalHandle = -1;
 
diff --git a/include/comphelper/extract.hxx b/include/comphelper/extract.hxx
index 9a788c7..3ce61d9 100644
--- a/include/comphelper/extract.hxx
+++ b/include/comphelper/extract.hxx
@@ -75,7 +75,7 @@ template< typename E >
 inline void SAL_CALL any2enum( E & eRet, const ::com::sun::star::uno::Any & rAny )
     throw( ::com::sun::star::lang::IllegalArgumentException )
 {
-    // check for type save enum
+    // check for typesafe enum
     if (! (rAny >>= eRet))
     {
         // if not enum, maybe integer?
@@ -83,7 +83,7 @@ inline void SAL_CALL any2enum( E & eRet, const ::com::sun::star::uno::Any & rAny
         if (! (rAny >>= nValue))
             throw ::com::sun::star::lang::IllegalArgumentException();
 
-        eRet = (E)nValue;
+        eRet = static_cast<E>(nValue);
     }
 }
 
diff --git a/include/comphelper/sequenceasvector.hxx b/include/comphelper/sequenceasvector.hxx
index 01d6b5c..48b9e1a 100644
--- a/include/comphelper/sequenceasvector.hxx
+++ b/include/comphelper/sequenceasvector.hxx
@@ -177,7 +177,7 @@ class SequenceAsVector : public ::std::vector< TElementType >
          */
         void operator>>(::com::sun::star::uno::Sequence< TElementType >& lDestination) const
         {
-            sal_Int32 c = (sal_Int32)this->size();
+            sal_Int32 c = static_cast<sal_Int32>(this->size());
             lDestination.realloc(c);
             TElementType* pDestination = lDestination.getArray();
 
@@ -201,7 +201,7 @@ class SequenceAsVector : public ::std::vector< TElementType >
          */
         void operator>>(::com::sun::star::uno::Any& aDestination) const
         {
-            sal_Int32                                       c            = (sal_Int32)this->size();
+            sal_Int32                                       c            = static_cast<sal_Int32>(this->size());
             ::com::sun::star::uno::Sequence< TElementType > lDestination(c);
             TElementType*                                   pDestination = lDestination.getArray();
 
diff --git a/include/comphelper/uno3.hxx b/include/comphelper/uno3.hxx
index e853590..b6e2dcd 100644
--- a/include/comphelper/uno3.hxx
+++ b/include/comphelper/uno3.hxx
@@ -187,7 +187,7 @@ namespace comphelper
             ::com::sun::star::uno::Any aCheck = _rxAggregate->queryAggregation(
                 cppu::UnoType<iface>::get());
             if (aCheck.hasValue())
-                _rxOut = *(::com::sun::star::uno::Reference<iface>*)aCheck.getValue();
+                _rxOut = *reinterpret_cast<const ::com::sun::star::uno::Reference<iface>*>(aCheck.getValue());
         }
         return _rxOut.is();
     }
@@ -208,7 +208,7 @@ namespace comphelper
                 cppu::UnoType<iface>::get());
             if(aCheck.hasValue())
             {
-                _rxOut = *(::com::sun::star::uno::Reference<iface>*)aCheck.getValue();
+                _rxOut = *reinterpret_cast<const ::com::sun::star::uno::Reference<iface>*>(aCheck.getValue());
                 return _rxOut.is();
             }
         }
diff --git a/include/cppuhelper/implbase10.hxx b/include/cppuhelper/implbase10.hxx
index a3a7d68..fb033e2 100644
--- a/include/cppuhelper/implbase10.hxx
+++ b/include/cppuhelper/implbase10.hxx
@@ -108,7 +108,7 @@ namespace cppu
         struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, WeakImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {};
     public:
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
+            { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
@@ -142,7 +142,7 @@ namespace cppu
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
             { return OWeakAggObject::queryInterface( rType ); }
         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
+            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakAggObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
diff --git a/include/cppuhelper/implbase11.hxx b/include/cppuhelper/implbase11.hxx
index c0ec01e..9f1deef 100644
--- a/include/cppuhelper/implbase11.hxx
+++ b/include/cppuhelper/implbase11.hxx
@@ -109,7 +109,7 @@ namespace cppu
         struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, WeakImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {};
     public:
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
+            { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
@@ -143,7 +143,7 @@ namespace cppu
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
             { return OWeakAggObject::queryInterface( rType ); }
         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
+            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakAggObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
diff --git a/include/cppuhelper/implbase12.hxx b/include/cppuhelper/implbase12.hxx
index 65ca838..b78ed65 100644
--- a/include/cppuhelper/implbase12.hxx
+++ b/include/cppuhelper/implbase12.hxx
@@ -110,7 +110,7 @@ namespace cppu
         struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
     public:
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
+            { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
@@ -144,7 +144,7 @@ namespace cppu
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
             { return OWeakAggObject::queryInterface( rType ); }
         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
+            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakAggObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
diff --git a/include/cppuhelper/implbase13.hxx b/include/cppuhelper/implbase13.hxx
index f62b962..8d8efa2 100644
--- a/include/cppuhelper/implbase13.hxx
+++ b/include/cppuhelper/implbase13.hxx
@@ -111,7 +111,7 @@ namespace cppu
         struct cd : public rtl::StaticAggregate< class_data, ImplClassData13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, WeakImplHelper13<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13> > > {};
     public:
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
+            { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
@@ -145,7 +145,7 @@ namespace cppu
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
             { return OWeakAggObject::queryInterface( rType ); }
         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
+            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakAggObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
diff --git a/include/cppuhelper/implbase5.hxx b/include/cppuhelper/implbase5.hxx
index 89aa381..891a097 100644
--- a/include/cppuhelper/implbase5.hxx
+++ b/include/cppuhelper/implbase5.hxx
@@ -103,7 +103,7 @@ namespace cppu
         struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, WeakImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {};
     public:
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
+            { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
@@ -137,7 +137,7 @@ namespace cppu
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
             { return OWeakAggObject::queryInterface( rType ); }
         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
+            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakAggObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
diff --git a/include/cppuhelper/implbase6.hxx b/include/cppuhelper/implbase6.hxx
index 0f4d9bd..c64a866 100644
--- a/include/cppuhelper/implbase6.hxx
+++ b/include/cppuhelper/implbase6.hxx
@@ -104,7 +104,7 @@ namespace cppu
         struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
     public:
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
+            { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
@@ -138,7 +138,7 @@ namespace cppu
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
             { return OWeakAggObject::queryInterface( rType ); }
         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
+            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakAggObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
diff --git a/include/cppuhelper/implbase7.hxx b/include/cppuhelper/implbase7.hxx
index b20356c..17240c5 100644
--- a/include/cppuhelper/implbase7.hxx
+++ b/include/cppuhelper/implbase7.hxx
@@ -105,7 +105,7 @@ namespace cppu
         struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, WeakImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {};
     public:
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
+            { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
@@ -139,7 +139,7 @@ namespace cppu
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
             { return OWeakAggObject::queryInterface( rType ); }
         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
+            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakAggObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
diff --git a/include/cppuhelper/implbase9.hxx b/include/cppuhelper/implbase9.hxx
index d677106..28eda60 100644
--- a/include/cppuhelper/implbase9.hxx
+++ b/include/cppuhelper/implbase9.hxx
@@ -107,7 +107,7 @@ namespace cppu
         struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, WeakImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {};
     public:
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
+            { return WeakImplHelper_query( rType, cd::get(), this, static_cast<OWeakObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
@@ -141,7 +141,7 @@ namespace cppu
         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
             { return OWeakAggObject::queryInterface( rType ); }
         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
-            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
+            { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, static_cast<OWeakAggObject *>(this) ); }
         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
             { OWeakAggObject::acquire(); }
         virtual void SAL_CALL release() throw () SAL_OVERRIDE
diff --git a/include/cppuhelper/implbase_ex_post.hxx b/include/cppuhelper/implbase_ex_post.hxx
index 0dcc1b6..8db5ce1 100644
--- a/include/cppuhelper/implbase_ex_post.hxx
+++ b/include/cppuhelper/implbase_ex_post.hxx
@@ -68,7 +68,7 @@ class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper##N \
     static class_data##N s_cd; \
 public: \
     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE \
-        { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, (OWeakObject *)this ); } \
+        { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, static_cast<OWeakObject *>(this) ); } \
     virtual void SAL_CALL acquire() throw () SAL_OVERRIDE \
         { OWeakObject::acquire(); } \
     virtual void SAL_CALL release() throw () SAL_OVERRIDE \
@@ -92,7 +92,7 @@ public: \
     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE \
         { return OWeakAggObject::queryInterface( rType ); } \
     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE \
-        { return WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (OWeakAggObject *)this ); } \
+        { return WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, static_cast<OWeakAggObject *>(this) ); } \
     virtual void SAL_CALL acquire() throw () SAL_OVERRIDE \
         { OWeakAggObject::acquire(); } \
     virtual void SAL_CALL release() throw () SAL_OVERRIDE \
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index b99794b..5b4b1ab 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -70,7 +70,7 @@ struct hashPtr
 {
     size_t operator()( const XPropertiesChangeListenerPtr& rp ) const
     {
-        return (size_t)rp;
+        return reinterpret_cast<size_t>(rp);
     }
 };
 


More information about the Libreoffice-commits mailing list