summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:29:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:29:41 +0200
commitf6ec07a3963a401dc736baa9bdd2ed3c7325bb66 (patch)
tree9cad620eb2cd5846464cf151b10949a8e36e5200 /vcl/source
parent9f356d3e66127bf14fe957962e8451dbd27c8ac8 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I07bf1403e6b992807541a499b786d47f835b2f81
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/dndhelp.cxx2
-rw-r--r--vcl/source/app/svapp.cxx2
-rw-r--r--vcl/source/components/dtranscomp.cxx6
-rw-r--r--vcl/source/control/combobox.cxx4
-rw-r--r--vcl/source/control/ilstbox.cxx4
-rw-r--r--vcl/source/control/lstbox.cxx4
-rw-r--r--vcl/source/edit/vclmedit.cxx6
-rw-r--r--vcl/source/fontsubset/gsub.cxx2
-rw-r--r--vcl/source/fontsubset/ttcr.cxx8
-rw-r--r--vcl/source/gdi/alpha.cxx4
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx4
-rw-r--r--vcl/source/gdi/gdimtf.cxx2
-rw-r--r--vcl/source/gdi/impanmvw.cxx2
-rw-r--r--vcl/source/gdi/metaact.cxx110
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx2
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx2
-rw-r--r--vcl/source/outdev/bitmap.cxx4
-rw-r--r--vcl/source/outdev/font.cxx2
-rw-r--r--vcl/source/outdev/text.cxx6
-rw-r--r--vcl/source/outdev/transparent.cxx4
-rw-r--r--vcl/source/window/dialog.cxx2
-rw-r--r--vcl/source/window/event.cxx10
-rw-r--r--vcl/source/window/paint.cxx2
-rw-r--r--vcl/source/window/resource.cxx2
-rw-r--r--vcl/source/window/syswin.cxx4
-rw-r--r--vcl/source/window/window.cxx4
27 files changed, 104 insertions, 104 deletions
diff --git a/vcl/source/app/dndhelp.cxx b/vcl/source/app/dndhelp.cxx
index bba7452ca2ee..82961c2d154b 100644
--- a/vcl/source/app/dndhelp.cxx
+++ b/vcl/source/app/dndhelp.cxx
@@ -74,7 +74,7 @@ vcl::unohelper::DragAndDropWrapper::~DragAndDropWrapper()
uno::Any vcl::unohelper::DragAndDropWrapper::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException, std::exception)
{
uno::Any aRet = ::cppu::queryInterface( rType,
- (static_cast< ::com::sun::star::lang::XEventListener* >( (::com::sun::star::datatransfer::dnd::XDragGestureListener*)this) ),
+ (static_cast< ::com::sun::star::lang::XEventListener* >( static_cast<com::sun::star::datatransfer::dnd::XDragGestureListener*>(this)) ),
(static_cast< ::com::sun::star::datatransfer::dnd::XDragGestureListener* >(this)),
(static_cast< ::com::sun::star::datatransfer::dnd::XDragSourceListener* >(this)),
(static_cast< ::com::sun::star::datatransfer::dnd::XDropTargetListener* >(this)) );
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 97621a5b1c87..536e81b7d229 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -675,7 +675,7 @@ void Application::RemoveKeyListener( const Link<>& rKeyListener )
bool Application::HandleKey( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKeyEvent )
{
// let listeners process the key event
- VclWindowEvent aEvent( pWin, nEvent, (void *) pKeyEvent );
+ VclWindowEvent aEvent( pWin, nEvent, static_cast<void *>(pKeyEvent) );
ImplSVData* pSVData = ImplGetSVData();
bool bProcessed = false;
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index f2d221d743d3..53c90cab4c77 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -514,17 +514,17 @@ Reference< XInterface > SAL_CALL DropTarget_createInstance( const Reference< XMu
*/
Reference< XInterface > SalInstance::CreateClipboard( const Sequence< Any >& )
{
- return Reference< XInterface >( ( cppu::OWeakObject * )new vcl::GenericClipboard() );
+ return Reference< XInterface >( static_cast<cppu::OWeakObject *>(new vcl::GenericClipboard()) );
}
Reference< XInterface > SalInstance::CreateDragSource()
{
- return Reference< XInterface >( ( cppu::OWeakObject * )new vcl::GenericDragSource() );
+ return Reference< XInterface >( static_cast<cppu::OWeakObject *>(new vcl::GenericDragSource()) );
}
Reference< XInterface > SalInstance::CreateDropTarget()
{
- return Reference< XInterface >( ( cppu::OWeakObject * )new vcl::GenericDropTarget() );
+ return Reference< XInterface >( static_cast<cppu::OWeakObject *>(new vcl::GenericDropTarget()) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 4ba8095ace4b..096452a21baf 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -1051,7 +1051,7 @@ Size ComboBox::CalcAdjustedSize( const Size& rPrefSize ) const
{
Size aSz = rPrefSize;
sal_Int32 nLeft, nTop, nRight, nBottom;
- ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom );
+ static_cast<vcl::Window*>(const_cast<ComboBox *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
aSz.Height() -= nTop+nBottom;
if ( !IsDropDownBox() )
{
@@ -1367,7 +1367,7 @@ void ComboBox::SetNoSelection()
Rectangle ComboBox::GetBoundingRectangle( sal_Int32 nItem ) const
{
Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
- Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( (vcl::Window*)this );
+ Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ComboBox *>(this)) );
aRect.Move( aOffset.TopLeft().X(), aOffset.TopLeft().Y() );
return aRect;
}
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 2cf7dfb9407a..57360822dbb3 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -3008,8 +3008,8 @@ void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth,
// The number also cannot be calculated by List/Combobox, as for
// this the presence of the vertical Scrollbar has to be known.
mpImplLB->SetSizePixel( GetOutputSizePixel() );
- ((vcl::Window*)mpImplLB)->Resize();
- ((vcl::Window*)mpImplLB->GetMainWindow())->Resize();
+ static_cast<vcl::Window*>(mpImplLB)->Resize();
+ static_cast<vcl::Window*>(mpImplLB->GetMainWindow())->Resize();
}
}
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 6944518cef79..b476d8647ada 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -1170,7 +1170,7 @@ bool ListBox::IsInDropDown() const
Rectangle ListBox::GetBoundingRectangle( sal_Int32 nItem ) const
{
Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
- Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( (vcl::Window*)this );
+ Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( static_cast<vcl::Window*>(const_cast<ListBox *>(this)) );
aRect.Move( aOffset.TopLeft().X(), aOffset.TopLeft().Y() );
return aRect;
}
@@ -1295,7 +1295,7 @@ Size ListBox::CalcAdjustedSize( const Size& rPrefSize ) const
{
Size aSz = rPrefSize;
sal_Int32 nLeft, nTop, nRight, nBottom;
- ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom );
+ static_cast<vcl::Window*>(const_cast<ListBox *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
aSz.Height() -= nTop+nBottom;
if ( !IsDropDownBox() )
{
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 11471c8c7f3d..f4b87780f1f8 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -1251,7 +1251,7 @@ Size VclMultiLineEdit::CalcMinimumSize() const
Size aSz = pImpVclMEdit->CalcMinimumSize();
sal_Int32 nLeft, nTop, nRight, nBottom;
- ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom );
+ static_cast<vcl::Window*>(const_cast<VclMultiLineEdit *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
aSz.Width() += nLeft+nRight;
aSz.Height() += nTop+nBottom;
@@ -1262,7 +1262,7 @@ Size VclMultiLineEdit::CalcAdjustedSize( const Size& rPrefSize ) const
{
Size aSz = rPrefSize;
sal_Int32 nLeft, nTop, nRight, nBottom;
- ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom );
+ static_cast<vcl::Window*>(const_cast<VclMultiLineEdit *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
// center vertically for whole lines
@@ -1283,7 +1283,7 @@ Size VclMultiLineEdit::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) c
Size aSz = pImpVclMEdit->CalcBlockSize( nColumns, nLines );
sal_Int32 nLeft, nTop, nRight, nBottom;
- ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom );
+ static_cast<vcl::Window*>(const_cast<VclMultiLineEdit *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
aSz.Width() += nLeft+nRight;
aSz.Height() += nTop+nBottom;
return aSz;
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index 77706e065583..a716ad719626 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -307,7 +307,7 @@ bool ReadGSUB( struct _TrueTypeFont* pTTFile,
if( !aSubstVector.empty() )
{
GlyphSubstitution* pGSubstitution = new GlyphSubstitution;
- pTTFile->pGSubstitution = (void*)pGSubstitution;
+ pTTFile->pGSubstitution = static_cast<void*>(pGSubstitution);
for( subst_it = aSubstVector.begin(); subst_it != aSubstVector.end(); ++subst_it )
(*pGSubstitution)[ (*subst_it).first ] = (*subst_it).second;
}
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 6f467b0a0d6e..db3367d6a905 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -925,7 +925,7 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
PutUInt16(fontDirectionHint, ptr, 48, 1);
PutUInt16(0, ptr, 52, 1); /* glyph data format: 0 */
- table->data = (void *) ptr;
+ table->data = static_cast<void *>(ptr);
table->tag = T_head;
table->rawdata = 0;
@@ -954,7 +954,7 @@ TrueTypeTable *TrueTypeTableNew_hhea(sal_Int16 ascender,
PutUInt16(0, ptr, 30, 1); /* reserved 5 */
PutUInt16(0, ptr, 32, 1); /* metricDataFormat */
- table->data = (void *) ptr;
+ table->data = static_cast<void *>(ptr);
table->tag = T_hhea;
table->rawdata = 0;
@@ -997,7 +997,7 @@ TrueTypeTable *TrueTypeTableNew_glyf()
assert(l != 0);
- listSetElementDtor(l, (list_destructor)FreeGlyphData);
+ listSetElementDtor(l, FreeGlyphData);
table->data = l;
table->rawdata = 0;
@@ -1054,7 +1054,7 @@ TrueTypeTable *TrueTypeTableNew_name(int n, NameRecord *nr)
assert(l != 0);
- listSetElementDtor(l, (list_destructor)DisposeNameRecord);
+ listSetElementDtor(l, DisposeNameRecord);
if (n != 0) {
int i;
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index ad1b5cc744e1..0e93985a87b2 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -51,7 +51,7 @@ AlphaMask::~AlphaMask()
AlphaMask& AlphaMask::operator=( const Bitmap& rBitmap )
{
- *(Bitmap*) this = rBitmap;
+ *static_cast<Bitmap*>(this) = rBitmap;
if( !!rBitmap )
Bitmap::Convert( BMP_CONVERSION_8BIT_GREYS );
@@ -68,7 +68,7 @@ void AlphaMask::ImplSetBitmap( const Bitmap& rBitmap )
{
SAL_WARN_IF( 8 != rBitmap.GetBitCount(), "vcl.gdi", "Bitmap should be 8bpp, not " << rBitmap.GetBitCount() << "bpp" );
SAL_WARN_IF( !rBitmap.HasGreyPalette(), "vcl.gdi", "Bitmap isn't greyscale" );
- *(Bitmap*) this = rBitmap;
+ *static_cast<Bitmap*>(this) = rBitmap;
}
Bitmap AlphaMask::GetBitmap() const
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index fc8b6e91fe73..b0d99c54405a 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -875,7 +875,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
tools::PolyPolygon aPath;
{ // read SvtGraphicFill
- SvMemoryStream aMemStm((void*)pA->GetData(), pA->GetDataSize(),StreamMode::READ);
+ SvMemoryStream aMemStm(const_cast<sal_uInt8 *>(pA->GetData()), pA->GetDataSize(),StreamMode::READ);
ReadSvtGraphicFill( aMemStm, aFilling );
}
@@ -916,7 +916,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
Polygon aPath;
{ // read SvtGraphicFill
- SvMemoryStream aMemStm((void*)pA->GetData(), pA->GetDataSize(),StreamMode::READ);
+ SvMemoryStream aMemStm(const_cast<sal_uInt8 *>(pA->GetData()), pA->GetDataSize(),StreamMode::READ);
ReadSvtGraphicStroke( aMemStm, aStroke );
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 94be557415aa..fcb661159c2e 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1196,7 +1196,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
if ( pCommentAct->GetDataSize() )
{
- SvMemoryStream aMemStm( (void*)pCommentAct->GetData(), pCommentAct->GetDataSize(), StreamMode::READ );
+ SvMemoryStream aMemStm( const_cast<sal_uInt8 *>(pCommentAct->GetData()), pCommentAct->GetDataSize(), StreamMode::READ );
SvMemoryStream aDest;
if ( bPathStroke )
{
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 9d7cea0b529a..2176ee562ab3 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -308,7 +308,7 @@ AInfo* ImplAnimView::createAInfo() const
pAInfo->aStartOrg = maPt;
pAInfo->aStartSize = maSz;
pAInfo->pOutDev = mpOut;
- pAInfo->pViewData = (void*) this;
+ pAInfo->pViewData = const_cast<ImplAnimView *>(this);
pAInfo->nExtraData = mnExtraData;
pAInfo->bPause = mbPause;
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 887bf7f621db..10b0e7f469ed 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -293,7 +293,7 @@ void MetaPixelAction::Execute( OutputDevice* pOut )
MetaAction* MetaPixelAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaPixelAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaPixelAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -348,7 +348,7 @@ void MetaPointAction::Execute( OutputDevice* pOut )
MetaAction* MetaPointAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaPointAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaPointAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -412,7 +412,7 @@ void MetaLineAction::Execute( OutputDevice* pOut )
MetaAction* MetaLineAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaLineAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaLineAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -481,7 +481,7 @@ void MetaRectAction::Execute( OutputDevice* pOut )
MetaAction* MetaRectAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaRectAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaRectAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -538,7 +538,7 @@ void MetaRoundRectAction::Execute( OutputDevice* pOut )
MetaAction* MetaRoundRectAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaRoundRectAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaRoundRectAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -595,7 +595,7 @@ void MetaEllipseAction::Execute( OutputDevice* pOut )
MetaAction* MetaEllipseAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaEllipseAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaEllipseAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -650,7 +650,7 @@ void MetaArcAction::Execute( OutputDevice* pOut )
MetaAction* MetaArcAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaArcAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaArcAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -715,7 +715,7 @@ void MetaPieAction::Execute( OutputDevice* pOut )
MetaAction* MetaPieAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaPieAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaPieAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -780,7 +780,7 @@ void MetaChordAction::Execute( OutputDevice* pOut )
MetaAction* MetaChordAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaChordAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaChordAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -851,7 +851,7 @@ void MetaPolyLineAction::Execute( OutputDevice* pOut )
MetaAction* MetaPolyLineAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaPolyLineAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaPolyLineAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -933,7 +933,7 @@ void MetaPolygonAction::Execute( OutputDevice* pOut )
MetaAction* MetaPolygonAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaPolygonAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaPolygonAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1002,7 +1002,7 @@ void MetaPolyPolygonAction::Execute( OutputDevice* pOut )
MetaAction* MetaPolyPolygonAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaPolyPolygonAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaPolyPolygonAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1115,7 +1115,7 @@ void MetaTextAction::Execute( OutputDevice* pOut )
MetaAction* MetaTextAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaTextAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTextAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1225,7 +1225,7 @@ void MetaTextArrayAction::Execute( OutputDevice* pOut )
MetaAction* MetaTextArrayAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaTextArrayAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTextArrayAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1365,7 +1365,7 @@ void MetaStretchTextAction::Execute( OutputDevice* pOut )
MetaAction* MetaStretchTextAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaStretchTextAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaStretchTextAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1443,7 +1443,7 @@ void MetaTextRectAction::Execute( OutputDevice* pOut )
MetaAction* MetaTextRectAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaTextRectAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTextRectAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1519,7 +1519,7 @@ void MetaTextLineAction::Execute( OutputDevice* pOut )
MetaAction* MetaTextLineAction::Clone()
{
- MetaAction* pClone = (MetaAction*)new MetaTextLineAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTextLineAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1598,7 +1598,7 @@ void MetaBmpAction::Execute( OutputDevice* pOut )
MetaAction* MetaBmpAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaBmpAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaBmpAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1659,7 +1659,7 @@ void MetaBmpScaleAction::Execute( OutputDevice* pOut )
MetaAction* MetaBmpScaleAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaBmpScaleAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaBmpScaleAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1729,7 +1729,7 @@ void MetaBmpScalePartAction::Execute( OutputDevice* pOut )
MetaAction* MetaBmpScalePartAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaBmpScalePartAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaBmpScalePartAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1861,7 +1861,7 @@ void MetaBmpExScaleAction::Execute( OutputDevice* pOut )
MetaAction* MetaBmpExScaleAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaBmpExScaleAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaBmpExScaleAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -1931,7 +1931,7 @@ void MetaBmpExScalePartAction::Execute( OutputDevice* pOut )
MetaAction* MetaBmpExScalePartAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaBmpExScalePartAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaBmpExScalePartAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2005,7 +2005,7 @@ void MetaMaskAction::Execute( OutputDevice* pOut )
MetaAction* MetaMaskAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaMaskAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaMaskAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2069,7 +2069,7 @@ void MetaMaskScaleAction::Execute( OutputDevice* pOut )
MetaAction* MetaMaskScaleAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaMaskScaleAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaMaskScaleAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2142,7 +2142,7 @@ void MetaMaskScalePartAction::Execute( OutputDevice* pOut )
MetaAction* MetaMaskScalePartAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaMaskScalePartAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaMaskScalePartAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2216,7 +2216,7 @@ void MetaGradientAction::Execute( OutputDevice* pOut )
MetaAction* MetaGradientAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaGradientAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaGradientAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2276,7 +2276,7 @@ void MetaGradientExAction::Execute( OutputDevice* pOut )
MetaAction* MetaGradientExAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaGradientExAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaGradientExAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2338,7 +2338,7 @@ void MetaHatchAction::Execute( OutputDevice* pOut )
MetaAction* MetaHatchAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaHatchAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaHatchAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2401,7 +2401,7 @@ void MetaWallpaperAction::Execute( OutputDevice* pOut )
MetaAction* MetaWallpaperAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaWallpaperAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaWallpaperAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2460,7 +2460,7 @@ void MetaClipRegionAction::Execute( OutputDevice* pOut )
MetaAction* MetaClipRegionAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaClipRegionAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaClipRegionAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2516,7 +2516,7 @@ void MetaISectRectClipRegionAction::Execute( OutputDevice* pOut )
MetaAction* MetaISectRectClipRegionAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaISectRectClipRegionAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaISectRectClipRegionAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2569,7 +2569,7 @@ void MetaISectRegionClipRegionAction::Execute( OutputDevice* pOut )
MetaAction* MetaISectRegionClipRegionAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaISectRegionClipRegionAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaISectRegionClipRegionAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2624,7 +2624,7 @@ void MetaMoveClipRegionAction::Execute( OutputDevice* pOut )
MetaAction* MetaMoveClipRegionAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaMoveClipRegionAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaMoveClipRegionAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2681,7 +2681,7 @@ void MetaLineColorAction::Execute( OutputDevice* pOut )
MetaAction* MetaLineColorAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaLineColorAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaLineColorAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2731,7 +2731,7 @@ void MetaFillColorAction::Execute( OutputDevice* pOut )
MetaAction* MetaFillColorAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaFillColorAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaFillColorAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2776,7 +2776,7 @@ void MetaTextColorAction::Execute( OutputDevice* pOut )
MetaAction* MetaTextColorAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaTextColorAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTextColorAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2823,7 +2823,7 @@ void MetaTextFillColorAction::Execute( OutputDevice* pOut )
MetaAction* MetaTextFillColorAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaTextFillColorAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTextFillColorAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2873,7 +2873,7 @@ void MetaTextLineColorAction::Execute( OutputDevice* pOut )
MetaAction* MetaTextLineColorAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaTextLineColorAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTextLineColorAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2923,7 +2923,7 @@ void MetaOverlineColorAction::Execute( OutputDevice* pOut )
MetaAction* MetaOverlineColorAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaOverlineColorAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaOverlineColorAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -2969,7 +2969,7 @@ void MetaTextAlignAction::Execute( OutputDevice* pOut )
MetaAction* MetaTextAlignAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaTextAlignAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTextAlignAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3013,7 +3013,7 @@ void MetaMapModeAction::Execute( OutputDevice* pOut )
MetaAction* MetaMapModeAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaMapModeAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaMapModeAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3073,7 +3073,7 @@ void MetaFontAction::Execute( OutputDevice* pOut )
MetaAction* MetaFontAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaFontAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaFontAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3130,7 +3130,7 @@ void MetaPushAction::Execute( OutputDevice* pOut )
MetaAction* MetaPushAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaPushAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaPushAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3169,7 +3169,7 @@ void MetaPopAction::Execute( OutputDevice* pOut )
MetaAction* MetaPopAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaPopAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaPopAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3206,7 +3206,7 @@ void MetaRasterOpAction::Execute( OutputDevice* pOut )
MetaAction* MetaRasterOpAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaRasterOpAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaRasterOpAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3252,7 +3252,7 @@ void MetaTransparentAction::Execute( OutputDevice* pOut )
MetaAction* MetaTransparentAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaTransparentAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTransparentAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3325,7 +3325,7 @@ void MetaFloatTransparentAction::Execute( OutputDevice* pOut )
MetaAction* MetaFloatTransparentAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaFloatTransparentAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaFloatTransparentAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3394,7 +3394,7 @@ void MetaEPSAction::Execute( OutputDevice* pOut )
MetaAction* MetaEPSAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaEPSAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaEPSAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3464,7 +3464,7 @@ void MetaRefPointAction::Execute( OutputDevice* pOut )
MetaAction* MetaRefPointAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaRefPointAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaRefPointAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3544,7 +3544,7 @@ void MetaCommentAction::Execute( OutputDevice* pOut )
MetaAction* MetaCommentAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaCommentAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaCommentAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3558,7 +3558,7 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
if ( bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN" )
{
- SvMemoryStream aMemStm( (void*)mpData, mnDataSize, StreamMode::READ );
+ SvMemoryStream aMemStm( static_cast<void*>(mpData), mnDataSize, StreamMode::READ );
SvMemoryStream aDest;
if ( bPathStroke )
{
@@ -3614,7 +3614,7 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
bool bPathStroke = (maComment == "XPATHSTROKE_SEQ_BEGIN");
if ( bPathStroke || maComment == "XPATHFILL_SEQ_BEGIN" )
{
- SvMemoryStream aMemStm( (void*)mpData, mnDataSize, StreamMode::READ );
+ SvMemoryStream aMemStm( static_cast<void*>(mpData), mnDataSize, StreamMode::READ );
SvMemoryStream aDest;
if ( bPathStroke )
{
@@ -3636,7 +3636,7 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
delete[] mpData;
ImplInitDynamicData( static_cast<const sal_uInt8*>( aDest.GetData() ), aDest.Tell() );
} else if( maComment == "EMF_PLUS_HEADER_INFO" ){
- SvMemoryStream aMemStm( (void*)mpData, mnDataSize, StreamMode::READ );
+ SvMemoryStream aMemStm( static_cast<void*>(mpData), mnDataSize, StreamMode::READ );
SvMemoryStream aDest;
sal_Int32 nLeft(0), nRight(0), nTop(0), nBottom(0);
@@ -3724,7 +3724,7 @@ void MetaLayoutModeAction::Execute( OutputDevice* pOut )
MetaAction* MetaLayoutModeAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaLayoutModeAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaLayoutModeAction( *this ));
pClone->ResetRefCount();
return pClone;
}
@@ -3769,7 +3769,7 @@ void MetaTextLanguageAction::Execute( OutputDevice* pOut )
MetaAction* MetaTextLanguageAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaTextLanguageAction( *this );
+ MetaAction* pClone = static_cast<MetaAction*>(new MetaTextLanguageAction( *this ));
pClone->ResetRefCount();
return pClone;
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 5bd32277186f..fc13cbb5d765 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1757,7 +1757,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
m_pCodec( NULL ),
m_pMemStream(NULL),
m_aDocDigest( rtl_digest_createMD5() ),
- m_aCipher( (rtlCipher)NULL ),
+ m_aCipher( nullptr ),
m_aDigest( NULL ),
m_nKeyLength(0),
m_nRC4KeyLength(0),
@@ -6631,7 +6631,7 @@ my_NSS_CMSAttributeArray_AddAttr(PLArenaPool *poolp, NSSCMSAttribute ***attrs, N
goto loser; /* XXX or would it be better to replace it? */
/* no, shove it in */
- if (my_NSS_CMSArray_Add(poolp, reinterpret_cast<void ***>(attrs), (void *)attr) != SECSuccess)
+ if (my_NSS_CMSArray_Add(poolp, reinterpret_cast<void ***>(attrs), static_cast<void *>(attr)) != SECSuccess)
goto loser;
PORT_ArenaUnmark(poolp, mark);
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 1bea52978961..9c4150f8f57a 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -550,7 +550,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
const sal_uInt8* pData = pA->GetData();
if ( pData )
{
- SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), StreamMode::READ );
+ SvMemoryStream aMemStm( const_cast<sal_uInt8 *>(pData), pA->GetDataSize(), StreamMode::READ );
bool bSkipSequence = false;
OString sSeqEnd;
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index ef6e1ac4d311..0c713bdfa83b 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1315,7 +1315,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
if( vi )
{
SAL_INFO("vcl.opengl", "using VisualID " << vi->visualid);
- aWinData.pVisual = (void*)(vi->visual);
+ aWinData.pVisual = static_cast<void*>(vi->visual);
}
#endif
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 718cef96f455..48ac3730956a 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -430,7 +430,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
if ( aVDev->SetOutputSizePixel( aRect.GetSize() ) )
{
- if ( ((OutputDevice*)aVDev.get())->mpGraphics || ((OutputDevice*)aVDev.get())->AcquireGraphics() )
+ if ( static_cast<OutputDevice*>(aVDev.get())->mpGraphics || static_cast<OutputDevice*>(aVDev.get())->AcquireGraphics() )
{
if ( (nWidth > 0) && (nHeight > 0) )
{
@@ -438,7 +438,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
(aRect.Left() < mnOutOffX) ? (mnOutOffX - aRect.Left()) : 0L,
(aRect.Top() < mnOutOffY) ? (mnOutOffY - aRect.Top()) : 0L,
nWidth, nHeight);
- (((OutputDevice*)aVDev.get())->mpGraphics)->CopyBits( aPosAry, mpGraphics, this, this );
+ (static_cast<OutputDevice*>(aVDev.get())->mpGraphics)->CopyBits( aPosAry, mpGraphics, this, this );
}
else
{
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 216c8a6f8fcd..eb43913f3deb 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -610,7 +610,7 @@ void OutputDevice::ImplClearAllFontData(bool bNewFontLists)
if ( pFrame->AcquireGraphics() )
{
// Stupid typecast here and somewhere ((OutputDevice*)&aVDev)->, because bug in .NET2002 compiler
- OutputDevice *pDevice = (OutputDevice*)pFrame;
+ OutputDevice *pDevice = static_cast<OutputDevice*>(pFrame);
pDevice->mpGraphics->ClearDevFontCache();
pDevice->mpGraphics->GetDevFontList(pFrame->mpWindowImpl->mpFrameData->mpFontCollection);
}
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 639151d50a76..9c4f07131bb3 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -255,7 +255,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
// draw text into upper left corner
rSalLayout.DrawBase() -= aBoundRect.TopLeft();
- rSalLayout.DrawText( *((OutputDevice*)pVDev)->mpGraphics );
+ rSalLayout.DrawText( *static_cast<OutputDevice*>(pVDev)->mpGraphics );
Bitmap aBmp = pVDev->GetBitmap( Point(), aBoundRect.GetSize() );
if ( !aBmp || !aBmp.Rotate( mpFontEntry->mnOwnOrientation, COL_WHITE ) )
@@ -2817,8 +2817,8 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
{
Point& rPt = rPoly[k];
rPt -= aOffset;
- int nPixelX = rPt.X() - ((OutputDevice*)aVDev.get())->mnTextOffX + nXOffset;
- int nPixelY = rPt.Y() - ((OutputDevice*)aVDev.get())->mnTextOffY;
+ int nPixelX = rPt.X() - static_cast<OutputDevice*>(aVDev.get())->mnTextOffX + nXOffset;
+ int nPixelY = rPt.Y() - static_cast<OutputDevice*>(aVDev.get())->mnTextOffY;
rPt.X() = ImplDevicePixelToLogicWidth( nPixelX );
rPt.Y() = ImplDevicePixelToLogicHeight( nPixelY );
}
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 2275169eb4f0..34f01a305b42 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -695,8 +695,8 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
{
ScopedVclPtrInstance< VirtualDevice > xVDev;
- ((OutputDevice*)xVDev.get())->mnDPIX = mnDPIX;
- ((OutputDevice*)xVDev.get())->mnDPIY = mnDPIY;
+ static_cast<OutputDevice*>(xVDev.get())->mnDPIX = mnDPIX;
+ static_cast<OutputDevice*>(xVDev.get())->mnDPIY = mnDPIY;
if( xVDev->SetOutputSizePixel( aDstRect.GetSize() ) )
{
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index f4250be4de59..7d01ba35778a 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1089,7 +1089,7 @@ void Dialog::GrabFocusToFirstControl()
void Dialog::GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const
{
- ScopedVclPtrInstance<ImplBorderWindow> aImplWin( (vcl::Window*)this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP );
+ ScopedVclPtrInstance<ImplBorderWindow> aImplWin( static_cast<vcl::Window*>(const_cast<Dialog *>(this)), WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP );
aImplWin->GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder );
}
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index eda79c040bbd..ec6a9b6e6153 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -360,7 +360,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
{
if ( rNEvt.GetWindow() == this )
- CallEventListeners( VCLEVENT_WINDOW_MOUSEMOVE, (void*)rNEvt.GetMouseEvent() );
+ CallEventListeners( VCLEVENT_WINDOW_MOUSEMOVE, const_cast<MouseEvent *>(rNEvt.GetMouseEvent()) );
else
{
MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
@@ -373,7 +373,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
{
if ( rNEvt.GetWindow() == this )
- CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, (void*)rNEvt.GetMouseEvent() );
+ CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, const_cast<MouseEvent *>(rNEvt.GetMouseEvent()) );
else
{
MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
@@ -386,7 +386,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
{
if ( rNEvt.GetWindow() == this )
- CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, (void*)rNEvt.GetMouseEvent() );
+ CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, const_cast<MouseEvent *>(rNEvt.GetMouseEvent()) );
else
{
MouseEvent aMouseEvent = ImplTranslateMouseEvent( *rNEvt.GetMouseEvent(), rNEvt.GetWindow(), this );
@@ -397,12 +397,12 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt )
else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
- CallEventListeners( VCLEVENT_WINDOW_KEYINPUT, (void*)rNEvt.GetKeyEvent() );
+ CallEventListeners( VCLEVENT_WINDOW_KEYINPUT, const_cast<KeyEvent *>(rNEvt.GetKeyEvent()) );
}
else if( rNEvt.GetType() == MouseNotifyEvent::KEYUP )
{
if ( mpWindowImpl->mbCompoundControl || ( rNEvt.GetWindow() == this ) )
- CallEventListeners( VCLEVENT_WINDOW_KEYUP, (void*)rNEvt.GetKeyEvent() );
+ CallEventListeners( VCLEVENT_WINDOW_KEYUP, const_cast<KeyEvent *>(rNEvt.GetKeyEvent()) );
}
if ( aDelData.IsDead() )
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index ad7fb721728b..1dcf72a1a3b9 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -961,7 +961,7 @@ void Window::PostPaint(vcl::RenderContext& /*rRenderContext*/)
void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect)
{
- CallEventListeners(VCLEVENT_WINDOW_PAINT, (void*)&rRect);
+ CallEventListeners(VCLEVENT_WINDOW_PAINT, const_cast<Rectangle *>(&rRect));
}
void Window::SetPaintTransparent( bool bTransparent )
diff --git a/vcl/source/window/resource.cxx b/vcl/source/window/resource.cxx
index 9c8ce32f15e9..6c3aeb3f90d6 100644
--- a/vcl/source/window/resource.cxx
+++ b/vcl/source/window/resource.cxx
@@ -42,7 +42,7 @@ WinBits Window::ImplInitRes( const ResId& rResId )
char* pRes = static_cast<char*>(GetClassRes());
pRes += 8;
- sal_uInt32 nStyle = (sal_uInt32)GetLongRes( (void*)pRes );
+ sal_uInt32 nStyle = (sal_uInt32)GetLongRes( static_cast<void*>(pRes) );
rResId.SetWinBits( nStyle );
return nStyle;
}
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 4e46c8acb74c..c08a60168a93 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -910,14 +910,14 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css::
pOldWindow = NULL;
if ( pOldWindow )
{
- CallEventListeners( VCLEVENT_WINDOW_MENUBARREMOVED, (void*) pOldMenuBar );
+ CallEventListeners( VCLEVENT_WINDOW_MENUBARREMOVED, static_cast<void*>(pOldMenuBar) );
pOldWindow->SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >() );
}
if ( pMenuBar )
{
DBG_ASSERT( !pMenuBar->pWindow, "SystemWindow::SetMenuBar() - MenuBars can only set in one SystemWindow at time" );
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow( pNewWindow = MenuBar::ImplCreate( mpWindowImpl->mpBorderWindow, pOldWindow, pMenuBar, rFrame));
- CallEventListeners( VCLEVENT_WINDOW_MENUBARADDED, (void*) pMenuBar );
+ CallEventListeners( VCLEVENT_WINDOW_MENUBARADDED, static_cast<void*>(pMenuBar) );
}
else
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow( NULL );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 77087aa27f89..497fc42de8bf 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -904,7 +904,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
nStyle |= WB_BORDER;
}
VclPtrInstance<ImplBorderWindow> pBorderWin( pParent, nStyle & (WB_BORDER | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_NEEDSFOCUS), nBorderTypeStyle );
- ((vcl::Window*)pBorderWin)->mpWindowImpl->mpClientWindow = this;
+ static_cast<vcl::Window*>(pBorderWin)->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
pParent = mpWindowImpl->mpBorderWindow;
@@ -2001,7 +2001,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
void Window::Command( const CommandEvent& rCEvt )
{
- CallEventListeners( VCLEVENT_WINDOW_COMMAND, (void*)&rCEvt );
+ CallEventListeners( VCLEVENT_WINDOW_COMMAND, const_cast<CommandEvent *>(&rCEvt) );
NotifyEvent aNEvt( MouseNotifyEvent::COMMAND, this, &rCEvt );
if ( !CompatNotify( aNEvt ) )