summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-04 08:47:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-04 08:47:47 +0100
commit083f517ca3c037a1d36e6f5ea830366f24659f22 (patch)
treed35f9a0d9b4c9236e042beba7ae35a804de28ff3 /vcl/quartz
parent2e9816e59f7f44356b5bdc8d0e7da21cdd497f9a (diff)
vcl (Mac): loplugin:cstylecast
Change-Id: Ic46623380f026a8dfcc74c895db35a06bcea1ead
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/ctfonts.cxx7
-rw-r--r--vcl/quartz/ctlayout.cxx4
2 files changed, 5 insertions, 6 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index a11453cc6d98..80253abf9ee8 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -47,12 +47,11 @@ inline double toRadian(int nDegree)
}
CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD )
-: mpFontData( (CoreTextFontData*)rFSD.mpFontData )
+: mpFontData( const_cast<CoreTextFontData*>(static_cast<CoreTextFontData const *>(rFSD.mpFontData)) )
, mfFontStretch( 1.0 )
, mfFontRotation( 0.0 )
, mpStyleDict( NULL )
{
- mpFontData = (CoreTextFontData*)rFSD.mpFontData;
const FontSelectPattern* const pReqFont = &rFSD;
double fScaledFontHeight = pReqFont->mfExactHeight;
@@ -95,7 +94,7 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD )
aMatrix = CGAffineTransformConcat(aMatrix, CGAffineTransformMake(1, 0, toRadian(120), 1, 0, 0));
}
- CTFontDescriptorRef pFontDesc = (CTFontDescriptorRef)mpFontData->GetFontId();
+ CTFontDescriptorRef pFontDesc = reinterpret_cast<CTFontDescriptorRef>(mpFontData->GetFontId());
CTFontRef pNewCTFont = CTFontCreateWithFontDescriptor( pFontDesc, fScaledFontHeight, &aMatrix );
CFDictionarySetValue( mpStyleDict, kCTFontAttributeName, pNewCTFont );
CFRelease( pNewCTFont);
@@ -389,7 +388,7 @@ static void CTFontEnumCallBack( const void* pValue, void* pContext )
if( bFontEnabled)
{
- const sal_IntPtr nFontId = (sal_IntPtr)pValue;
+ const sal_IntPtr nFontId = reinterpret_cast<sal_IntPtr>(pValue);
CoreTextFontData* pFontData = new CoreTextFontData( rDFA, nFontId );
SystemFontList* pFontList = (SystemFontList*)pContext;
pFontList->AddFont( pFontData );
diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx
index 5803976b05b8..fe294cbbb28c 100644
--- a/vcl/quartz/ctlayout.cxx
+++ b/vcl/quartz/ctlayout.cxx
@@ -176,7 +176,7 @@ void CTLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
delete[] iter->m_pAdjPositions;
iter->m_pAdjPositions = new CGPoint[iter->m_nGlyphs];
- SAL_INFO( "vcl.ct", "Apply DXArray Run status:"<< (void*)(uintptr_t)status);
+ SAL_INFO( "vcl.ct", "Apply DXArray Run status:"<< status);
if(!(status & kCTRunStatusNonMonotonic))
{
@@ -669,7 +669,7 @@ int CTLayout::GetNextGlyphs( int nLen, sal_GlyphId* pOutGlyphIds, Point& rPos, i
{
if ( !CFEqual( iter->m_pFont, pFont ) )
{
- pFallbackFont = new CoreTextFontData( rDevFontAttr, (sal_IntPtr)pFontDesc );
+ pFallbackFont = new CoreTextFontData( rDevFontAttr, reinterpret_cast<sal_IntPtr>(pFontDesc) );
*(pFallbackFonts++) = pFallbackFont;
}
else