summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-17 18:46:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:47 +0100
commit6194c26e1eaf7ff3534202fcd9e734645010a30d (patch)
treec5c023443031dd16b9880186a8803a7a4fa08fd4 /filter
parent7889f9e5a3b43d7edb6c6fdb3432d5a88fc804ac (diff)
Some more loplugin:cstylecast: filter
Change-Id: If04f2b4e26abd7375a91bd49d7e0744ddd0f0ba6
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx8
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/bundles.cxx10
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx6
-rw-r--r--filter/source/graphicfilter/icgm/class7.cxx30
-rw-r--r--filter/source/graphicfilter/icgm/outact.cxx4
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx34
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx4
-rw-r--r--filter/source/msfilter/escherex.cxx10
-rw-r--r--filter/source/msfilter/mscodec.cxx6
-rw-r--r--filter/source/svg/svgwriter.cxx2
-rw-r--r--filter/source/t602/t602filter.cxx4
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx12
13 files changed, 66 insertions, 66 deletions
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index f0896e684972..b6ebbb1871d0 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -227,7 +227,7 @@ private:
double ImplGetScaling( const MapMode& );
void ImplGetMapMode( const MapMode& );
bool ImplGetBoundingBox( double* nNumb, sal_uInt8* pSource, sal_uLong nSize );
- sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nComp, sal_uLong nSize );
+ sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uLong nComp, sal_uLong nSize );
// LZW methods
void StartCompression();
void Compress( sal_uInt8 nSrc );
@@ -1173,7 +1173,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
if ( pSource && ( mnLevel == 1 ) )
{
- sal_uInt8* pFound = ImplSearchEntry( pSource, (sal_uInt8*)"%%LanguageLevel:", nParseThis - 10, 16 );
+ sal_uInt8* pFound = ImplSearchEntry( pSource, reinterpret_cast<sal_uInt8 const *>("%%LanguageLevel:"), nParseThis - 10, 16 );
if ( pFound )
{
sal_uInt8 k, i = 10;
@@ -2756,7 +2756,7 @@ void PSWriter::EndCompression()
-sal_uInt8* PSWriter::ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nComp, sal_uLong nSize )
+sal_uInt8* PSWriter::ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uLong nComp, sal_uLong nSize )
{
while ( nComp-- >= nSize )
{
@@ -2788,7 +2788,7 @@ bool PSWriter::ImplGetBoundingBox( double* nNumb, sal_uInt8* pSource, sal_uLong
else
nBytesRead = POSTSCRIPT_BOUNDINGSEARCH;
- sal_uInt8* pDest = ImplSearchEntry( pSource, (sal_uInt8*)"%%BoundingBox:", nBytesRead, 14 );
+ sal_uInt8* pDest = ImplSearchEntry( pSource, reinterpret_cast<sal_uInt8 const *>("%%BoundingBox:"), nBytesRead, 14 );
if ( pDest )
{
int nSecurityCount = 100; // only 100 bytes following the bounding box will be checked
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index aa05ad714b92..56ffacc5c941 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -365,7 +365,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty
if ( pFontEntry )
{
nFontType = pFontEntry->nFontType;
- aFontDescriptor.Name = OUString::createFromAscii( (const char*)pFontEntry->pFontName );
+ aFontDescriptor.Name = OUString::createFromAscii( reinterpret_cast<char*>(pFontEntry->pFontName) );
}
aFontDescriptor.Height = ( sal_Int16 )( ( mpCGM->pElement->nCharacterHeight * (double)1.50 ) );
if ( nFontType & 1 )
diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx
index e91c352bc12e..d310891c1ceb 100644
--- a/filter/source/graphicfilter/icgm/bundles.cxx
+++ b/filter/source/graphicfilter/icgm/bundles.cxx
@@ -124,13 +124,13 @@ CGMFList& CGMFList::operator=( CGMFList& rSource )
FontEntry* pCFontEntry = new FontEntry;
if ( pPtr->pFontName )
{
- sal_uInt32 nSize = strlen( (const char*)pPtr->pFontName ) + 1;
+ sal_uInt32 nSize = strlen( reinterpret_cast<char*>(pPtr->pFontName) ) + 1;
pCFontEntry->pFontName = new sal_Int8[ nSize ];
memcpy( pCFontEntry->pFontName, pPtr->pFontName, nSize );
}
if ( pPtr->pCharSetValue )
{
- sal_uInt32 nSize = strlen( (const char*)pPtr->pCharSetValue ) + 1;
+ sal_uInt32 nSize = strlen( reinterpret_cast<char*>(pPtr->pCharSetValue) ) + 1;
pCFontEntry->pCharSetValue = new sal_Int8[ nSize ];
memcpy( pCFontEntry->pCharSetValue, pPtr->pCharSetValue, nSize );
}
@@ -153,7 +153,7 @@ FontEntry* CGMFList::GetFontEntry( sal_uInt32 nIndex )
-static sal_Int8* ImplSearchEntry( sal_Int8* pSource, sal_Int8* pDest, sal_uInt32 nComp, sal_uInt32 nSize )
+static sal_Int8* ImplSearchEntry( sal_Int8* pSource, sal_Int8 const * pDest, sal_uInt32 nComp, sal_uInt32 nSize )
{
while ( nComp-- >= nSize )
{
@@ -186,7 +186,7 @@ void CGMFList::InsertName( sal_uInt8* pSource, sal_uInt32 nSize )
nFontNameCount++;
boost::scoped_array<sal_Int8> pBuf(new sal_Int8[ nSize ]);
memcpy( pBuf.get(), pSource, nSize );
- sal_Int8* pFound = ImplSearchEntry( pBuf.get(), (sal_Int8*)"ITALIC", nSize, 6 );
+ sal_Int8* pFound = ImplSearchEntry( pBuf.get(), reinterpret_cast<sal_Int8 const *>("ITALIC"), nSize, 6 );
if ( pFound )
{
pFontEntry->nFontType |= 1;
@@ -205,7 +205,7 @@ void CGMFList::InsertName( sal_uInt8* pSource, sal_uInt32 nSize )
}
nSize -= nToCopyOfs;
}
- pFound = ImplSearchEntry( pBuf.get(), (sal_Int8*)"BOLD", nSize, 4 );
+ pFound = ImplSearchEntry( pBuf.get(), reinterpret_cast<sal_Int8 const *>("BOLD"), nSize, 4 );
if ( pFound )
{
pFontEntry->nFontType |= 2;
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index f10cb18d3033..68e47d858b65 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -193,7 +193,7 @@ void CGM::ImplDoClass4()
awt::Size aSize;
awt::Point aPoint( (long)aFloatPoint.X, (long)aFloatPoint.Y );
mpOutAct->DrawText( aPoint, aSize,
- (char*)mpSource + mnParaSize, nSize, (FinalFlag)nType );
+ reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, (FinalFlag)nType );
mnParaSize = mnElementSize;
}
break;
@@ -229,7 +229,7 @@ void CGM::ImplDoClass4()
awt::Point aPoint( (long)aFloatPoint.X, (long)aFloatPoint.Y );
awt::Size aSize((long)dx, (long)dy);
mpOutAct->DrawText( aPoint, aSize ,
- (char*)mpSource + mnParaSize, nSize, (FinalFlag)nType );
+ reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, (FinalFlag)nType );
mnParaSize = mnElementSize;
}
break;
@@ -242,7 +242,7 @@ void CGM::ImplDoClass4()
nSize = ImplGetUI( 1 );
mpSource[ mnParaSize + nSize ] = 0;
- mpOutAct->AppendText( (char*)mpSource + mnParaSize, nSize, (FinalFlag)nType );
+ mpOutAct->AppendText( reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, (FinalFlag)nType );
mnParaSize = mnElementSize;
}
break;
diff --git a/filter/source/graphicfilter/icgm/class7.cxx b/filter/source/graphicfilter/icgm/class7.cxx
index 60141c488ef1..7a9c79a81169 100644
--- a/filter/source/graphicfilter/icgm/class7.cxx
+++ b/filter/source/graphicfilter/icgm/class7.cxx
@@ -32,7 +32,7 @@ void CGM::ImplDoClass7()
case 0x02 :
{
sal_uInt8* pAppData = mpSource + 12;
- sal_uInt16* pTemp = (sal_uInt16*)mpSource;
+ sal_uInt16* pTemp = reinterpret_cast<sal_uInt16*>(mpSource);
sal_uInt16 nOpcode = pTemp[ 4 ];
if ( mpChart || ( nOpcode == 0 ) )
@@ -69,10 +69,10 @@ void CGM::ImplDoClass7()
case 0x262 : /*AppData - ENDGROUP */break;
case 0x264 : /*AppData - DATANODE*/
{
- mpChart->mDataNode[ 0 ] = *(DataNode*)( pAppData );
+ mpChart->mDataNode[ 0 ] = *reinterpret_cast<DataNode*>( pAppData );
sal_Int8 nZoneEnum = mpChart->mDataNode[ 0 ].nZoneEnum;
if ( nZoneEnum && ( nZoneEnum <= 6 ) )
- mpChart->mDataNode[ nZoneEnum ] = *(DataNode*)( pAppData );
+ mpChart->mDataNode[ nZoneEnum ] = *reinterpret_cast<DataNode*>( pAppData );
}
break;
case 0x2BE : /*AppData - SHWSLIDEREC*/
@@ -106,16 +106,16 @@ void CGM::ImplDoClass7()
case 0x320 : /*AppData - TEXT*/
{
TextEntry* pTextEntry = new TextEntry;
- pTextEntry->nTypeOfText = *((sal_uInt16*)( pAppData ) );
- pTextEntry->nRowOrLineNum = *((sal_uInt16*)( pAppData + 2 ) );
- pTextEntry->nColumnNum = *((sal_uInt16*)( pAppData + 4 ) );
- sal_uInt16 nAttributes = *( (sal_uInt16*)( pAppData + 6 ) );
+ pTextEntry->nTypeOfText = *(reinterpret_cast<sal_uInt16*>( pAppData ) );
+ pTextEntry->nRowOrLineNum = *(reinterpret_cast<sal_uInt16*>( pAppData + 2 ) );
+ pTextEntry->nColumnNum = *(reinterpret_cast<sal_uInt16*>( pAppData + 4 ) );
+ sal_uInt16 nAttributes = *( reinterpret_cast<sal_uInt16*>( pAppData + 6 ) );
pTextEntry->nZoneSize = nAttributes & 0xff;
pTextEntry->nLineType = ( nAttributes >> 8 ) & 0xf;
nAttributes >>= 12;
pTextEntry->nAttributes = nAttributes;
pAppData += 8;
- sal_uInt32 nLen = strlen( (char*)( pAppData ) ) + 1;
+ sal_uInt32 nLen = strlen( reinterpret_cast<char*>( pAppData ) ) + 1;
pTextEntry->pText = new char[ nLen ];
memcpy( pTextEntry->pText, pAppData, nLen );
pAppData += nLen;
@@ -125,7 +125,7 @@ void CGM::ImplDoClass7()
{
TextAttribute* pTextAttr = new TextAttribute;
- *pTextAttr = *(TextAttribute*)( pAppData );
+ *pTextAttr = *reinterpret_cast<TextAttribute*>( pAppData );
pTextAttr->pNextAttribute = NULL;
if ( i == 0 )
@@ -142,7 +142,7 @@ void CGM::ImplDoClass7()
case 0x321 : /*AppData - IOC_TABS */break;
case 0x322 : /*AppData - CHARTZONE*/
{
- mpChart->mChartZone = *( ChartZone* )( pAppData );
+ mpChart->mChartZone = *reinterpret_cast<ChartZone*>( pAppData );
}
break;
case 0x324 : /*AppData - TITLEZONE */break;
@@ -150,17 +150,17 @@ void CGM::ImplDoClass7()
case 0x32A : /*AppData - LEGENDZONE */break;
case 0x330 : /*AppData - PAGEORIENTDIM*/
{
- mpChart->mPageOrientDim = *( PageOrientDim*)( pAppData );
+ mpChart->mPageOrientDim = *reinterpret_cast<PageOrientDim*>( pAppData );
}
break;
case 0x334 : /*AppData - CHTZONEOPTN*/
{
- mpChart->mZoneOption = *( ZoneOption*)( pAppData );
+ mpChart->mZoneOption = *reinterpret_cast<ZoneOption*>( pAppData );
}
break;
case 0x336 : /*AppData - CHTINTL*/
{
- mpChart->mIntSettings = *( IntSettings*)( pAppData );
+ mpChart->mIntSettings = *reinterpret_cast<IntSettings*>( pAppData );
}
break;
case 0x338 : /*AppData - CHTLINESPC */break;
@@ -176,12 +176,12 @@ void CGM::ImplDoClass7()
case 0x44E : /*AppData - BULTEXTOPTN */break;
case 0x452 : /*AppData - BULLETOPTN*/
{
- mpChart->mBulletOption = *( BulletOption*)( pAppData );
+ mpChart->mBulletOption = *reinterpret_cast<BulletOption*>( pAppData );
}
break;
case 0x454 : /*AppData - BULLETLINES*/
{
- mpChart->mBulletLines = *( BulletLines*)( pAppData );
+ mpChart->mBulletLines = *reinterpret_cast<BulletLines*>( pAppData );
}
break;
case 0x456 : /*AppData - BULAUTOBUILD */break;
diff --git a/filter/source/graphicfilter/icgm/outact.cxx b/filter/source/graphicfilter/icgm/outact.cxx
index 605be09c2e83..aa64c220308d 100644
--- a/filter/source/graphicfilter/icgm/outact.cxx
+++ b/filter/source/graphicfilter/icgm/outact.cxx
@@ -29,7 +29,7 @@ CGMOutAct::CGMOutAct( CGM& rCGM )
mnCurrentPage = 0;
mnGroupActCount = mnGroupLevel = 0;
mpGroupLevel = new sal_uInt32[CGM_OUTACT_MAX_GROUP_LEVEL] ();
- mpPoints = (Point*)new sal_Int8[ 0x2000 * sizeof( Point ) ];
+ mpPoints = reinterpret_cast<Point*>(new sal_Int8[ 0x2000 * sizeof( Point ) ]);
mpFlags = new sal_uInt8[ 0x2000 ];
mnIndex = 0;
@@ -38,7 +38,7 @@ CGMOutAct::CGMOutAct( CGM& rCGM )
CGMOutAct::~CGMOutAct()
{
- delete[] (sal_Int8*) mpPoints;
+ delete[] reinterpret_cast<sal_Int8*>(mpPoints);
delete[] mpFlags;
delete[] mpGroupLevel;
delete mpGradient;
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index abd8e1cdf60d..4261fe36918a 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -52,7 +52,7 @@ class FilterConfigItem;
|*
*************************************************************************/
-static sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nComp, sal_uLong nSize )
+static sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uLong nComp, sal_uLong nSize )
{
while ( nComp-- >= nSize )
{
@@ -247,9 +247,9 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
if (pOut)
{
rtl::ByteSequence seq;
- if (osl_File_E_None == osl_readLine(pOut, (sal_Sequence **)&seq))
+ if (osl_File_E_None == osl_readLine(pOut, reinterpret_cast<sal_Sequence **>(&seq)))
{
- OString line( (const sal_Char *) seq.getConstArray(), seq.getLength() );
+ OString line( reinterpret_cast<const char *>(seq.getConstArray()), seq.getLength() );
if (line.startsWith("Unsupported output format"))
bEMFSupported=false;
}
@@ -461,7 +461,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
OUString aString;
int nLen;
- sal_uInt8* pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%Title:", nBytesRead - 32, 8 );
+ sal_uInt8* pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%Title:"), nBytesRead - 32, 8 );
if ( pDest )
{
pDest += 8;
@@ -469,13 +469,13 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
pDest++;
nLen = ImplGetLen( pDest, 32 );
sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
- if ( strcmp( (const char*)pDest, "none" ) != 0 )
+ if ( strcmp( reinterpret_cast<char*>(pDest), "none" ) != 0 )
{
- aString += " Title:" + OUString::createFromAscii( (char*)pDest ) + "\n";
+ aString += " Title:" + OUString::createFromAscii( reinterpret_cast<char*>(pDest) ) + "\n";
}
pDest[ nLen ] = aOldValue;
}
- pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%Creator:", nBytesRead - 32, 10 );
+ pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%Creator:"), nBytesRead - 32, 10 );
if ( pDest )
{
pDest += 10;
@@ -483,10 +483,10 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
pDest++;
nLen = ImplGetLen( pDest, 32 );
sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
- aString += " Creator:" + OUString::createFromAscii( (char*)pDest ) + "\n";
+ aString += " Creator:" + OUString::createFromAscii( reinterpret_cast<char*>(pDest) ) + "\n";
pDest[ nLen ] = aOldValue;
}
- pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%CreationDate:", nBytesRead - 32, 15 );
+ pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%CreationDate:"), nBytesRead - 32, 15 );
if ( pDest )
{
pDest += 15;
@@ -494,13 +494,13 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
pDest++;
nLen = ImplGetLen( pDest, 32 );
sal_uInt8 aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0;
- if ( strcmp( (const char*)pDest, "none" ) != 0 )
+ if ( strcmp( reinterpret_cast<char*>(pDest), "none" ) != 0 )
{
- aString += " CreationDate:" + OUString::createFromAscii( (char*)pDest ) + "\n";
+ aString += " CreationDate:" + OUString::createFromAscii( reinterpret_cast<char*>(pDest) ) + "\n";
}
pDest[ nLen ] = aOldValue;
}
- pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%LanguageLevel:", nBytesRead - 4, 16 );
+ pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%LanguageLevel:"), nBytesRead - 4, 16 );
if ( pDest )
{
pDest += 16;
@@ -589,8 +589,8 @@ GraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
sal_uInt8* pHeader = new sal_uInt8[ 22 ];
rStream.Seek( nPSStreamPos );
rStream.Read( pHeader, 22 ); // check PostScript header
- if ( ImplSearchEntry( pHeader, (sal_uInt8*)"%!PS-Adobe", 10, 10 ) &&
- ImplSearchEntry( &pHeader[ 15 ], (sal_uInt8*)"EPS", 3, 3 ) )
+ if ( ImplSearchEntry( pHeader, reinterpret_cast<sal_uInt8 const *>("%!PS-Adobe"), 10, 10 ) &&
+ ImplSearchEntry( &pHeader[ 15 ], reinterpret_cast<sal_uInt8 const *>("EPS"), 3, 3 ) )
{
bool bGraphicLinkCreated = false;
@@ -605,7 +605,7 @@ GraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
int nSecurityCount = 32;
if ( !bHasPreview ) // if there is no tiff/wmf preview, we will parse for an preview in the eps prolog
{
- sal_uInt8* pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%BeginPreview:", nBytesRead - 32, 15 );
+ sal_uInt8* pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%BeginPreview:"), nBytesRead - 32, 15 );
if ( pDest )
{
pDest += 15;
@@ -613,7 +613,7 @@ GraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
long nHeight = ImplGetNumber( &pDest, nSecurityCount );
long nBitDepth = ImplGetNumber( &pDest, nSecurityCount );
long nScanLines = ImplGetNumber( &pDest, nSecurityCount );
- pDest = ImplSearchEntry( pDest, (sal_uInt8*)"%", 16, 1 ); // go to the first Scanline
+ pDest = ImplSearchEntry( pDest, reinterpret_cast<sal_uInt8 const *>("%"), 16, 1 ); // go to the first Scanline
if ( nSecurityCount && pDest && nWidth && nHeight && ( ( nBitDepth == 1 ) || ( nBitDepth == 8 ) ) && nScanLines )
{
rStream.Seek( nBufStartPos + ( pDest - pBuf ) );
@@ -704,7 +704,7 @@ GraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
}
}
- sal_uInt8* pDest = ImplSearchEntry( pBuf, (sal_uInt8*)"%%BoundingBox:", nBytesRead, 14 );
+ sal_uInt8* pDest = ImplSearchEntry( pBuf, reinterpret_cast<sal_uInt8 const *>("%%BoundingBox:"), nBytesRead, 14 );
if ( pDest )
{
nSecurityCount = 100;
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 1022c2ff076e..19e1a75e3ffc 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -701,7 +701,7 @@ sal_uLong PictReader::ReadAndDrawText()
while ( nLen > 0 && ( (unsigned char)sText[ nLen - 1 ] ) < 32 )
nLen--;
sText[ nLen ] = 0;
- OUString aString( (const sal_Char*)&sText, strlen(sText), aActFont.GetCharSet());
+ OUString aString( sText, strlen(sText), aActFont.GetCharSet());
pVirDev->DrawText( Point( aTextPosition.X(), aTextPosition.Y() ), aString );
return nDataLen;
}
@@ -1580,7 +1580,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
pPict->ReadChar( nByteLen ); nLen=((sal_uInt16)nByteLen)&0x00ff;
pPict->Read( &sFName, nLen );
sFName[ nLen ] = 0;
- OUString aString( (const sal_Char*)&sFName, strlen(sFName), osl_getThreadTextEncoding() );
+ OUString aString( sFName, strlen(sFName), osl_getThreadTextEncoding() );
aActFont.SetName( aString );
eActMethod=PDM_UNDEFINED;
break;
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 70d263715c93..7c419bef295f 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1840,12 +1840,12 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st
aPolygon = Polygon( nInnerSequenceCount );
for( b = 0; b < nInnerSequenceCount; b++)
{
- PolyFlags ePolyFlags( *( (PolyFlags*)pFlags++ ) );
+ css::drawing::PolygonFlags ePolyFlags = *pFlags++;
::com::sun::star::awt::Point aPoint( *(pArray++) );
aPolygon[ b ] = Point( aPoint.X, aPoint.Y );
- aPolygon.SetFlags( b, ePolyFlags );
+ aPolygon.SetFlags( b, static_cast<PolyFlags>(ePolyFlags) );
- if ( ePolyFlags == POLY_CONTROL )
+ if ( ePolyFlags == css::drawing::PolygonFlags_CONTROL )
continue;
}
aPolyPolygon.Insert( aPolygon, POLYPOLY_APPEND );
@@ -4712,8 +4712,8 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
{
for ( b = 0; b < pInnerSequence->getLength(); b++, pArray++ )
{
- PolyFlags ePolyFlags = *( (PolyFlags*)pFlags++ );
- if ( ePolyFlags == POLY_CONTROL )
+ css::drawing::PolygonFlags ePolyFlags = *pFlags++;
+ if ( ePolyFlags == css::drawing::PolygonFlags_CONTROL )
continue;
sal_uInt32 nDist = (sal_uInt32)hypot( aRefPoint.X - pArray->X, aRefPoint.Y - pArray->Y );
if ( nDist < nDistance )
diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx
index 15b6147fe169..10b285432297 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -187,7 +187,7 @@ bool MSCodec_Xor95::InitCodec( const uno::Sequence< beans::NamedValue >& aData )
uno::Sequence< beans::NamedValue > MSCodec_Xor95::GetEncryptionData()
{
::comphelper::SequenceAsHashMap aHashData;
- aHashData[ OUString( "XOR95EncryptionKey" ) ] <<= uno::Sequence<sal_Int8>( (sal_Int8*)mpnKey, 16 );
+ aHashData[ OUString( "XOR95EncryptionKey" ) ] <<= uno::Sequence<sal_Int8>( reinterpret_cast<sal_Int8*>(mpnKey), 16 );
aHashData[ OUString( "XOR95BaseKey" ) ] <<= (sal_Int16)mnKey;
aHashData[ OUString( "XOR95PasswordHash" ) ] <<= (sal_Int16)mnHash;
@@ -318,8 +318,8 @@ bool MSCodec_Std97::InitCodec( const uno::Sequence< beans::NamedValue >& aData )
uno::Sequence< beans::NamedValue > MSCodec_Std97::GetEncryptionData()
{
::comphelper::SequenceAsHashMap aHashData;
- aHashData[ OUString( "STD97EncryptionKey" ) ] <<= uno::Sequence< sal_Int8 >( (sal_Int8*)m_pDigestValue, RTL_DIGEST_LENGTH_MD5 );
- aHashData[ OUString( "STD97UniqueID" ) ] <<= uno::Sequence< sal_Int8 >( (sal_Int8*)m_pDocId, 16 );
+ aHashData[ OUString( "STD97EncryptionKey" ) ] <<= uno::Sequence< sal_Int8 >( reinterpret_cast<sal_Int8*>(m_pDigestValue), RTL_DIGEST_LENGTH_MD5 );
+ aHashData[ OUString( "STD97UniqueID" ) ] <<= uno::Sequence< sal_Int8 >( reinterpret_cast<sal_Int8*>(m_pDocId), 16 );
return aHashData.getAsConstNamedValueList();
}
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 0eceaebc3ca1..d7235a911d56 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -3636,7 +3636,7 @@ SVGWriter::~SVGWriter()
void SAL_CALL SVGWriter::write( const Reference<XDocumentHandler>& rxDocHandler,
const Sequence<sal_Int8>& rMtfSeq ) throw( RuntimeException, std::exception )
{
- SvMemoryStream aMemStm( (char*) rMtfSeq.getConstArray(), rMtfSeq.getLength(), StreamMode::READ );
+ SvMemoryStream aMemStm( const_cast<sal_Int8 *>(rMtfSeq.getConstArray()), rMtfSeq.getLength(), StreamMode::READ );
GDIMetaFile aMtf;
ReadGDIMetaFile( aMemStm, aMtf );
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 2e3d82cfc7e7..bcaf8984d370 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -545,7 +545,7 @@ unsigned char T602ImportFilter::Readchar602()
static Sequence< sal_Int8 > aData;
return (mxInputStream->readBytes(aData, 1) > 0) ?
- ((unsigned char *) aData.getConstArray())[0] : 0;
+ reinterpret_cast<unsigned char const *>(aData.getConstArray())[0] : 0;
}
void T602ImportFilter::par602(bool endofpage)
@@ -607,7 +607,7 @@ sal_Int16 T602ImportFilter::readnum(unsigned char *ch, bool show)
buff[i]='\0';
// mba: cast from unsigned char via int to sal_Int16 seems to be safe
- return (sal_Int16) atoi((char *)buff);
+ return (sal_Int16) atoi(reinterpret_cast<char const *>(buff));
}
unsigned char T602ImportFilter::Setformat602(char *cmd)
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index c76161497baf..64a390fbab35 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -159,7 +159,7 @@ namespace XSLT
xmlXPathObjectPtr streamName = valuePop(ctxt);
streamName = ensureStringValue(streamName, ctxt);
- oh->insertByName(OUString::createFromAscii((sal_Char*) streamName->stringval), OString((sal_Char*) value->stringval));
+ oh->insertByName(OUString::createFromAscii(reinterpret_cast<char*>(streamName->stringval)), OString(reinterpret_cast<char*>(value->stringval)));
valuePush(ctxt, xmlXPathNewCString(""));
}
@@ -200,7 +200,7 @@ namespace XSLT
OleHandler * oh = static_cast<OleHandler*> (data);
xmlXPathObjectPtr streamName = valuePop(ctxt);
streamName = ensureStringValue(streamName, ctxt);
- const OString content = oh->getByName(OUString::createFromAscii((sal_Char*) streamName->stringval));
+ const OString content = oh->getByName(OUString::createFromAscii(reinterpret_cast<char*>(streamName->stringval)));
valuePush(ctxt, xmlXPathNewCString(content.getStr()));
xmlXPathFreeObject(streamName);
}
@@ -297,7 +297,7 @@ namespace XSLT
&ParserInputBufferCallback::on_close,
static_cast<void*> (this), NULL, NULL, 0);
xsltStylesheetPtr styleSheet = xsltParseStylesheetFile(
- (const xmlChar *) m_transformer->getStyleSheetURL().getStr());
+ reinterpret_cast<const xmlChar *>(m_transformer->getStyleSheetURL().getStr()));
xmlDocPtr result = NULL;
xsltTransformContextPtr tcontext = NULL;
exsltRegisterAll();
@@ -349,14 +349,14 @@ namespace XSLT
void
Reader::registerExtensionModule()
{
- const xmlChar* oleModuleURI = (const xmlChar *) EXT_MODULE_OLE_URI;
+ const xmlChar* oleModuleURI = reinterpret_cast<const xmlChar *>(EXT_MODULE_OLE_URI);
xsltRegisterExtModule(oleModuleURI, &ExtFuncOleCB::init, NULL);
xsltRegisterExtModuleFunction(
- (const xmlChar*) "insertByName",
+ reinterpret_cast<const xmlChar*>("insertByName"),
oleModuleURI,
&ExtFuncOleCB::insertByName);
xsltRegisterExtModuleFunction(
- (const xmlChar*) "getByName",
+ reinterpret_cast<const xmlChar*>("getByName"),
oleModuleURI,
&ExtFuncOleCB::getByName);