From d7d2c6b53eacfe4e0270d6f61b3ae20047e99d35 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 3 Jan 2016 18:17:44 +1100 Subject: vcl: rename variables from metric names to font attribute names Change-Id: Ib0a3d82af858304bf63a20bcb30b8de741491935 Reviewed-on: https://gerrit.libreoffice.org/21054 Reviewed-by: Chris Sherlock Tested-by: Chris Sherlock --- vcl/quartz/ctfonts.cxx | 18 +++++++++--------- vcl/quartz/salgdi.cxx | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'vcl/quartz') diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index 7e97cae775e6..531b23e52d8d 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -116,7 +116,7 @@ CoreTextStyle::~CoreTextStyle() CFRelease( mpStyleDict ); } -void CoreTextStyle::GetFontMetric( ImplFontAttributes& rMetric ) const +void CoreTextStyle::GetFontAttributes( ImplFontAttributes& rFontAttributes ) const { // get the matching CoreText font handle // TODO: is it worth it to cache the CTFontRef in SetFont() and reuse it here? @@ -124,20 +124,20 @@ void CoreTextStyle::GetFontMetric( ImplFontAttributes& rMetric ) const const CGFloat fAscent = CTFontGetAscent( aCTFontRef ); const CGFloat fCapHeight = CTFontGetCapHeight( aCTFontRef ); - rMetric.SetAscent( lrint( fAscent ) ); - rMetric.SetDescent( lrint( CTFontGetDescent( aCTFontRef )) ); - rMetric.SetExternalLeading( lrint( CTFontGetLeading( aCTFontRef )) ); - rMetric.SetInternalLeading( lrint( fAscent - fCapHeight ) ); + rFontAttributes.SetAscent( lrint( fAscent ) ); + rFontAttributes.SetDescent( lrint( CTFontGetDescent( aCTFontRef )) ); + rFontAttributes.SetExternalLeading( lrint( CTFontGetLeading( aCTFontRef )) ); + rFontAttributes.SetInternalLeading( lrint( fAscent - fCapHeight ) ); // since ImplFontAttributes::mnWidth is only used for stretching/squeezing fonts // setting this width to the pixel height of the fontsize is good enough // it also makes the calculation of the stretch factor simple - rMetric.SetWidth( lrint( CTFontGetSize( aCTFontRef ) * mfFontStretch) ); + rFontAttributes.SetWidth( lrint( CTFontGetSize( aCTFontRef ) * mfFontStretch) ); // all CoreText fonts are scalable - rMetric.SetScalableFlag( true ); - rMetric.SetTrueTypeFlag( true ); // Not sure, but this field is used only for Windows so far - rMetric.SetKernableFlag( true ); + rFontAttributes.SetScalableFlag( true ); + rFontAttributes.SetTrueTypeFlag( true ); // Not sure, but this field is used only for Windows so far + rFontAttributes.SetKernableFlag( true ); } bool CoreTextStyle::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) const diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index ad373cef3c84..c36eacf1da08 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -305,9 +305,9 @@ void AquaSalGraphics::SetTextColor( SalColor nSalColor ) // SAL_ DEBUG(std::hex << nSalColor << std::dec << "={" << maTextColor.GetRed() << ", " << maTextColor.GetGreen() << ", " << maTextColor.GetBlue() << ", " << maTextColor.GetAlpha() << "}"); } -void AquaSalGraphics::GetFontMetric( ImplFontAttributes* pMetric, int /*nFallbackLevel*/ ) +void AquaSalGraphics::GetFontAttributes( ImplFontAttributes* pFontAttributes, int /*nFallbackLevel*/ ) { - mpTextStyle->GetFontMetric( *pMetric ); + mpTextStyle->GetFontAttributes( *pFontAttributes ); } static bool AddTempDevFont(const OUString& rFontFileURL) -- cgit