summaryrefslogtreecommitdiff
path: root/vcl/source/filter/wmf
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/filter/wmf')
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx22
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx6
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx2
3 files changed, 15 insertions, 15 deletions
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 8d40354ba89a..72c20cb0ac25 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -593,16 +593,16 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex )
switch( pGDIObj->eType )
{
case GDI_PEN :
- maLineStyle = (WinMtfLineStyle*)pGDIObj->pStyle;
+ maLineStyle = static_cast<WinMtfLineStyle*>(pGDIObj->pStyle);
break;
case GDI_BRUSH :
{
- maFillStyle = (WinMtfFillStyle*)pGDIObj->pStyle;
+ maFillStyle = static_cast<WinMtfFillStyle*>(pGDIObj->pStyle);
mbFillStyleSelected = true;
}
break;
case GDI_FONT :
- maFont = ((WinMtfFontStyle*)pGDIObj->pStyle)->aFont;
+ maFont = static_cast<WinMtfFontStyle*>(pGDIObj->pStyle)->aFont;
break;
default:
break; // -Wall many options not handled.
@@ -678,14 +678,14 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
{
if ( eType == GDI_FONT )
{
- WinMtfFontStyle* pFontStyle = (WinMtfFontStyle*) pStyle;
+ WinMtfFontStyle* pFontStyle = static_cast<WinMtfFontStyle*>(pStyle);
if (pFontStyle->aFont.GetHeight() == 0)
pFontStyle->aFont.SetHeight(423);
ImplMap(pFontStyle->aFont); // defaulting to 12pt
}
else if ( eType == GDI_PEN )
{
- WinMtfLineStyle* pLineStyle = (WinMtfLineStyle*) pStyle;
+ WinMtfLineStyle* pLineStyle = static_cast<WinMtfLineStyle*>(pStyle);
Size aSize(pLineStyle->aLineInfo.GetWidth(), 0);
aSize = ImplMap(aSize);
pLineStyle->aLineInfo.SetWidth(aSize.Width());
@@ -712,14 +712,14 @@ void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pS
{
if ( eType == GDI_FONT )
{
- WinMtfFontStyle* pFontStyle = (WinMtfFontStyle*) pStyle;
+ WinMtfFontStyle* pFontStyle = static_cast<WinMtfFontStyle*>(pStyle);
if (pFontStyle->aFont.GetHeight() == 0)
pFontStyle->aFont.SetHeight(423);
ImplMap(pFontStyle->aFont);
}
else if ( eType == GDI_PEN )
{
- WinMtfLineStyle* pLineStyle = (WinMtfLineStyle*) pStyle;
+ WinMtfLineStyle* pLineStyle = static_cast<WinMtfLineStyle*>(pStyle);
Size aSize(pLineStyle->aLineInfo.GetWidth(), 0);
aSize = ImplMap(aSize);
pLineStyle->aLineInfo.SetWidth(aSize.Width());
@@ -738,13 +738,13 @@ void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pS
switch ( eType )
{
case GDI_PEN :
- delete (WinMtfLineStyle*)pStyle;
+ delete static_cast<WinMtfLineStyle*>(pStyle);
break;
case GDI_BRUSH :
- delete (WinMtfFillStyle*)pStyle;
+ delete static_cast<WinMtfFillStyle*>(pStyle);
break;
case GDI_FONT :
- delete (WinMtfFontStyle*)pStyle;
+ delete static_cast<WinMtfFontStyle*>(pStyle);
break;
default:
@@ -2116,7 +2116,7 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
// on windows where the function parameters are probably resolved in reverse order
mem.Flush();
- mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const sal_uInt8*) mem.GetData(), mem.GetEndOfData() ) );
+ mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, static_cast<const sal_uInt8*>(mem.GetData()), mem.GetEndOfData() ) );
mpGDIMetaFile->UseCanvas( true );
}
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index c9a8f2d69ea3..af06cd7bb2dd 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -514,13 +514,13 @@ struct GDIObj
switch (eType)
{
case GDI_PEN :
- delete (WinMtfLineStyle*)pStyle;
+ delete static_cast<WinMtfLineStyle*>(pStyle);
break;
case GDI_BRUSH :
- delete (WinMtfFillStyle*)pStyle;
+ delete static_cast<WinMtfFillStyle*>(pStyle);
break;
case GDI_FONT :
- delete (WinMtfFontStyle*)pStyle;
+ delete static_cast<WinMtfFontStyle*>(pStyle);
break;
default:
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index e0a659779999..9dcf64459367 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -518,7 +518,7 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const OUString& r
for ( i = 0; i < nDXCount; i++ )
aMemoryStream.WriteInt32( pDXAry[ i ] );
aMemoryStream.WriteUInt32( nSkipActions );
- WMFRecord_Escape( PRIVATE_ESCAPE_UNICODE, nStrmLen, (const sal_Int8*)aMemoryStream.GetData() );
+ WMFRecord_Escape( PRIVATE_ESCAPE_UNICODE, nStrmLen, static_cast<const sal_Int8*>(aMemoryStream.GetData()) );
std::vector<tools::PolyPolygon>::iterator aIter( aPolyPolyVec.begin() );
while ( aIter != aPolyPolyVec.end() )