diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-08 16:26:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-08 16:26:23 +0200 |
commit | 801b9823a0f1974517a4021b9519cfda8cda1626 (patch) | |
tree | 79cfe73b6a422d9c0fd5c5243524e2a94e435ac8 /linguistic | |
parent | e12fa69f6eba31ffef4c2ed848ee5a91723df094 (diff) |
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I34315c0e76ee89e456f50776ef3393dc9408e8fd
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/convdic.cxx | 8 | ||||
-rw-r--r-- | linguistic/source/convdiclist.cxx | 4 | ||||
-rw-r--r-- | linguistic/source/dicimp.cxx | 2 | ||||
-rw-r--r-- | linguistic/source/dlistimp.cxx | 4 | ||||
-rw-r--r-- | linguistic/source/gciterator.cxx | 2 | ||||
-rw-r--r-- | linguistic/source/lngopt.cxx | 8 | ||||
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 12 |
7 files changed, 20 insertions, 20 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index ef899ac85276..3f7a902f602d 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -102,7 +102,7 @@ void ReadThroughDic( const OUString &rMainURL, ConvDicXMLImport &rImport ) //!! keep a reference until everything is done to //!! ensure the proper lifetime of the object uno::Reference < xml::sax::XDocumentHandler > xFilter( - (xml::sax::XExtendedDocumentHandler *) &rImport, UNO_QUERY ); + static_cast<xml::sax::XExtendedDocumentHandler *>(&rImport), UNO_QUERY ); // connect parser and filter xParser->setDocumentHandler( xFilter ); @@ -144,7 +144,7 @@ bool IsConvDic( const OUString &rFileURL, sal_Int16 &nLang, sal_Int16 &nConvType ConvDicXMLImport *pImport = new ConvDicXMLImport( 0 ); //!! keep a first reference to ensure the lifetime of the object !! - uno::Reference< XInterface > xRef( (document::XFilter *) pImport, UNO_QUERY ); + uno::Reference< XInterface > xRef( static_cast<document::XFilter *>(pImport), UNO_QUERY ); ReadThroughDic( rFileURL, *pImport ); // will implicitly add the entries bRes = !LinguIsUnspecified( pImport->GetLanguage()) && @@ -222,7 +222,7 @@ void ConvDic::Load() bNeedEntries = false; ConvDicXMLImport *pImport = new ConvDicXMLImport( this ); //!! keep a first reference to ensure the lifetime of the object !! - uno::Reference< XInterface > xRef( (document::XFilter *) pImport, UNO_QUERY ); + uno::Reference< XInterface > xRef( static_cast<document::XFilter *>(pImport), UNO_QUERY ); ReadThroughDic( aMainURL, *pImport ); // will implicitly add the entries bIsModified = false; } @@ -266,7 +266,7 @@ void ConvDic::Save() ConvDicXMLExport *pExport = new ConvDicXMLExport( *this, aMainURL, xDocHandler ); //!! keep a first(!) reference until everything is done to //!! ensure the proper lifetime of the object - uno::Reference< document::XFilter > aRef( (document::XFilter *) pExport ); + uno::Reference< document::XFilter > aRef( static_cast<document::XFilter *>(pExport) ); bool bRet = pExport->Export(); // write entries to file DBG_ASSERT( !pStream->GetError(), "I/O error while writing to stream" ); if (bRet) diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 0144fa32518e..c5d8487f7d21 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -359,7 +359,7 @@ namespace struct StaticConvDicList : public rtl::StaticWithInit< uno::Reference<XInterface>, StaticConvDicList> { uno::Reference<XInterface> operator () () { - return (cppu::OWeakObject *) new ConvDicList; + return static_cast<cppu::OWeakObject *>(new ConvDicList); } }; } @@ -565,7 +565,7 @@ void SAL_CALL ConvDicList::dispose( ) if (!bDisposing) { bDisposing = true; - EventObject aEvtObj( (XConversionDictionaryList *) this ); + EventObject aEvtObj( static_cast<XConversionDictionaryList *>(this) ); aEvtListeners.disposeAndClear( aEvtObj ); FlushDics(); diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index 9f109a310bf0..983af78a7148 100644 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -95,7 +95,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, bool &bNeg ) sal_Size nSniffPos = rpStream->Tell(); static sal_Size nVerOOo7Len = sal::static_int_cast< sal_Size >(strlen( pVerOOo7 )); pMagicHeader[ nVerOOo7Len ] = '\0'; - if ((rpStream->Read((void *) pMagicHeader, nVerOOo7Len) == nVerOOo7Len) && + if ((rpStream->Read(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len) && !strcmp(pMagicHeader, pVerOOo7)) { bool bSuccess; diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index 7d39be0e0c2e..9231a18cbb1b 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -387,7 +387,7 @@ uno::Reference< XInterface > SAL_CALL DicList_CreateInstance( const uno::Reference< XMultiServiceFactory > & /*rSMgr*/ ) throw(Exception) { - uno::Reference< XInterface > xService = (cppu::OWeakObject *) new DicList; + uno::Reference< XInterface > xService = static_cast<cppu::OWeakObject *>(new DicList); return xService; } @@ -580,7 +580,7 @@ void SAL_CALL if (!bDisposing) { bDisposing = true; - EventObject aEvtObj( (XDictionaryList *) this ); + EventObject aEvtObj( static_cast<XDictionaryList *>(this) ); aEvtListeners.disposeAndClear( aEvtObj ); if (pDicEvtLstnrHelper) diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index d9b48fe383b5..35c9fe493d33 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -920,7 +920,7 @@ throw (uno::RuntimeException, std::exception) void SAL_CALL GrammarCheckingIterator::dispose() throw (uno::RuntimeException, std::exception) { - lang::EventObject aEvt( (linguistic2::XProofreadingIterator *) this ); + lang::EventObject aEvt( static_cast<linguistic2::XProofreadingIterator *>(this) ); m_aEventListeners.disposeAndClear( aEvt ); TerminateThread(); diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx index b12938a9f128..38327b8eff87 100644 --- a/linguistic/source/lngopt.cxx +++ b/linguistic/source/lngopt.cxx @@ -218,7 +218,7 @@ Reference< XInterface > SAL_CALL LinguProps_CreateInstance( const Reference< XMultiServiceFactory > & /*rSMgr*/ ) throw(Exception) { - Reference< XInterface > xService = (cppu::OWeakObject*)new LinguProps; + Reference< XInterface > xService = static_cast<cppu::OWeakObject*>(new LinguProps); return xService; } @@ -245,7 +245,7 @@ void SAL_CALL LinguProps::setPropertyValue( Any aOld( aConfig.GetProperty( pCur->nWID ) ); if (aOld != rValue && aConfig.SetProperty( pCur->nWID, rValue )) { - PropertyChangeEvent aChgEvt( (XPropertySet *) this, rPropertyName, + PropertyChangeEvent aChgEvt( static_cast<XPropertySet *>(this), rPropertyName, sal_False, pCur->nWID, aOld, rValue ); launchEvent( aChgEvt ); } @@ -322,7 +322,7 @@ void SAL_CALL LinguProps::setFastPropertyValue( sal_Int32 nHandle, const Any& rV Any aOld( aConfig.GetProperty( nHandle ) ); if (aOld != rValue && aConfig.SetProperty( nHandle, rValue )) { - PropertyChangeEvent aChgEvt( (XPropertySet *) this, + PropertyChangeEvent aChgEvt( static_cast<XPropertySet *>(this), LinguOptions::GetName( nHandle ), sal_False, nHandle, aOld, rValue ); launchEvent( aChgEvt ); } @@ -393,7 +393,7 @@ void SAL_CALL // (see AppExitListener for saving) //aOpt.Save(); // save (possible) changes before exiting - EventObject aEvtObj( (XPropertySet *) this ); + EventObject aEvtObj( static_cast<XPropertySet *>(this) ); aEvtListeners.disposeAndClear( aEvtObj ); aPropListeners.disposeAndClear( aEvtObj ); } diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 467791da0b20..c6b2ae0a3e5f 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -237,7 +237,7 @@ LngSvcMgrListenerHelper::LngSvcMgrListenerHelper( if (xDicList.is()) { xDicList->addDictionaryListEventListener( - (linguistic2::XDictionaryListEventListener *) this, sal_False ); + static_cast<linguistic2::XDictionaryListEventListener *>(this), sal_False ); } nCombinedLngSvcEvt = 0; @@ -409,7 +409,7 @@ void LngSvcMgrListenerHelper::DisposeAndClear( const lang::EventObject &rEvtObj if (xDicList.is()) { xDicList->removeDictionaryListEventListener( - (linguistic2::XDictionaryListEventListener *) this ); + static_cast<linguistic2::XDictionaryListEventListener *>(this) ); xDicList = 0; } } @@ -423,7 +423,7 @@ bool LngSvcMgrListenerHelper::AddLngSvcEvtBroadcaster( { aLngSvcEvtBroadcasters.addInterface( rxBroadcaster ); rxBroadcaster->addLinguServiceEventListener( - (linguistic2::XLinguServiceEventListener *) this ); + static_cast<linguistic2::XLinguServiceEventListener *>(this) ); } return bRes; } @@ -437,7 +437,7 @@ bool LngSvcMgrListenerHelper::RemoveLngSvcEvtBroadcaster( { aLngSvcEvtBroadcasters.removeInterface( rxBroadcaster ); rxBroadcaster->removeLinguServiceEventListener( - (linguistic2::XLinguServiceEventListener *) this ); + static_cast<linguistic2::XLinguServiceEventListener *>(this) ); } return bRes; } @@ -985,7 +985,7 @@ void LngSvcMgr::GetListenerHelper_Impl() if (!pListenerHelper) { pListenerHelper = new LngSvcMgrListenerHelper( *this, linguistic::GetDictionaryList() ); - xListenerHelper = (linguistic2::XLinguServiceEventListener *) pListenerHelper; + xListenerHelper = static_cast<linguistic2::XLinguServiceEventListener *>(pListenerHelper); } } @@ -2094,7 +2094,7 @@ uno::Reference< uno::XInterface > SAL_CALL LngSvcMgr_CreateInstance( const uno::Reference< lang::XMultiServiceFactory > & /*rSMgr*/ ) throw(uno::Exception) { - uno::Reference< uno::XInterface > xService = (cppu::OWeakObject*) new LngSvcMgr; + uno::Reference< uno::XInterface > xService = static_cast<cppu::OWeakObject*>(new LngSvcMgr); return xService; } |