Kaydet (Commit) e5bf214e authored tarafından Noel Grandin's avatar Noel Grandin

loplugin: cstylecast

Change-Id: I6ea98852ba775d85ccd54823b67224ea7f587c65
üst 4923ac72
......@@ -301,7 +301,7 @@ namespace logging
::osl::MutexGuard aGuard( m_aMutex );
WeakReference< XLogger >& rLogger( m_aImpl[ _rName ] );
Reference< XLogger > xLogger( (Reference< XLogger >)rLogger );
Reference< XLogger > xLogger( rLogger );
if ( !xLogger.is() )
{
// never requested before, or already dead
......
......@@ -185,7 +185,7 @@ if( pCont ) \
{ \
if( aIt.hasMoreElements() ) \
{ \
InterfaceName * pListener = (InterfaceName *)aIt.next(); \
InterfaceName * pListener = static_cast<InterfaceName *>(aIt.next()); \
try \
{ \
pListener->MethodName( aEvt ); \
......
......@@ -424,7 +424,7 @@ extern "C" {
if( ! pStream || pStream->getStreamType() != InputStream )
return NPERR_FILE_NOT_FOUND;
PluginInputStream* pInputStream = (PluginInputStream*)pStream;
PluginInputStream* pInputStream = static_cast<PluginInputStream*>(pStream);
boost::scoped_array<sal_Int8> pBytes;
int nBytes = 0;
pPlugin->enterPluginCallback();
......@@ -534,7 +534,7 @@ int32_t SAL_CALL NP_LOADDS NPN_Write( NPP instance, NPStream* stream, int32_t l
pImpl->enterPluginCallback();
::com::sun::star::uno::Sequence<sal_Int8> Bytes( (sal_Int8*)buffer, len );
((PluginOutputStream*)pStream)->getOutputStream()->writeBytes( Bytes );
static_cast<PluginOutputStream*>(pStream)->getOutputStream()->writeBytes( Bytes );
pImpl->leavePluginCallback();
return len;
......
......@@ -573,7 +573,7 @@ void XPlugin_Impl::loadPlugin()
if (pEnvData->pDisplay) // headless?
{
XSync( (Display*)pEnvData->pDisplay, False );
m_aNPWindow.window = (void*)pEnvData->aWindow;
m_aNPWindow.window = reinterpret_cast<void*>(pEnvData->aWindow);
}
else
{
......
......@@ -115,8 +115,8 @@ namespace pcr
while ( ( xParentAsForm.is() || xParentAsGrid.is() ) && xCheck.is() )
{
xCheck.set(xCheck->getParent(), css::uno::UNO_QUERY);
xParentAsForm.set(xCheck.is() ? xCheck->getParent() : (Reference< XInterface >) Reference< XForm >(), css::uno::UNO_QUERY);
xParentAsGrid.set(xCheck.is() ? xCheck->getParent() : (Reference< XInterface >) Reference< XGridColumnFactory >(), css::uno::UNO_QUERY);
xParentAsForm.set(xCheck.is() ? xCheck->getParent() : Reference< XForm >(), css::uno::UNO_QUERY);
xParentAsGrid.set(xCheck.is() ? xCheck->getParent() : Reference< XGridColumnFactory >(), css::uno::UNO_QUERY);
}
Reference< XInterface > xFormsCollection( xCheck.is() ? xCheck->getParent() : Reference< XInterface >() );
......
......@@ -565,7 +565,7 @@ namespace pcr
else
{
INetURLObject aDocURL( impl_getDocumentURL_nothrow() );
aPropertyValue <<= (OUString)URIHelper::SmartRel2Abs( aDocURL, sControlValue, Link(), false, true, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI );
aPropertyValue <<= URIHelper::SmartRel2Abs( aDocURL, sControlValue, Link(), false, true, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI );
}
}
break;
......@@ -2800,7 +2800,7 @@ namespace pcr
bool bSuccess = ( 0 == aFileDlg.Execute() );
if ( bSuccess )
{
_out_rNewValue <<= (OUString)aFileDlg.GetPath();
_out_rNewValue <<= aFileDlg.GetPath();
}
return bSuccess;
}
......@@ -2822,7 +2822,7 @@ namespace pcr
_rClearBeforeDialog.clear();
bool bSuccess = ( 0 == aFileDlg.Execute() );
if ( bSuccess )
_out_rNewValue <<= (OUString)aFileDlg.GetPath();
_out_rNewValue <<= aFileDlg.GetPath();
return bSuccess;
}
......@@ -2885,7 +2885,7 @@ namespace pcr
_rClearBeforeDialog.clear();
bool bSuccess = ( 0 == aFileDlg.Execute() );
if ( bSuccess )
_out_rNewValue <<= (OUString)aFileDlg.GetPath();
_out_rNewValue <<= aFileDlg.GetPath();
return bSuccess;
}
......
......@@ -112,7 +112,7 @@ namespace pcr
m_aSupportedProperties = doDescribeSupportedProperties();
m_bSupportedPropertiesAreKnown = true;
}
return (Sequence< Property >)m_aSupportedProperties;
return m_aSupportedProperties;
}
Sequence< OUString > SAL_CALL PropertyHandler::getSupersededProperties( ) throw (RuntimeException, std::exception)
......
......@@ -674,7 +674,7 @@ namespace pcr
if ( pItem )
{
DBG_ASSERT(pItem->ISA(SvxColorListItem), "OColorControl::OColorControl: invalid color item!");
pColorList = ( (SvxColorListItem*)pItem )->GetColorList();
pColorList = static_cast<const SvxColorListItem*>( pItem )->GetColorList();
}
if ( !pColorList.is() )
......
......@@ -318,7 +318,7 @@ namespace pcr
{
SvTreeListBox::ModelHasMoved( _pSource );
((TabOrderDialog*)GetParentDialog())->SetModified();
static_cast<TabOrderDialog*>(GetParentDialog())->SetModified();
}
......@@ -328,7 +328,7 @@ namespace pcr
Image aImage;
for (long i=0; i<labs(nRelPos); i++)
{
((TabOrderDialog*)GetParentDialog())->SetModified();
static_cast<TabOrderDialog*>(GetParentDialog())->SetModified();
// move entries
......
......@@ -293,7 +293,7 @@ namespace pcr
{
Any aPropValue;
if ( !getTypedControlWindow()->GetText().isEmpty() )
aPropValue <<= (OUString)getTypedControlWindow()->GetURL();
aPropValue <<= getTypedControlWindow()->GetURL();
return aPropValue;
}
......
......@@ -108,7 +108,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool* = 0 ) const SAL_OVERRIDE
{ return new SfxLinkItem( *this ); }
virtual bool operator==( const SfxPoolItem& rL) const SAL_OVERRIDE
{ return ((SfxLinkItem&)rL).aLink == aLink; }
{ return static_cast<const SfxLinkItem&>(rL).aLink == aLink; }
SfxLinkItem( sal_uInt16 nWhichId, const Link& rValue ) : SfxPoolItem( nWhichId )
{ aLink = rValue; }
const Link& GetValue() const { return aLink; }
......
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