[Libreoffice-commits] .: vcl/aqua vcl/inc
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Aug 30 22:21:05 PDT 2012
vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx | 26 +++++++++---------
vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx | 13 ++++-----
vcl/aqua/source/gdi/coretext/salgdi.cxx | 16 +++++------
vcl/inc/aqua/coretext/salcoretextfontutils.hxx | 12 ++++----
vcl/inc/aqua/coretext/salcoretextstyle.hxx | 4 +-
vcl/inc/aqua/coretext/salgdi.h | 2 -
6 files changed, 36 insertions(+), 37 deletions(-)
New commits:
commit e1b61b2dafd8e84c60f5ae0eebf04165ea55d353
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Mon Jul 2 11:37:15 2012 -0500
rename ImplCoreTextFontData in CoreTextPhysicalFontFace
Change-Id: Idcf9c21ab1a16b8d83f925aa742f1a5aa7089bc3
Reviewed-on: https://gerrit.libreoffice.org/305
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
index faaf11b..a54cfb9 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
@@ -203,7 +203,7 @@ SystemFontList::SystemFontList()
ImplDevFontAttributes devfont_attr;
if(GetDevFontAttributes( font_descriptor, devfont_attr ) )
{
- ImplCoreTextFontData* font_data = new ImplCoreTextFontData(devfont_attr, font);
+ CoreTextPhysicalFontFace* font_data = new CoreTextPhysicalFontFace(devfont_attr, font);
if(font_data && font_data->GetCTFont())
{
m_aFontContainer [ font_data->GetCTFont() ] = font_data;
@@ -224,7 +224,7 @@ SystemFontList::~SystemFontList()
m_aFontContainer.clear();
}
-ImplCoreTextFontData* SystemFontList::GetFontDataFromRef( CTFontRef font ) const
+CoreTextPhysicalFontFace* SystemFontList::GetFontDataFromRef( CTFontRef font ) const
{
CoreTextFontContainer::const_iterator it = m_aFontContainer.find( font );
return it == m_aFontContainer.end() ? NULL : (*it).second;
@@ -240,7 +240,7 @@ void SystemFontList::AnnounceFonts( ImplDevFontList& rFontList ) const
}
}
-ImplCoreTextFontData::ImplCoreTextFontData( const ImplDevFontAttributes& rDFA, CTFontRef font )
+CoreTextPhysicalFontFace::CoreTextPhysicalFontFace( const ImplDevFontAttributes& rDFA, CTFontRef font )
: PhysicalFontFace( rDFA, 0 )
, m_CTFontRef((CTFontRef)CFRetain(font))
, m_pCharMap( NULL )
@@ -252,7 +252,7 @@ ImplCoreTextFontData::ImplCoreTextFontData( const ImplDevFontAttributes& rDFA, C
{
}
-ImplCoreTextFontData::~ImplCoreTextFontData()
+CoreTextPhysicalFontFace::~CoreTextPhysicalFontFace()
{
if( m_pCharMap )
{
@@ -264,9 +264,9 @@ ImplCoreTextFontData::~ImplCoreTextFontData()
}
}
-PhysicalFontFace* ImplCoreTextFontData::Clone() const
+PhysicalFontFace* CoreTextPhysicalFontFace::Clone() const
{
- ImplCoreTextFontData* pClone = new ImplCoreTextFontData(*this);
+ CoreTextPhysicalFontFace* pClone = new CoreTextPhysicalFontFace(*this);
if( m_pCharMap )
{
m_pCharMap->AddReference();
@@ -278,12 +278,12 @@ PhysicalFontFace* ImplCoreTextFontData::Clone() const
return pClone;
}
-ImplFontEntry* ImplCoreTextFontData::CreateFontInstance(FontSelectPattern& rFSD) const
+ImplFontEntry* CoreTextPhysicalFontFace::CreateFontInstance(FontSelectPattern& rFSD) const
{
return new ImplFontEntry(rFSD);
}
-const ImplFontCharMap* ImplCoreTextFontData::GetImplFontCharMap()
+const ImplFontCharMap* CoreTextPhysicalFontFace::GetImplFontCharMap()
{
// return the cached charmap
if( m_pCharMap )
@@ -316,7 +316,7 @@ const ImplFontCharMap* ImplCoreTextFontData::GetImplFontCharMap()
return m_pCharMap;
}
-bool ImplCoreTextFontData::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities)
+bool CoreTextPhysicalFontFace::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities)
{
// read this only once per font
if( m_bFontCapabilitiesRead )
@@ -380,7 +380,7 @@ void addTable(struct font_table* table, CTFontTableTag tag, CFDataRef data)
}
}
-bool ImplCoreTextFontData::GetRawFontData( std::vector<unsigned char>& rBuffer, bool* pJustCFF ) const
+bool CoreTextPhysicalFontFace::GetRawFontData( std::vector<unsigned char>& rBuffer, bool* pJustCFF ) const
{
bool rc;
int table_count = 0;
@@ -528,7 +528,7 @@ bool ImplCoreTextFontData::GetRawFontData( std::vector<unsigned char>& rBuffer,
return rc;
}
-void ImplCoreTextFontData::DetermineCJKSupport_OS2(CFDataRef rOS2Table)
+void CoreTextPhysicalFontFace::DetermineCJKSupport_OS2(CFDataRef rOS2Table)
{
if(CFDataGetLength(rOS2Table) >= 48)
{
@@ -545,7 +545,7 @@ void ImplCoreTextFontData::DetermineCJKSupport_OS2(CFDataRef rOS2Table)
}
}
-void ImplCoreTextFontData::DetermineCJKSupport_cmap(CFDataRef rCmapTable)
+void CoreTextPhysicalFontFace::DetermineCJKSupport_cmap(CFDataRef rCmapTable)
{
int table_len = CFDataGetLength(rCmapTable) / 2;
if(table_len >= 12)
@@ -574,7 +574,7 @@ void ImplCoreTextFontData::DetermineCJKSupport_cmap(CFDataRef rCmapTable)
}
}
-bool ImplCoreTextFontData::HasCJKSupport( void )
+bool CoreTextPhysicalFontFace::HasCJKSupport( void )
{
// read this only once per font
if(!m_bOs2TableRead )
diff --git a/vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx b/vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx
index 5a092af..90d5187 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx
@@ -13,7 +13,7 @@ CoreTextStyleInfo::CoreTextStyleInfo() :
m_CTParagraphStyle(NULL),
m_CTFont(NULL),
m_color(NULL),
- m_font_data(NULL)
+ m_font_face(NULL)
{
msgs_debug(style,"create <-->");
}
@@ -38,24 +38,23 @@ void CoreTextStyleInfo::SetFont(FontSelectPattern* requested_font)
SafeCFRelease(m_CTFont);
if(!requested_font)
{
- m_font_data = NULL;
+ m_font_face = NULL;
return;
}
- const ImplCoreTextFontData* font_data = static_cast<const ImplCoreTextFontData*>(requested_font->mpFontData);
+ m_font_face = static_cast<const CoreTextPhysicalFontFace*>(requested_font->mpFontData);
- m_font_data = (ImplCoreTextFontData*)font_data;
m_matrix = CGAffineTransformIdentity;
CGFloat font_size = (CGFloat)requested_font->mfExactHeight;
// enable bold-emulation if needed
if( (requested_font->GetWeight() >= WEIGHT_BOLD) &&
- (font_data->GetWeight() < WEIGHT_SEMIBOLD) )
+ (m_font_face->GetWeight() < WEIGHT_SEMIBOLD) )
{
/* FIXME: add support for fake bold */
m_fake_bold = true;
}
if( ((requested_font->GetSlant() == ITALIC_NORMAL) || (requested_font->GetSlant() == ITALIC_OBLIQUE)) &&
- !((font_data->GetSlant() == ITALIC_NORMAL) || (font_data->GetSlant() == ITALIC_OBLIQUE)) )
+ !((m_font_face->GetSlant() == ITALIC_NORMAL) || (m_font_face->GetSlant() == ITALIC_OBLIQUE)) )
{
#define kRotationForItalicText 10
m_fake_italic = true;
@@ -72,7 +71,7 @@ void CoreTextStyleInfo::SetFont(FontSelectPattern* requested_font)
/* FIXME: pass attribute to take into accout 'VerticalStyle' */
/* FIXME: how to deal with 'rendering options' i.e anti-aliasing, does it even matter in CoreText ? */
- m_CTFont = CTFontCreateCopyWithAttributes(font_data->GetCTFont(), font_size, &m_matrix, NULL);
+ m_CTFont = CTFontCreateCopyWithAttributes(m_font_face->GetCTFont(), font_size, &m_matrix, NULL);
msgs_debug(style,"font %p <--", m_CTFont);
}
diff --git a/vcl/aqua/source/gdi/coretext/salgdi.cxx b/vcl/aqua/source/gdi/coretext/salgdi.cxx
index 62e0903..160cf18 100644
--- a/vcl/aqua/source/gdi/coretext/salgdi.cxx
+++ b/vcl/aqua/source/gdi/coretext/salgdi.cxx
@@ -23,7 +23,7 @@ AquaSalGraphics::AquaSalGraphics()
, mxClipPath( NULL )
, maLineColor( COL_WHITE )
, maFillColor( COL_BLACK )
- , m_pCoreTextFontData( NULL )
+ , m_font_face( NULL )
, mbNonAntialiasedText( false )
, mbPrinter( false )
, mbVirDev( false )
@@ -145,28 +145,28 @@ sal_uLong AquaSalGraphics::GetKernPairs( sal_uLong, ImplKernPairData* )
bool AquaSalGraphics::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const
{
- if( !m_pCoreTextFontData )
+ if( !m_font_face )
{
return false;
}
- return m_pCoreTextFontData->GetImplFontCapabilities(rFontCapabilities);
+ return m_font_face->GetImplFontCapabilities(rFontCapabilities);
}
const ImplFontCharMap* AquaSalGraphics::GetImplFontCharMap() const
{
- if( !m_pCoreTextFontData )
+ if( !m_font_face )
{
return ImplFontCharMap::GetDefaultMap();
}
- return m_pCoreTextFontData->GetImplFontCharMap();
+ return m_font_face->GetImplFontCharMap();
}
-bool AquaSalGraphics::GetRawFontData( const PhysicalFontFace* pFontData,
+bool AquaSalGraphics::GetRawFontData( const PhysicalFontFace* pFontFace,
std::vector<unsigned char>& rBuffer, bool* pJustCFF )
{
- const ImplCoreTextFontData* font_data = static_cast<const ImplCoreTextFontData*>(pFontData);
+ const CoreTextPhysicalFontFace* font_face = static_cast<const CoreTextPhysicalFontFace*>(pFontFace);
- return font_data->GetRawFontData(rBuffer, pJustCFF);
+ return font_face->GetRawFontData(rBuffer, pJustCFF);
}
SystemFontData AquaSalGraphics::GetSysFontData( int /* nFallbacklevel */ ) const
diff --git a/vcl/inc/aqua/coretext/salcoretextfontutils.hxx b/vcl/inc/aqua/coretext/salcoretextfontutils.hxx
index 3c75899..486bafd 100644
--- a/vcl/inc/aqua/coretext/salcoretextfontutils.hxx
+++ b/vcl/inc/aqua/coretext/salcoretextfontutils.hxx
@@ -3,7 +3,7 @@
#ifndef _VCL_AQUA_CORETEXT_SALCORETEXTFONTUTILS_HXX
#define _VCL_AQUA_CORETEXT_SALCORETEXTFONTUTILS_HXX
-class ImplCoreTextFontData;
+class CoreTextPhysicalFontFace;
class ImplDevFontList;
#include <boost/unordered_map.hpp>
@@ -13,11 +13,11 @@ class ImplDevFontList;
#include "outfont.hxx"
#include "impfont.hxx"
-class ImplCoreTextFontData : public PhysicalFontFace
+class CoreTextPhysicalFontFace : public PhysicalFontFace
{
public:
- ImplCoreTextFontData(const ImplDevFontAttributes&, CTFontRef font);
- virtual ~ImplCoreTextFontData();
+ CoreTextPhysicalFontFace(const ImplDevFontAttributes&, CTFontRef font);
+ virtual ~CoreTextPhysicalFontFace();
virtual PhysicalFontFace* Clone() const;
virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const;
virtual sal_IntPtr GetFontId() const { return (sal_IntPtr)m_CTFontRef;};
@@ -53,10 +53,10 @@ public:
~SystemFontList();
void AnnounceFonts( ImplDevFontList& ) const;
- ImplCoreTextFontData* GetFontDataFromRef( CTFontRef ) const;
+ CoreTextPhysicalFontFace* GetFontDataFromRef( CTFontRef ) const;
private:
- typedef boost::unordered_map<CTFontRef,ImplCoreTextFontData*> CoreTextFontContainer;
+ typedef boost::unordered_map<CTFontRef,CoreTextPhysicalFontFace*> CoreTextFontContainer;
CoreTextFontContainer m_aFontContainer;
void InitGlyphFallbacks();
diff --git a/vcl/inc/aqua/coretext/salcoretextstyle.hxx b/vcl/inc/aqua/coretext/salcoretextstyle.hxx
index 91bde52..6313986 100644
--- a/vcl/inc/aqua/coretext/salcoretextstyle.hxx
+++ b/vcl/inc/aqua/coretext/salcoretextstyle.hxx
@@ -6,7 +6,7 @@
#include "aqua/salgdicommon.hxx"
class FontSelectPattern;
-class ImplCoreTextFontData;
+class CoreTextPhysicalFontFace;
class CoreTextStyleInfo
{
@@ -33,7 +33,7 @@ private:
CTParagraphStyleRef m_CTParagraphStyle;
CTFontRef m_CTFont;
CGColorRef m_color;
- const ImplCoreTextFontData* m_font_data;
+ const CoreTextPhysicalFontFace* m_font_face;
};
diff --git a/vcl/inc/aqua/coretext/salgdi.h b/vcl/inc/aqua/coretext/salgdi.h
index 7f59de2..fb9f863 100644
--- a/vcl/inc/aqua/coretext/salgdi.h
+++ b/vcl/inc/aqua/coretext/salgdi.h
@@ -48,7 +48,7 @@ protected:
RGBAColor maLineColor; //< pen color RGBA
RGBAColor maFillColor; //< brush color RGBA
- ImplCoreTextFontData* m_pCoreTextFontData; //< Device Font settings
+ CoreTextPhysicalFontFace* m_font_face; //< Device Font settings
bool mbNonAntialiasedText; //< allows text to be rendered without antialiasing
More information about the Libreoffice-commits
mailing list