Kaydet (Commit) f9a8dd3b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:redundantcast: const_cast to same type

Change-Id: Ifdb1c4174b89b273dd240d3d0f542ec4a871c7e0
üst 1166efc5
...@@ -92,7 +92,7 @@ namespace dbp ...@@ -92,7 +92,7 @@ namespace dbp
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE
{ {
return *const_cast<OUnoAutoPilot*>(this)->getArrayHelper(); return *this->getArrayHelper();
} }
// OPropertyArrayUsageHelper // OPropertyArrayUsageHelper
......
...@@ -108,7 +108,7 @@ namespace pcr ...@@ -108,7 +108,7 @@ namespace pcr
try try
{ {
if ( m_xContext.is() ) if ( m_xContext.is() )
m_xContext->activateNextControl( const_cast< XPropertyControl* >( &m_rAntiImpl ) ); m_xContext->activateNextControl( &m_rAntiImpl );
} }
catch( const Exception& ) catch( const Exception& )
{ {
......
...@@ -423,7 +423,7 @@ namespace pcr ...@@ -423,7 +423,7 @@ namespace pcr
{ {
case PROPERTY_ID_LIST_BINDING: case PROPERTY_ID_LIST_BINDING:
nControlType = PropertyControlType::ListBox; nControlType = PropertyControlType::ListBox;
const_cast< EFormsHelper* >( m_pHelper.get() )->getAllElementUINames( EFormsHelper::Binding, aListEntries, true ); m_pHelper.get()->getAllElementUINames( EFormsHelper::Binding, aListEntries, true );
break; break;
case PROPERTY_ID_XML_DATA_MODEL: case PROPERTY_ID_XML_DATA_MODEL:
......
...@@ -712,7 +712,7 @@ namespace pcr ...@@ -712,7 +712,7 @@ namespace pcr
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
if ( !m_bEventsMapInitialized ) if ( !m_bEventsMapInitialized )
{ {
const_cast< EventHandler* >( this )->m_bEventsMapInitialized = true; m_bEventsMapInitialized = true;
try try
{ {
Sequence< Type > aListeners; Sequence< Type > aListeners;
...@@ -749,7 +749,7 @@ namespace pcr ...@@ -749,7 +749,7 @@ namespace pcr
if ( !impl_filterMethod_nothrow( aEvent ) ) if ( !impl_filterMethod_nothrow( aEvent ) )
continue; continue;
const_cast< EventHandler* >( this )->m_aEvents.insert( EventMap::value_type( m_aEvents.insert( EventMap::value_type(
lcl_getEventPropertyName( sListenerClassName, *pMethods ), aEvent ) ); lcl_getEventPropertyName( sListenerClassName, *pMethods ), aEvent ) );
} }
} }
......
...@@ -363,7 +363,7 @@ namespace pcr ...@@ -363,7 +363,7 @@ namespace pcr
Any SAL_CALL GenericPropertyHandler::convertToPropertyValue( const OUString& _rPropertyName, const Any& _rControlValue ) throw (UnknownPropertyException, RuntimeException, std::exception) Any SAL_CALL GenericPropertyHandler::convertToPropertyValue( const OUString& _rPropertyName, const Any& _rControlValue ) throw (UnknownPropertyException, RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap(); impl_ensurePropertyMap();
PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName ); PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName );
if ( pos == m_aProperties.end() ) if ( pos == m_aProperties.end() )
...@@ -389,7 +389,7 @@ namespace pcr ...@@ -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) Any SAL_CALL GenericPropertyHandler::convertToControlValue( const OUString& _rPropertyName, const Any& _rPropertyValue, const Type& _rControlValueType ) throw (UnknownPropertyException, RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap(); impl_ensurePropertyMap();
PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName ); PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName );
if ( pos == m_aProperties.end() ) if ( pos == m_aProperties.end() )
...@@ -526,7 +526,7 @@ namespace pcr ...@@ -526,7 +526,7 @@ namespace pcr
Sequence< Property > SAL_CALL GenericPropertyHandler::getSupportedProperties() throw (RuntimeException, std::exception) Sequence< Property > SAL_CALL GenericPropertyHandler::getSupportedProperties() throw (RuntimeException, std::exception)
{ {
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap(); impl_ensurePropertyMap();
Sequence< Property > aReturn( m_aProperties.size() ); Sequence< Property > aReturn( m_aProperties.size() );
::std::transform( m_aProperties.begin(), m_aProperties.end(), ::std::transform( m_aProperties.begin(), m_aProperties.end(),
...@@ -557,7 +557,7 @@ namespace pcr ...@@ -557,7 +557,7 @@ namespace pcr
throw NullPointerException(); throw NullPointerException();
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
const_cast< GenericPropertyHandler* >( this )->impl_ensurePropertyMap(); impl_ensurePropertyMap();
PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName ); PropertyMap::const_iterator pos = m_aProperties.find( _rPropertyName );
if ( pos == m_aProperties.end() ) if ( pos == m_aProperties.end() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment