summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:07:54 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:27 +0100
commit93a8ef5a2d3b23b193261177eee4fb13758dd7cc (patch)
tree8d5f077f3bd18378f455025c8ea00b03db762819 /toolkit
parent2828d92eee63a4a5306ef64482bc7d1db3459406 (diff)
Clean up C-style casts from pointers to void
Change-Id: I98cf0c0eee558662d1e3dd20cca99ec1ca8c9a2c
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/scrollabledialog.cxx2
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx10
-rw-r--r--toolkit/source/awt/vclxbitmap.cxx4
-rw-r--r--toolkit/source/awt/vclxfont.cxx2
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx2
-rw-r--r--toolkit/source/awt/vclxprinter.cxx2
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx10
-rw-r--r--toolkit/source/awt/vclxwindow.cxx24
8 files changed, 28 insertions, 28 deletions
diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx
index 30533923b08f..650cc12b66ef 100644
--- a/toolkit/source/awt/scrollabledialog.cxx
+++ b/toolkit/source/awt/scrollabledialog.cxx
@@ -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>
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index f6b4c4a6e0c6..b1f338690563 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -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() );
diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx
index c6ccd6ff8bc9..670dcd5f76b3 100644
--- a/toolkit/source/awt/vclxbitmap.cxx
+++ b/toolkit/source/awt/vclxbitmap.cxx
@@ -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: */
diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx
index d937ad47591e..f7e3fe6d0ad4 100644
--- a/toolkit/source/awt/vclxfont.cxx
+++ b/toolkit/source/awt/vclxfont.cxx
@@ -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++)
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 0c92655da6a7..ee009e86ef22 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -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];
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx
index 24ea0591443d..0964dafc2753 100644
--- a/toolkit/source/awt/vclxprinter.cxx
+++ b/toolkit/source/awt/vclxprinter.cxx
@@ -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)
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index bbcd62aa0e24..1dce0ddc1cee 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -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 )
{
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 69407624c926..5e53141995e2 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -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 )
{