summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-29 12:04:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-29 12:04:25 +0200
commitf9a8dd3bbb6b60b8f25ae4108868dc778cd51dfb (patch)
tree6bbbc3e73efc575ce74f46938824178d52d1ae1a /extensions
parent1166efc5f94c9596226f5700bb08994d75f609d6 (diff)
loplugin:redundantcast: const_cast to same type
Change-Id: Ifdb1c4174b89b273dd240d3d0f542ec4a871c7e0
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/dbpilots/unoautopilot.hxx2
-rw-r--r--extensions/source/propctrlr/commoncontrol.cxx2
-rw-r--r--extensions/source/propctrlr/eformspropertyhandler.cxx2
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx4
-rw-r--r--extensions/source/propctrlr/genericpropertyhandler.cxx8
5 files changed, 9 insertions, 9 deletions
diff --git a/extensions/source/dbpilots/unoautopilot.hxx b/extensions/source/dbpilots/unoautopilot.hxx
index d4b7be402c7e..83a58eea0319 100644
--- a/extensions/source/dbpilots/unoautopilot.hxx
+++ b/extensions/source/dbpilots/unoautopilot.hxx
@@ -92,7 +92,7 @@ namespace dbp
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE
{
- return *const_cast<OUnoAutoPilot*>(this)->getArrayHelper();
+ return *this->getArrayHelper();
}
// OPropertyArrayUsageHelper
diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx
index 48ed7f388c62..1bfeed319853 100644
--- a/extensions/source/propctrlr/commoncontrol.cxx
+++ b/extensions/source/propctrlr/commoncontrol.cxx
@@ -108,7 +108,7 @@ namespace pcr
try
{
if ( m_xContext.is() )
- m_xContext->activateNextControl( const_cast< XPropertyControl* >( &m_rAntiImpl ) );
+ m_xContext->activateNextControl( &m_rAntiImpl );
}
catch( const Exception& )
{
diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx
index 47e5e30c81ed..32ca408c8a4f 100644
--- a/extensions/source/propctrlr/eformspropertyhandler.cxx
+++ b/extensions/source/propctrlr/eformspropertyhandler.cxx
@@ -423,7 +423,7 @@ namespace pcr
{
case PROPERTY_ID_LIST_BINDING:
nControlType = PropertyControlType::ListBox;
- const_cast< EFormsHelper* >( m_pHelper.get() )->getAllElementUINames( EFormsHelper::Binding, aListEntries, true );
+ m_pHelper.get()->getAllElementUINames( EFormsHelper::Binding, aListEntries, true );
break;
case PROPERTY_ID_XML_DATA_MODEL:
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index f275230a301b..cf2ad165959e 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -712,7 +712,7 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex );
if ( !m_bEventsMapInitialized )
{
- const_cast< EventHandler* >( this )->m_bEventsMapInitialized = true;
+ m_bEventsMapInitialized = true;
try
{
Sequence< Type > aListeners;
@@ -749,7 +749,7 @@ namespace pcr
if ( !impl_filterMethod_nothrow( aEvent ) )
continue;
- const_cast< EventHandler* >( this )->m_aEvents.insert( EventMap::value_type(
+ m_aEvents.insert( EventMap::value_type(
lcl_getEventPropertyName( sListenerClassName, *pMethods ), aEvent ) );
}
}
diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx
index 0aaa2cc36324..b561efaf7309 100644
--- a/extensions/source/propctrlr/genericpropertyhandler.cxx
+++ b/extensions/source/propctrlr/genericpropertyhandler.cxx
@@ -363,7 +363,7 @@ namespace pcr
Any SAL_CALL GenericPropertyHandler::convertToPropertyValue( const OUString& _rPropertyName, const Any& _rControlValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap();
+ impl_ensurePropertyMap();
PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName );
if ( pos == m_aProperties.end() )
@@ -389,7 +389,7 @@ namespace pcr
Any SAL_CALL GenericPropertyHandler::convertToControlValue( const OUString& _rPropertyName, const Any& _rPropertyValue, const Type& _rControlValueType ) throw (UnknownPropertyException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap();
+ impl_ensurePropertyMap();
PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName );
if ( pos == m_aProperties.end() )
@@ -526,7 +526,7 @@ namespace pcr
Sequence< Property > SAL_CALL GenericPropertyHandler::getSupportedProperties() throw (RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap();
+ impl_ensurePropertyMap();
Sequence< Property > aReturn( m_aProperties.size() );
::std::transform( m_aProperties.begin(), m_aProperties.end(),
@@ -557,7 +557,7 @@ namespace pcr
throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex );
- const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap();
+ impl_ensurePropertyMap();
PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName );
if ( pos == m_aProperties.end() )