Clean up C-style casts from pointers to void
Change-Id: I98cf0c0eee558662d1e3dd20cca99ec1ca8c9a2c
This commit is contained in:
@@ -106,7 +106,7 @@ void ScrollableWrapper<T>::lcl_Scroll( long nX, long nY )
|
||||
template< class T>
|
||||
sal_IntPtr ScrollableWrapper<T>::LinkStubScrollBarHdl( void* pThis, void* pCaller)
|
||||
{
|
||||
return ((ScrollableWrapper<T>*)pThis )->ScrollBarHdl( (ScrollBar*)pCaller );
|
||||
return ((ScrollableWrapper<T>*)pThis )->ScrollBarHdl( static_cast<ScrollBar*>(pCaller) );
|
||||
}
|
||||
|
||||
template< class T>
|
||||
|
@@ -144,7 +144,7 @@ uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::GetChildAc
|
||||
// and returns its accessible
|
||||
|
||||
// MT: Change this later, normally a show/hide event shouldn't have the vcl::Window* in pData.
|
||||
vcl::Window* pChildWindow = (vcl::Window *) rVclWindowEvent.GetData();
|
||||
vcl::Window* pChildWindow = static_cast<vcl::Window *>(rVclWindowEvent.GetData());
|
||||
if( pChildWindow && GetWindow() == pChildWindow->GetAccessibleParentWindow() )
|
||||
return pChildWindow->GetAccessible( rVclWindowEvent.GetId() == VCLEVENT_WINDOW_SHOW );
|
||||
else
|
||||
@@ -200,7 +200,7 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind
|
||||
break;
|
||||
case VCLEVENT_WINDOW_CHILDDESTROYED:
|
||||
{
|
||||
vcl::Window* pWindow = (vcl::Window*) rVclWindowEvent.GetData();
|
||||
vcl::Window* pWindow = static_cast<vcl::Window*>(rVclWindowEvent.GetData());
|
||||
DBG_ASSERT( pWindow, "VCLEVENT_WINDOW_CHILDDESTROYED - Window=?" );
|
||||
if ( pWindow->GetAccessible( false ).is() )
|
||||
{
|
||||
@@ -265,7 +265,7 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind
|
||||
break;
|
||||
case VCLEVENT_WINDOW_FRAMETITLECHANGED:
|
||||
{
|
||||
OUString aOldName( *((OUString*) rVclWindowEvent.GetData()) );
|
||||
OUString aOldName( *static_cast<OUString*>(rVclWindowEvent.GetData()) );
|
||||
OUString aNewName( getAccessibleName() );
|
||||
aOldValue <<= aOldName;
|
||||
aNewValue <<= aNewName;
|
||||
@@ -297,7 +297,7 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind
|
||||
break;
|
||||
case VCLEVENT_WINDOW_MENUBARADDED:
|
||||
{
|
||||
MenuBar* pMenuBar = (MenuBar*) rVclWindowEvent.GetData();
|
||||
MenuBar* pMenuBar = static_cast<MenuBar*>(rVclWindowEvent.GetData());
|
||||
if ( pMenuBar )
|
||||
{
|
||||
uno::Reference< accessibility::XAccessible > xChild( pMenuBar->GetAccessible() );
|
||||
@@ -311,7 +311,7 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind
|
||||
break;
|
||||
case VCLEVENT_WINDOW_MENUBARREMOVED:
|
||||
{
|
||||
MenuBar* pMenuBar = (MenuBar*) rVclWindowEvent.GetData();
|
||||
MenuBar* pMenuBar = static_cast<MenuBar*>(rVclWindowEvent.GetData());
|
||||
if ( pMenuBar )
|
||||
{
|
||||
uno::Reference< accessibility::XAccessible > xChild( pMenuBar->GetAccessible() );
|
||||
|
@@ -65,7 +65,7 @@ IMPL_XTYPEPROVIDER_END
|
||||
|
||||
SvMemoryStream aMem;
|
||||
WriteDIB(maBitmap.GetBitmap(), aMem, false, true);
|
||||
return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
|
||||
return ::com::sun::star::uno::Sequence<sal_Int8>( static_cast<sal_Int8 const *>(aMem.GetData()), aMem.Tell() );
|
||||
}
|
||||
|
||||
::com::sun::star::uno::Sequence< sal_Int8 > VCLXBitmap::getMaskDIB() throw(::com::sun::star::uno::RuntimeException, std::exception)
|
||||
@@ -74,7 +74,7 @@ IMPL_XTYPEPROVIDER_END
|
||||
|
||||
SvMemoryStream aMem;
|
||||
WriteDIB(maBitmap.GetMask(), aMem, false, true);
|
||||
return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
|
||||
return ::com::sun::star::uno::Sequence<sal_Int8>( static_cast<sal_Int8 const *>(aMem.GetData()), aMem.Tell() );
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -178,7 +178,7 @@ sal_Int32 VCLXFont::getStringWidthArray( const OUString& str, ::com::sun::star::
|
||||
{
|
||||
vcl::Font aOldFont = pOutDev->GetFont();
|
||||
pOutDev->SetFont( maFont );
|
||||
long* pDXA = (long*)alloca(str.getLength() * sizeof(long));
|
||||
long* pDXA = static_cast<long*>(alloca(str.getLength() * sizeof(long)));
|
||||
nRet = pOutDev->GetTextArray( str, pDXA );
|
||||
rDXArray = ::com::sun::star::uno::Sequence<sal_Int32>( str.getLength() );
|
||||
for(int i = 0; i < str.getLength(); i++)
|
||||
|
@@ -494,7 +494,7 @@ void VCLXGraphics::drawTextArray( sal_Int32 x, sal_Int32 y, const OUString& rTex
|
||||
if( mpOutputDevice )
|
||||
{
|
||||
InitOutputDevice( INITOUTDEV_CLIPREGION|INITOUTDEV_RASTEROP|INITOUTDEV_COLORS|INITOUTDEV_FONT );
|
||||
long* pDXA = (long*)alloca(rText.getLength() * sizeof(long));
|
||||
long* pDXA = static_cast<long*>(alloca(rText.getLength() * sizeof(long)));
|
||||
for(int i = 0; i < rText.getLength(); i++)
|
||||
{
|
||||
pDXA[i] = rLongs[i];
|
||||
|
@@ -244,7 +244,7 @@ void VCLXPrinterPropertySet::selectForm( const OUString& rFormDescription ) thro
|
||||
SvMemoryStream aMem;
|
||||
aMem.WriteUInt32( BINARYSETUPMARKER );
|
||||
WriteJobSetup( aMem, GetPrinter()->GetJobSetup() );
|
||||
return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
|
||||
return ::com::sun::star::uno::Sequence<sal_Int8>( static_cast<sal_Int8 const *>(aMem.GetData()), aMem.Tell() );
|
||||
}
|
||||
|
||||
void VCLXPrinterPropertySet::setBinarySetup( const ::com::sun::star::uno::Sequence< sal_Int8 >& data ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception)
|
||||
|
@@ -480,8 +480,8 @@ extern "C"
|
||||
{
|
||||
static int SAL_CALL ComponentInfoCompare( const void* pFirst, const void* pSecond)
|
||||
{
|
||||
return( strcmp( ((ComponentInfo*)pFirst)->pName,
|
||||
((ComponentInfo*)pSecond)->pName ) );
|
||||
return( strcmp( static_cast<ComponentInfo const *>(pFirst)->pName,
|
||||
static_cast<ComponentInfo const *>(pSecond)->pName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,11 +505,11 @@ sal_uInt16 ImplGetComponentType( const OUString& rServiceName )
|
||||
else
|
||||
aSearch.pName = "window";
|
||||
|
||||
ComponentInfo* pInf = (ComponentInfo*) bsearch( &aSearch,
|
||||
ComponentInfo* pInf = static_cast<ComponentInfo*>(bsearch( &aSearch,
|
||||
(void*) aComponentInfos,
|
||||
sizeof( aComponentInfos ) / sizeof( ComponentInfo ),
|
||||
sizeof( ComponentInfo ),
|
||||
ComponentInfoCompare );
|
||||
ComponentInfoCompare ));
|
||||
|
||||
return pInf ? pInf->nWinType : 0;
|
||||
}
|
||||
@@ -595,7 +595,7 @@ static void SAL_CALL ToolkitWorkerFunction( void* pArgs )
|
||||
{
|
||||
osl_setThreadName("VCLXToolkit VCL main thread");
|
||||
|
||||
VCLXToolkit * pTk = (VCLXToolkit *)pArgs;
|
||||
VCLXToolkit * pTk = static_cast<VCLXToolkit *>(pArgs);
|
||||
bInitedByVCLToolkit = InitVCL();
|
||||
if( bInitedByVCLToolkit )
|
||||
{
|
||||
|
@@ -466,7 +466,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
{
|
||||
::com::sun::star::awt::PaintEvent aEvent;
|
||||
aEvent.Source = (::cppu::OWeakObject*)this;
|
||||
aEvent.UpdateRect = AWTRectangle( *(Rectangle*)rVclWindowEvent.GetData() );
|
||||
aEvent.UpdateRect = AWTRectangle( *static_cast<Rectangle*>(rVclWindowEvent.GetData()) );
|
||||
aEvent.Count = 0;
|
||||
mpImpl->getPaintListeners().windowPaint( aEvent );
|
||||
}
|
||||
@@ -651,7 +651,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
if ( mpImpl->getKeyListeners().getLength() )
|
||||
{
|
||||
::com::sun::star::awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent(
|
||||
*(KeyEvent*)rVclWindowEvent.GetData(), *this
|
||||
*static_cast<KeyEvent*>(rVclWindowEvent.GetData()), *this
|
||||
) );
|
||||
mpImpl->getKeyListeners().keyPressed( aEvent );
|
||||
}
|
||||
@@ -662,7 +662,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
if ( mpImpl->getKeyListeners().getLength() )
|
||||
{
|
||||
::com::sun::star::awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent(
|
||||
*(KeyEvent*)rVclWindowEvent.GetData(), *this
|
||||
*static_cast<KeyEvent*>(rVclWindowEvent.GetData()), *this
|
||||
) );
|
||||
mpImpl->getKeyListeners().keyReleased( aEvent );
|
||||
}
|
||||
@@ -670,7 +670,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
break;
|
||||
case VCLEVENT_WINDOW_COMMAND:
|
||||
{
|
||||
CommandEvent* pCmdEvt = (CommandEvent*)rVclWindowEvent.GetData();
|
||||
CommandEvent* pCmdEvt = static_cast<CommandEvent*>(rVclWindowEvent.GetData());
|
||||
if ( mpImpl->getMouseListeners().getLength() && ( pCmdEvt->GetCommand() == COMMAND_CONTEXTMENU ) )
|
||||
{
|
||||
// COMMAND_CONTEXTMENU als mousePressed mit PopupTrigger = sal_True versenden...
|
||||
@@ -698,7 +698,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
break;
|
||||
case VCLEVENT_WINDOW_MOUSEMOVE:
|
||||
{
|
||||
MouseEvent* pMouseEvt = (MouseEvent*)rVclWindowEvent.GetData();
|
||||
MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rVclWindowEvent.GetData());
|
||||
if ( mpImpl->getMouseListeners().getLength() && ( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() ) )
|
||||
{
|
||||
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) );
|
||||
@@ -726,7 +726,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
{
|
||||
if ( mpImpl->getMouseListeners().getLength() )
|
||||
{
|
||||
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) );
|
||||
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast<MouseEvent*>(rVclWindowEvent.GetData()), *this ) );
|
||||
Callback aCallback = ::boost::bind(
|
||||
&MouseListenerMultiplexer::mousePressed,
|
||||
&mpImpl->getMouseListeners(),
|
||||
@@ -740,7 +740,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
{
|
||||
if ( mpImpl->getMouseListeners().getLength() )
|
||||
{
|
||||
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) );
|
||||
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast<MouseEvent*>(rVclWindowEvent.GetData()), *this ) );
|
||||
Callback aCallback = ::boost::bind(
|
||||
&MouseListenerMultiplexer::mouseReleased,
|
||||
&mpImpl->getMouseListeners(),
|
||||
@@ -754,7 +754,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
{
|
||||
if ( mpImpl->getDockableWindowListeners().getLength() )
|
||||
{
|
||||
DockingData *pData = (DockingData*)rVclWindowEvent.GetData();
|
||||
DockingData *pData = static_cast<DockingData*>(rVclWindowEvent.GetData());
|
||||
|
||||
if( pData )
|
||||
{
|
||||
@@ -775,7 +775,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
{
|
||||
if ( mpImpl->getDockableWindowListeners().getLength() )
|
||||
{
|
||||
DockingData *pData = (DockingData*)rVclWindowEvent.GetData();
|
||||
DockingData *pData = static_cast<DockingData*>(rVclWindowEvent.GetData());
|
||||
|
||||
if( pData )
|
||||
{
|
||||
@@ -806,7 +806,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
{
|
||||
if ( mpImpl->getDockableWindowListeners().getLength() )
|
||||
{
|
||||
EndDockingData *pData = (EndDockingData*)rVclWindowEvent.GetData();
|
||||
EndDockingData *pData = static_cast<EndDockingData*>(rVclWindowEvent.GetData());
|
||||
|
||||
if( pData )
|
||||
{
|
||||
@@ -824,7 +824,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
{
|
||||
if ( mpImpl->getDockableWindowListeners().getLength() )
|
||||
{
|
||||
sal_Bool *p_bFloating = (sal_Bool*)rVclWindowEvent.GetData();
|
||||
sal_Bool *p_bFloating = static_cast<sal_Bool*>(rVclWindowEvent.GetData());
|
||||
|
||||
::com::sun::star::lang::EventObject aEvent;
|
||||
aEvent.Source = (::cppu::OWeakObject*)this;
|
||||
@@ -854,7 +854,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||
{
|
||||
if ( mpImpl->getDockableWindowListeners().getLength() )
|
||||
{
|
||||
EndPopupModeData *pData = (EndPopupModeData*)rVclWindowEvent.GetData();
|
||||
EndPopupModeData *pData = static_cast<EndPopupModeData*>(rVclWindowEvent.GetData());
|
||||
|
||||
if( pData )
|
||||
{
|
||||
|
Reference in New Issue
Block a user