loplugin:cstylecast: deal with remaining pointer casts

Change-Id: I617d55415aee923d0734f3f3b74948b26132611b
This commit is contained in:
Stephan Bergmann 2015-06-08 16:26:18 +02:00
parent b2f490e862
commit e12fa69f6e
4 changed files with 16 additions and 16 deletions

View File

@ -101,7 +101,7 @@ PropertyHelper_Hyphenation& Hyphenator::GetPropHelper_Impl()
{
Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
pPropHelper = new PropertyHelper_Hyphenation ((XHyphenator *) this, xPropSet );
pPropHelper = new PropertyHelper_Hyphenation (static_cast<XHyphenator *>(this), xPropSet );
pPropHelper->AddAsPropListener(); //! after a reference is established
}
return *pPropHelper;
@ -744,7 +744,7 @@ Reference< XInterface > SAL_CALL Hyphenator_CreateInstance(
const Reference< XMultiServiceFactory > & /*rSMgr*/ )
throw(Exception)
{
Reference< XInterface > xService = (cppu::OWeakObject*) new Hyphenator;
Reference< XInterface > xService = static_cast<cppu::OWeakObject*>(new Hyphenator);
return xService;
}
@ -801,7 +801,7 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
//! And the reference to the UNO-functions while increasing
//! the ref-count and will implicitly free the memory
//! when the object is not longer used.
pPropHelper = new PropertyHelper_Hyphenation( (XHyphenator *) this, xPropSet );
pPropHelper = new PropertyHelper_Hyphenation( static_cast<XHyphenator *>(this), xPropSet );
pPropHelper->AddAsPropListener(); //! after a reference is established
}
else {
@ -818,7 +818,7 @@ void SAL_CALL Hyphenator::dispose()
if (!bDisposing)
{
bDisposing = true;
EventObject aEvtObj( (XHyphenator *) this );
EventObject aEvtObj( static_cast<XHyphenator *>(this) );
aEvtListeners.disposeAndClear( aEvtObj );
if (pPropHelper)
{

View File

@ -86,7 +86,7 @@ PropertyHelper_Spell & MacSpellChecker::GetPropHelper_Impl()
{
Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
pPropHelper = new PropertyHelper_Spell( (XSpellChecker *) this, xPropSet );
pPropHelper = new PropertyHelper_Spell( static_cast<XSpellChecker *>(this), xPropSet );
xPropHelper = pPropHelper;
pPropHelper->AddAsPropListener(); //! after a reference is established
}
@ -407,7 +407,7 @@ Reference< XInterface > SAL_CALL MacSpellChecker_CreateInstance(
throw(Exception)
{
Reference< XInterface > xService = (cppu::OWeakObject*) new MacSpellChecker;
Reference< XInterface > xService = static_cast<cppu::OWeakObject*>(new MacSpellChecker);
return xService;
}
@ -473,7 +473,7 @@ void SAL_CALL
//! And the reference to the UNO-functions while increasing
//! the ref-count and will implicitly free the memory
//! when the object is not longer used.
pPropHelper = new PropertyHelper_Spell( (XSpellChecker *) this, xPropSet );
pPropHelper = new PropertyHelper_Spell( static_cast<XSpellChecker *>(this), xPropSet );
xPropHelper = pPropHelper;
pPropHelper->AddAsPropListener(); //! after a reference is established
}
@ -493,7 +493,7 @@ void SAL_CALL
if (!bDisposing)
{
bDisposing = true;
EventObject aEvtObj( (XSpellChecker *) this );
EventObject aEvtObj( static_cast<XSpellChecker *>(this) );
aEvtListeners.disposeAndClear( aEvtObj );
}
}

View File

@ -96,7 +96,7 @@ PropertyHelper_Spelling & SpellChecker::GetPropHelper_Impl()
{
Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
pPropHelper = new PropertyHelper_Spelling( (XSpellChecker *) this, xPropSet );
pPropHelper = new PropertyHelper_Spelling( static_cast<XSpellChecker *>(this), xPropSet );
pPropHelper->AddAsPropListener(); //! after a reference is established
}
return *pPropHelper;
@ -506,7 +506,7 @@ Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
throw(Exception)
{
Reference< XInterface > xService = (cppu::OWeakObject*) new SpellChecker;
Reference< XInterface > xService = static_cast<cppu::OWeakObject*>(new SpellChecker);
return xService;
}
@ -563,7 +563,7 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
//! And the reference to the UNO-functions while increasing
//! the ref-count and will implicitly free the memory
//! when the object is not longer used.
pPropHelper = new PropertyHelper_Spelling( (XSpellChecker *) this, xPropSet );
pPropHelper = new PropertyHelper_Spelling( static_cast<XSpellChecker *>(this), xPropSet );
pPropHelper->AddAsPropListener(); //! after a reference is established
}
else {
@ -580,7 +580,7 @@ void SAL_CALL SpellChecker::dispose()
if (!bDisposing)
{
bDisposing = true;
EventObject aEvtObj( (XSpellChecker *) this );
EventObject aEvtObj( static_cast<XSpellChecker *>(this) );
aEvtListeners.disposeAndClear( aEvtObj );
if (pPropHelper)
{

View File

@ -118,7 +118,7 @@ PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl()
{
Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
pPropHelper = new PropertyHelper_Thesaurus( (XThesaurus *) this, xPropSet );
pPropHelper = new PropertyHelper_Thesaurus( static_cast<XThesaurus *>(this), xPropSet );
pPropHelper->AddAsPropListener(); //! after a reference is established
}
return *pPropHelper;
@ -515,7 +515,7 @@ Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
const Reference< XMultiServiceFactory > & /*rSMgr*/ )
throw(Exception)
{
Reference< XInterface > xService = (cppu::OWeakObject*) new Thesaurus;
Reference< XInterface > xService = static_cast<cppu::OWeakObject*>(new Thesaurus);
return xService;
}
@ -543,7 +543,7 @@ void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )
//! And the reference to the UNO-functions while increasing
//! the ref-count and will implicitly free the memory
//! when the object is not longer used.
pPropHelper = new PropertyHelper_Thesaurus( (XThesaurus *) this, xPropSet );
pPropHelper = new PropertyHelper_Thesaurus( static_cast<XThesaurus *>(this), xPropSet );
pPropHelper->AddAsPropListener(); //! after a reference is established
}
else
@ -590,7 +590,7 @@ void SAL_CALL Thesaurus::dispose()
if (!bDisposing)
{
bDisposing = true;
EventObject aEvtObj( (XThesaurus *) this );
EventObject aEvtObj( static_cast<XThesaurus *>(this) );
aEvtListeners.disposeAndClear( aEvtObj );
if (pPropHelper)
{