summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-10 14:01:22 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-10 10:17:46 +0000
commit36ccb37eee589c444445ab2d05a5c0dff6585a2f (patch)
treef96ffe8380d2c052b3906352646d868e01303221 /vcl/quartz
parent5511b477fd5dc9b74ff05ea68b1b57b463b6fa51 (diff)
vcl: promote ImplFontAttributes to FontAttributes
ImplFontAttributes is no longer merely a pImpl (or "compilation firewall", take your pick) but is a fully fledged class in its own right that is used by a number of classes, including FontSelectPattern, LogicalFontInstance and PhysicalFontFace. Thus I'm "promoting" the use of this class in the codebase. Change-Id: I26866080a64796978d1c25efbcd16e3e6f94aaa5 Reviewed-on: https://gerrit.libreoffice.org/21305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/ctfonts.cxx10
-rw-r--r--vcl/quartz/ctfonts.hxx2
-rw-r--r--vcl/quartz/ctlayout.cxx2
-rw-r--r--vcl/quartz/salgdi.cxx4
4 files changed, 9 insertions, 9 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index e33ce7ea2739..5052f7888a7e 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -117,7 +117,7 @@ CoreTextStyle::~CoreTextStyle()
CFRelease( mpStyleDict );
}
-void CoreTextStyle::GetFontAttributes( ImplFontAttributes& rFontAttributes ) const
+void CoreTextStyle::GetFontAttributes( FontAttributes& rFontAttributes ) const
{
// get the matching CoreText font handle
// TODO: is it worth it to cache the CTFontRef in SetFont() and reuse it here?
@@ -130,7 +130,7 @@ void CoreTextStyle::GetFontAttributes( ImplFontAttributes& rFontAttributes ) con
rFontAttributes.SetExternalLeading( lrint( CTFontGetLeading( aCTFontRef )) );
rFontAttributes.SetInternalLeading( lrint( fAscent - fCapHeight ) );
- // since ImplFontAttributes::mnWidth is only used for stretching/squeezing fonts
+ // since FontAttributes::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
rFontAttributes.SetWidth( lrint( CTFontGetSize( aCTFontRef ) * mfFontStretch) );
@@ -274,10 +274,10 @@ int CoreTextFontFace::GetFontTable( const char pTagName[5], unsigned char* pResu
return (int)nByteLength;
}
-ImplFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFontEnabled )
+FontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFontEnabled )
{
// all CoreText fonts are device fonts that can rotate just fine
- ImplFontAttributes rDFA;
+ FontAttributes rDFA;
rDFA.SetOrientationFlag( true );
rDFA.SetBuiltInFontFlag( true );
rDFA.SetQuality( 0 );
@@ -415,7 +415,7 @@ static void CTFontEnumCallBack( const void* pValue, void* pContext )
CTFontDescriptorRef pFD = static_cast<CTFontDescriptorRef>(pValue);
bool bFontEnabled;
- ImplFontAttributes rDFA = DevFontFromCTFontDescriptor( pFD, &bFontEnabled );
+ FontAttributes rDFA = DevFontFromCTFontDescriptor( pFD, &bFontEnabled );
if( bFontEnabled)
{
diff --git a/vcl/quartz/ctfonts.hxx b/vcl/quartz/ctfonts.hxx
index 1752f17c01a9..983437cfaeff 100644
--- a/vcl/quartz/ctfonts.hxx
+++ b/vcl/quartz/ctfonts.hxx
@@ -27,7 +27,7 @@
#include "sallayout.hxx"
SystemFontList* GetCoretextFontList();
-ImplFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef, bool* );
+FontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef, bool* );
#endif // INCLUDED_VCL_QUARTZ_CTFONTS_HXX
diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx
index 5b0d98e3d3b4..2b0eedbce3f1 100644
--- a/vcl/quartz/ctlayout.cxx
+++ b/vcl/quartz/ctlayout.cxx
@@ -492,7 +492,7 @@ int CTLayout::GetNextGlyphs( int nLen, sal_GlyphId* pOutGlyphIds, Point& rPos, i
const PhysicalFontFace* pFallbackFont = nullptr;
CTFontRef pFont = nullptr;
CTFontDescriptorRef pFontDesc = nullptr;
- ImplFontAttributes rDevFontAttr;
+ FontAttributes rDevFontAttr;
boost::ptr_vector<CTRunData>::const_iterator iter = m_vRunData.begin();
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 774252382f54..334eea1a3509 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -64,7 +64,7 @@ CoreTextFontFace::CoreTextFontFace( const CoreTextFontFace& rSrc )
mpCharMap = rSrc.mpCharMap;
}
-CoreTextFontFace::CoreTextFontFace( const ImplFontAttributes& rDFA, sal_IntPtr nFontId )
+CoreTextFontFace::CoreTextFontFace( const FontAttributes& rDFA, sal_IntPtr nFontId )
: PhysicalFontFace( rDFA )
, mnFontId( nFontId )
, mbOs2Read( false )
@@ -306,7 +306,7 @@ void AquaSalGraphics::SetTextColor( SalColor nSalColor )
// SAL_ DEBUG(std::hex << nSalColor << std::dec << "={" << maTextColor.GetRed() << ", " << maTextColor.GetGreen() << ", " << maTextColor.GetBlue() << ", " << maTextColor.GetAlpha() << "}");
}
-void AquaSalGraphics::GetFontAttributes( ImplFontAttributes* pFontAttributes, int /*nFallbackLevel*/ )
+void AquaSalGraphics::GetFontAttributes( FontAttributes* pFontAttributes, int /*nFallbackLevel*/ )
{
mpTextStyle->GetFontAttributes( *pFontAttributes );
}