Kaydet (Commit) 4c449bc7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:redundantcast

Change-Id: I6095d1209f2339387e8562074daa32779089a018
üst f4796210
......@@ -216,7 +216,7 @@ Any UniDataProvider::getOOoData()
if (mSystemData)
{
oOOData = makeAny(OUString(reinterpret_cast<const sal_Char*>([mSystemData bytes]),
oOOData = makeAny(OUString(static_cast<const sal_Char*>([mSystemData bytes]),
[mSystemData length],
RTL_TEXTENCODING_UTF8));
}
......
......@@ -1057,7 +1057,7 @@ NSImage* CreateNSImage( const Image& rImage )
{
[pImage lockFocusFlipped:YES];
NSGraphicsContext* pContext = [NSGraphicsContext currentContext];
CGContextRef rCGContext = reinterpret_cast<CGContextRef>([pContext graphicsPort]);
CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]);
const CGRect aDstRect = { {0, 0}, { static_cast<CGFloat>(aSize.Width()), static_cast<CGFloat>(aSize.Height()) } };
CGContextDrawImage( rCGContext, aDstRect, xImage );
......
......@@ -78,7 +78,7 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) :
mpGraphics = new AquaSalGraphics();
const int nWidth = 100, nHeight = 100;
maContextMemory.reset( reinterpret_cast<sal_uInt8*>( rtl_allocateMemory( nWidth * 4 * nHeight ) ),
maContextMemory.reset( static_cast<sal_uInt8*>( rtl_allocateMemory( nWidth * 4 * nHeight ) ),
boost::bind( rtl_freeMemory, _1 ) );
if( maContextMemory )
......@@ -193,7 +193,7 @@ bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData )
io_pSetupData->meOrientation = mePageOrientation;
io_pSetupData->mnPaperBin = 0;
io_pSetupData->mpDriverData = reinterpret_cast<sal_uInt8*>(rtl_allocateMemory( 4 ));
io_pSetupData->mpDriverData = static_cast<sal_uInt8*>(rtl_allocateMemory( 4 ));
io_pSetupData->mnDriverDataLen = 4;
}
else
......@@ -550,7 +550,7 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, bool i_b
if( i_bNewJobData && i_pSetupData )
SetPrinterData( i_pSetupData );
CGContextRef rContext = reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
CGContextRef rContext = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
SetupPrinterGraphics( rContext );
......
......@@ -116,7 +116,7 @@ bool AquaSalGraphics::CheckContext()
{
const CGSize aLayerSize = { static_cast<CGFloat>(nWidth), static_cast<CGFloat>(nHeight) };
NSGraphicsContext* pNSGContext = [NSGraphicsContext graphicsContextWithWindow: mpFrame->getNSWindow()];
CGContextRef xCGContext = reinterpret_cast<CGContextRef>([pNSGContext graphicsPort]);
CGContextRef xCGContext = static_cast<CGContextRef>([pNSGContext graphicsPort]);
mxLayer = CGLayerCreateWithContext( xCGContext, aLayerSize, NULL );
CG_TRACE( "CGLayerCreateWithContext(" << xCGContext << "," << aLayerSize << ",NULL) = " << mxLayer );
if( mxLayer )
......@@ -180,7 +180,7 @@ void AquaSalGraphics::UpdateWindow( NSRect& )
NSGraphicsContext* pContext = [NSGraphicsContext currentContext];
if( (mxLayer != NULL) && (pContext != NULL) )
{
CGContextRef rCGContext = reinterpret_cast<CGContextRef>([pContext graphicsPort]);
CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]);
CG_TRACE( "[[NSGraphicsContext currentContext] graphicsPort] = " << rCGContext );
CGMutablePathRef rClip = mpFrame->getClipPath();
......
......@@ -236,7 +236,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
{
NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pNSWindow];
if( pNSContext )
xCGContext = reinterpret_cast<CGContextRef>([pNSContext graphicsPort]);
xCGContext = static_cast<CGContextRef>([pNSContext graphicsPort]);
}
else
{
......
......@@ -35,7 +35,7 @@ OUString GetOUString( CFStringRef rStr )
const UniChar* pConstStr = CFStringGetCharactersPtr( rStr );
if( pConstStr )
return OUString( pConstStr, nLength );
UniChar* pStr = reinterpret_cast<UniChar*>( rtl_allocateMemory( sizeof(UniChar)*nLength ) );
UniChar* pStr = static_cast<UniChar*>( rtl_allocateMemory( sizeof(UniChar)*nLength ) );
CFRange aRange = { 0, nLength };
CFStringGetCharacters( rStr, aRange, pStr );
OUString aRet( pStr, nLength );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment