summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-18 14:38:54 +0200
committerNoel Grandin <noel@peralex.com>2014-09-22 12:24:23 +0200
commit5139fad429cc70c5c235714e1e9530c28f9b722d (patch)
tree619ca6750576d2a10d7e3d12ff1f431b7bfe4d20 /comphelper/source
parent4e0744b002af73475b5088aec1e6350974ba1673 (diff)
loplugin: cstylecast
Change-Id: I84873c9f84651dc8a1337f37c63020b461314e1b
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx4
-rw-r--r--comphelper/source/misc/accessiblewrapper.cxx6
-rw-r--r--comphelper/source/misc/numberedcollection.cxx4
-rw-r--r--comphelper/source/property/propagg.cxx4
4 files changed, 9 insertions, 9 deletions
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 1de52115dfed..21d8c399a211 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 1b4d26ebcb4d..7a1fba581757 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 4283360bf06a..e927475df95b 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 95fe1f5768ab..9edc06400a32 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;