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

loplugin:cstylecast: deal with those that are (technically) const_cast

Change-Id: I636c05a34afc857c75a35e4c6fefedbce3e99c06
üst 2e2a46fc
...@@ -98,7 +98,7 @@ void BibTBListBoxListener::statusChanged(const ::com::sun::star::frame::FeatureS ...@@ -98,7 +98,7 @@ void BibTBListBoxListener::statusChanged(const ::com::sun::star::frame::FeatureS
pToolBar->ClearSourceList(); pToolBar->ClearSourceList();
Sequence<OUString> const * pStringSeq = static_cast<Sequence<OUString> const *>(aState.getValue()); Sequence<OUString> const * pStringSeq = static_cast<Sequence<OUString> const *>(aState.getValue());
const OUString* pStringArray = (const OUString*)pStringSeq->getConstArray(); const OUString* pStringArray = pStringSeq->getConstArray();
sal_uInt32 nCount = pStringSeq->getLength(); sal_uInt32 nCount = pStringSeq->getLength();
OUString aEntry; OUString aEntry;
...@@ -136,7 +136,7 @@ void BibTBQueryMenuListener::statusChanged(const frame::FeatureStateEvent& rEvt) ...@@ -136,7 +136,7 @@ void BibTBQueryMenuListener::statusChanged(const frame::FeatureStateEvent& rEvt)
pToolBar->ClearFilterMenu(); pToolBar->ClearFilterMenu();
Sequence<OUString> const * pStringSeq = static_cast<Sequence<OUString> const *>(aState.getValue()); Sequence<OUString> const * pStringSeq = static_cast<Sequence<OUString> const *>(aState.getValue());
const OUString* pStringArray = (const OUString*)pStringSeq->getConstArray(); const OUString* pStringArray = pStringSeq->getConstArray();
sal_uInt32 nCount = pStringSeq->getLength(); sal_uInt32 nCount = pStringSeq->getLength();
for( sal_uInt32 i=0; i<nCount; i++ ) for( sal_uInt32 i=0; i<nCount; i++ )
......
...@@ -565,8 +565,8 @@ void XPlugin_Impl::loadPlugin() ...@@ -565,8 +565,8 @@ void XPlugin_Impl::loadPlugin()
&getNPPInstance(), &getNPPInstance(),
m_aPluginMode == PluginMode::FULL ? NP_FULL : NP_EMBED, m_aPluginMode == PluginMode::FULL ? NP_FULL : NP_EMBED,
::sal::static_int_cast< int16_t, int >( m_nArgs ), ::sal::static_int_cast< int16_t, int >( m_nArgs ),
(char**)(m_nArgs ? m_pArgn : NULL), const_cast<char**>(m_nArgs ? m_pArgn : NULL),
(char**)(m_nArgs ? m_pArgv : NULL), const_cast<char**>(m_nArgs ? m_pArgv : NULL),
NULL ); NULL );
#ifdef MACOSX #ifdef MACOSX
// m_aNPWindow is set up in the MacPluginComm from the view // m_aNPWindow is set up in the MacPluginComm from the view
......
...@@ -277,7 +277,7 @@ namespace pcr ...@@ -277,7 +277,7 @@ namespace pcr
for( sal_Int32 j=0; j<aControlModels.getLength(); j++ ) for( sal_Int32 j=0; j<aControlModels.getLength(); j++ )
{ {
Reference< XPropertySet > xSet(pControlModels[j], UNO_QUERY); Reference< XPropertySet > xSet(pControlModels[j], UNO_QUERY);
if ((XPropertySet*)xSet.get() == static_cast<XPropertySet*>(pEntry->GetUserData())) if (xSet.get() == static_cast<XPropertySet*>(pEntry->GetUserData()))
{ {
pSortedControlModels[i] = pControlModels[j]; pSortedControlModels[i] = pControlModels[j];
break; break;
......
...@@ -226,7 +226,7 @@ void Sane::Init() ...@@ -226,7 +226,7 @@ void Sane::Init()
{ {
SANE_Status nStatus = p_init( &nVersion, 0 ); SANE_Status nStatus = p_init( &nVersion, 0 );
FAIL_SHUTDOWN_STATE( nStatus, "sane_init", ); FAIL_SHUTDOWN_STATE( nStatus, "sane_init", );
nStatus = p_get_devices( (const SANE_Device***)&ppDevices, nStatus = p_get_devices( const_cast<const SANE_Device***>(&ppDevices),
SANE_FALSE ); SANE_FALSE );
FAIL_SHUTDOWN_STATE( nStatus, "sane_get_devices", ); FAIL_SHUTDOWN_STATE( nStatus, "sane_get_devices", );
for( nDevices = 0 ; ppDevices[ nDevices ]; nDevices++ ) ; for( nDevices = 0 ; ppDevices[ nDevices ]; nDevices++ ) ;
...@@ -286,7 +286,7 @@ void Sane::ReloadOptions() ...@@ -286,7 +286,7 @@ void Sane::ReloadOptions()
bool Sane::Open( const char* name ) bool Sane::Open( const char* name )
{ {
SANE_Status nStatus = p_open( (SANE_String_Const)name, &maHandle ); SANE_Status nStatus = p_open( reinterpret_cast<SANE_String_Const>(name), &maHandle );
FAIL_STATE( nStatus, "sane_open", false ); FAIL_STATE( nStatus, "sane_open", false );
ReloadOptions(); ReloadOptions();
......
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