[Libreoffice-commits] core.git: vcl/generic vcl/inc vcl/quartz vcl/source vcl/unx vcl/win
Chris Sherlock
chris.sherlock79 at gmail.com
Thu Dec 31 14:49:55 PST 2015
vcl/generic/glyphs/gcach_ftyp.cxx | 6 -
vcl/generic/glyphs/gcach_ftyp.hxx | 8 +-
vcl/generic/glyphs/glyphcache.cxx | 2
vcl/generic/print/genpspgraphics.cxx | 10 +-
vcl/inc/PhysicalFontFace.hxx | 4 -
vcl/inc/generic/genpspgraphics.h | 4 -
vcl/inc/generic/glyphcache.hxx | 2
vcl/inc/outfont.hxx | 115 ++++++++++++++++----------------
vcl/inc/quartz/salgdi.h | 4 -
vcl/inc/win/salgdi.h | 2
vcl/quartz/ctfonts.cxx | 6 -
vcl/quartz/ctfonts.hxx | 2
vcl/quartz/ctlayout.cxx | 2
vcl/quartz/salgdi.cxx | 2
vcl/source/font/PhysicalFontFace.cxx | 4 -
vcl/source/gdi/pdfwriter_impl.cxx | 4 -
vcl/source/outdev/font.cxx | 2
vcl/unx/generic/gdi/cairotextrender.cxx | 2
vcl/win/gdi/salgdi3.cxx | 28 +++----
19 files changed, 105 insertions(+), 104 deletions(-)
New commits:
commit e9598378b55cc05c95bd3f410c396bd44a74341d
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Thu Dec 31 15:20:12 2015 +1100
vcl: merge ImplDevFontAttributes with ImplFontAttributes
ImplFontAttributes handles device independent data, whilst
ImplDevFontAttributes handles device dependent data. However, there
is no real reason for the divide in classes, and in fact I'm not at
all a fan of using a pImpl directly - sort of defeats the purpose of
having one!
Change-Id: I2db22727e3479b14e3bc37dfad9136703bbdeb13
Reviewed-on: https://gerrit.libreoffice.org/21018
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79 at gmail.com>
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index e9a0c9e..f5b4a0d 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -191,7 +191,7 @@ const void * graphiteFontTable(const void* appFaceHandle, unsigned int name, siz
}
#endif
-FtFontInfo::FtFontInfo( const ImplDevFontAttributes& rDevFontAttributes,
+FtFontInfo::FtFontInfo( const ImplFontAttributes& rDevFontAttributes,
const OString& rNativeFileName, int nFaceNum, sal_IntPtr nFontId)
:
maFaceFT( nullptr ),
@@ -367,7 +367,7 @@ FreetypeManager::~FreetypeManager()
}
void FreetypeManager::AddFontFile( const OString& rNormalizedName,
- int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes& rDevFontAttr)
+ int nFaceNum, sal_IntPtr nFontId, const ImplFontAttributes& rDevFontAttr)
{
if( rNormalizedName.isEmpty() )
return;
@@ -419,7 +419,7 @@ ServerFont* FreetypeManager::CreateFont( const FontSelectPattern& rFSD )
return pNew;
}
-ImplFTSFontData::ImplFTSFontData( FtFontInfo* pFI, const ImplDevFontAttributes& rDFA )
+ImplFTSFontData::ImplFTSFontData( FtFontInfo* pFI, const ImplFontAttributes& rDFA )
: PhysicalFontFace( rDFA, IFTSFONT_MAGIC ),
mpFtFontInfo( pFI )
{
diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx
index 82b52b3..1fe995a 100644
--- a/vcl/generic/glyphs/gcach_ftyp.hxx
+++ b/vcl/generic/glyphs/gcach_ftyp.hxx
@@ -58,7 +58,7 @@ private:
class FtFontInfo
{
public:
- FtFontInfo( const ImplDevFontAttributes&,
+ FtFontInfo( const ImplFontAttributes&,
const OString& rNativeFileName,
int nFaceNum, sal_IntPtr nFontId);
~FtFontInfo();
@@ -94,7 +94,7 @@ private:
GraphiteFaceWrapper * mpGraphiteFace;
#endif
sal_IntPtr mnFontId;
- ImplDevFontAttributes maDevFontAttributes;
+ ImplFontAttributes maDevFontAttributes;
FontCharMapPtr mpFontCharMap;
@@ -133,7 +133,7 @@ public:
~FreetypeManager();
void AddFontFile( const OString& rNormalizedName,
- int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes&);
+ int nFaceNum, sal_IntPtr nFontId, const ImplFontAttributes&);
void AnnounceFonts( PhysicalFontCollection* ) const;
void ClearFontList();
@@ -153,7 +153,7 @@ private:
enum { IFTSFONT_MAGIC = 0x1F150A1C };
public:
- ImplFTSFontData( FtFontInfo*, const ImplDevFontAttributes& );
+ ImplFTSFontData( FtFontInfo*, const ImplFontAttributes& );
virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const override;
virtual PhysicalFontFace* Clone() const override { return new ImplFTSFontData( *this ); }
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 8a2c955..1f69fd6 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -146,7 +146,7 @@ GlyphCache& GlyphCache::GetInstance()
}
void GlyphCache::AddFontFile( const OString& rNormalizedName, int nFaceNum,
- sal_IntPtr nFontId, const ImplDevFontAttributes& rDFA)
+ sal_IntPtr nFontId, const ImplFontAttributes& rDFA)
{
if( mpFtManager )
mpFtManager->AddFontFile( rNormalizedName, nFaceNum, nFontId, rDFA);
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index ea55bf9..207e414 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -553,7 +553,7 @@ public:
};
ImplPspFontData::ImplPspFontData( const psp::FastPrintFontInfo& rInfo )
-: PhysicalFontFace( GenPspGraphics::Info2DevFontAttributes(rInfo), PSPFD_MAGIC ),
+: PhysicalFontFace( GenPspGraphics::Info2FontAttributes(rInfo), PSPFD_MAGIC ),
mnFontId( rInfo.m_nID )
{}
@@ -877,7 +877,7 @@ bool GenPspGraphics::AddTempDevFontHelper( PhysicalFontCollection* pFontCollecti
aInfo.m_aFamilyName = rFontName;
// inform glyph cache of new font
- ImplDevFontAttributes aDFA = GenPspGraphics::Info2DevFontAttributes( aInfo );
+ ImplFontAttributes aDFA = GenPspGraphics::Info2FontAttributes( aInfo );
aDFA.IncreaseQualityBy( 5800 );
int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID );
@@ -919,7 +919,7 @@ void GenPspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int )
if (rMgr.getFontInfo (m_pPrinterGfx->GetFontID(), aInfo))
{
- ImplDevFontAttributes aDFA = Info2DevFontAttributes( aInfo );
+ ImplFontAttributes aDFA = Info2FontAttributes( aInfo );
static_cast<ImplFontAttributes&>(*pMetric) = aDFA;
pMetric->mbDevice = aDFA.IsBuiltInFont();
pMetric->mbScalableFont = true;
@@ -1082,9 +1082,9 @@ void GenPspGraphics::DoGetGlyphWidths( psp::fontID aFont,
rMgr.getGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc );
}
-ImplDevFontAttributes GenPspGraphics::Info2DevFontAttributes( const psp::FastPrintFontInfo& rInfo )
+ImplFontAttributes GenPspGraphics::Info2FontAttributes( const psp::FastPrintFontInfo& rInfo )
{
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
aDFA.SetFamilyName( rInfo.m_aFamilyName );
aDFA.SetStyleName( rInfo.m_aStyleName );
aDFA.SetFamilyType( rInfo.m_eFamilyStyle );
diff --git a/vcl/inc/PhysicalFontFace.hxx b/vcl/inc/PhysicalFontFace.hxx
index 7d0b43c..ce40712 100644
--- a/vcl/inc/PhysicalFontFace.hxx
+++ b/vcl/inc/PhysicalFontFace.hxx
@@ -63,7 +63,7 @@ public:
// Instead, the logical font names are mapped to physical fonts by
// the Java runtime environment.
-class VCL_PLUGIN_PUBLIC PhysicalFontFace : public ImplDevFontAttributes
+class VCL_PLUGIN_PUBLIC PhysicalFontFace : public ImplFontAttributes
{
public:
// by using an PhysicalFontFace object as a factory for its corresponding
@@ -85,7 +85,7 @@ public:
virtual PhysicalFontFace* Clone() const = 0;
protected:
- explicit PhysicalFontFace( const ImplDevFontAttributes&, int nMagic );
+ explicit PhysicalFontFace( const ImplFontAttributes&, int nMagic );
void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; }
long mnWidth; // Width (in pixels)
diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h
index 4c01b88..947f2ca 100644
--- a/vcl/inc/generic/genpspgraphics.h
+++ b/vcl/inc/generic/genpspgraphics.h
@@ -34,7 +34,7 @@ class PhysicalFontCollection;
namespace psp { struct JobData; class PrinterGfx; }
class ServerFont;
-class ImplDevFontAttributes;
+class ImplFontAttributes;
class SalInfoPrinter;
class GlyphCache;
@@ -69,7 +69,7 @@ public:
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- static ImplDevFontAttributes Info2DevFontAttributes( const psp::FastPrintFontInfo& );
+ static ImplFontAttributes Info2FontAttributes( const psp::FastPrintFontInfo& );
static void AnnounceFonts( PhysicalFontCollection*,
const psp::FastPrintFontInfo& );
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index f1159545..9ebe7f7 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -62,7 +62,7 @@ public:
void AddFontFile(
const OString& rNormalizedName,
int nFaceNum, sal_IntPtr nFontId,
- const ImplDevFontAttributes&);
+ const ImplFontAttributes&);
void AnnounceFonts( PhysicalFontCollection* ) const;
diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
index 7c43986..70c2854 100644
--- a/vcl/inc/outfont.hxx
+++ b/vcl/inc/outfont.hxx
@@ -44,81 +44,82 @@ class Size;
class ImplFontAttributes
{
public:
- const OUString& GetFamilyName() const { return maName; }
+ const OUString& GetFamilyName() const { return maFamilyName; }
+ FontFamily GetFamilyType() const { return meFamily; }
const OUString& GetStyleName() const { return maStyleName; }
+
FontWeight GetWeight() const { return meWeight; }
FontItalic GetSlant() const { return meItalic; }
- FontFamily GetFamilyType() const { return meFamily; }
FontPitch GetPitch() const { return mePitch; }
FontWidth GetWidthType() const { return meWidthType; }
+
bool IsSymbolFont() const { return mbSymbolFlag; }
- void SetFamilyName(const OUString& sFamilyName) { maName = sFamilyName; }
+
+ void SetFamilyName(const OUString& sFamilyName) { maFamilyName = sFamilyName; }
void SetStyleName( const OUString& sStyleName) { maStyleName = sStyleName; }
void SetFamilyType(const FontFamily eFontFamily) { meFamily = eFontFamily; }
+
void SetPitch(const FontPitch ePitch ) { mePitch = ePitch; }
void SetItalic(const FontItalic eItalic ) { meItalic = eItalic; }
void SetWeight(const FontWeight eWeight ) { meWeight = eWeight; }
void SetWidthType(const FontWidth eWidthType) { meWidthType = eWidthType; }
+
void SetSymbolFlag(const bool bSymbolFlag ) { mbSymbolFlag = bSymbolFlag; }
bool CompareDeviceIndependentFontAttributes(const ImplFontAttributes& rOther) const;
-private:
- OUString maName; // Font Family Name
- OUString maStyleName; // Font Style Name
- FontWeight meWeight; // Weight Type
- FontItalic meItalic; // Slant Type
- FontFamily meFamily; // Family Type
- FontPitch mePitch; // Pitch Type
- FontWidth meWidthType; // Width Type
- bool mbSymbolFlag;
-};
-
-// device dependent font properties
-
-class ImplDevFontAttributes : public ImplFontAttributes
-{
-public:
- int GetQuality() const { return mnQuality; }
- OUString GetMapNames() const { return maMapNames; }
-
- bool IsBuiltInFont() const { return mbDevice; }
- bool CanEmbed() const { return mbEmbeddable; }
- bool CanSubset() const { return mbSubsettable; }
- bool CanRotate() const { return mbOrientation; }
- bool HasMapNames() const { return (maMapNames.getLength() > 0); }
-
- void SetQuality( int nQuality ) { mnQuality = nQuality; }
- void IncreaseQualityBy( int nQualityAmount ) { mnQuality += nQualityAmount; }
- void DecreaseQualityBy( int nQualityAmount ) { mnQuality -= nQualityAmount; }
- void SetMapNames( OUString aMapNames ) { maMapNames = aMapNames; }
- void AddMapName( OUString aMapName )
- {
- if( maMapNames.getLength() > 0 )
- {
- maMapNames += ";";
- }
- else
- {
- SAL_WARN("vcl.fonts", "New map name is empty");
- return;
- }
-
- maMapNames += aMapName;
- }
-
- void SetBuiltInFontFlag( bool bIsBuiltInFont ) { mbDevice = bIsBuiltInFont; }
- void SetEmbeddableFlag ( bool bEmbeddable ) { mbEmbeddable = bEmbeddable; }
- void SetSubsettableFlag( bool bSubsettable ) { mbSubsettable = bSubsettable; }
- void SetOrientationFlag( bool bCanRotate ) { mbOrientation = bCanRotate; }
+ // Device dependent functions
+ int GetQuality() const { return mnQuality; }
+ OUString GetMapNames() const { return maMapNames; }
+
+ bool IsBuiltInFont() const { return mbDevice; }
+ bool CanEmbed() const { return mbEmbeddable; }
+ bool CanSubset() const { return mbSubsettable; }
+ bool CanRotate() const { return mbOrientation; }
+ bool HasMapNames() const { return (maMapNames.getLength() > 0); }
+
+ void SetQuality( int nQuality ) { mnQuality = nQuality; }
+ void IncreaseQualityBy( int nQualityAmount ) { mnQuality += nQualityAmount; }
+ void DecreaseQualityBy( int nQualityAmount ) { mnQuality -= nQualityAmount; }
+ void SetMapNames( OUString aMapNames ) { maMapNames = aMapNames; }
+ void AddMapName( OUString aMapName )
+ {
+ if( maMapNames.getLength() > 0 )
+ {
+ maMapNames += ";";
+ }
+ else
+ {
+ SAL_WARN("vcl.fonts", "New map name is empty");
+ return;
+ }
+
+ maMapNames += aMapName;
+ }
+
+ void SetBuiltInFontFlag( bool bIsBuiltInFont ) { mbDevice = bIsBuiltInFont; }
+ void SetEmbeddableFlag ( bool bEmbeddable ) { mbEmbeddable = bEmbeddable; }
+ void SetSubsettableFlag( bool bSubsettable ) { mbSubsettable = bSubsettable; }
+ void SetOrientationFlag( bool bCanRotate ) { mbOrientation = bCanRotate; }
private:
- OUString maMapNames; // List of family name aliases separated with ';'
- int mnQuality; // Quality (used when similar fonts compete)
- bool mbOrientation; // true: physical font can be rotated
- bool mbDevice; // true: built in font
- bool mbSubsettable; // true: a subset of the font can be created
- bool mbEmbeddable; // true: the font can be embedded
+ OUString maFamilyName; // Font Family Name
+ OUString maStyleName; // Font Style Name
+ FontWeight meWeight; // Weight Type
+ FontItalic meItalic; // Slant Type
+ FontFamily meFamily; // Family Type
+ FontPitch mePitch; // Pitch Type
+ FontWidth meWidthType; // Width Type
+ bool mbSymbolFlag; // Is font a symbol?
+
+ // device dependent variables
+
+ OUString maMapNames; // List of family name aliases separated with ';'
+ int mnQuality; // Quality (used when similar fonts compete)
+ bool mbOrientation; // true: physical font can be rotated
+ bool mbDevice; // true: built in font
+ bool mbSubsettable; // true: a subset of the font can be created
+ bool mbEmbeddable; // true: the font can be embedded
};
class FontSelectPatternAttributes : public ImplFontAttributes
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 51fe849..557e7d6 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -46,7 +46,7 @@
#include <unordered_map>
class AquaSalFrame;
-class ImplDevFontAttributes;
+class ImplFontAttributes;
class CoreTextStyle;
class XorEmulation;
@@ -57,7 +57,7 @@ typedef std::vector<unsigned char> ByteVector;
class CoreTextFontData : public PhysicalFontFace
{
public:
- CoreTextFontData( const ImplDevFontAttributes&, sal_IntPtr nFontID );
+ CoreTextFontData( const ImplFontAttributes&, sal_IntPtr nFontID );
virtual ~CoreTextFontData();
PhysicalFontFace* Clone() const override;
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index e15d8aa..7372c46 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -72,7 +72,7 @@ private:
class ImplWinFontData : public PhysicalFontFace
{
public:
- explicit ImplWinFontData( const ImplDevFontAttributes&,
+ explicit ImplWinFontData( const ImplFontAttributes&,
int nFontHeight, BYTE eWinCharSet,
BYTE nPitchAndFamily );
virtual ~ImplWinFontData();
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 1b7fe09..980ffa2 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -273,10 +273,10 @@ int CoreTextFontData::GetFontTable( const char pTagName[5], unsigned char* pResu
return (int)nByteLength;
}
-ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFontEnabled )
+ImplFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFontEnabled )
{
// all CoreText fonts are device fonts that can rotate just fine
- ImplDevFontAttributes rDFA;
+ ImplFontAttributes rDFA;
rDFA.SetOrientationFlag( true );
rDFA.SetBuiltInFontFlag( true );
rDFA.SetQuality( 0 );
@@ -414,7 +414,7 @@ static void CTFontEnumCallBack( const void* pValue, void* pContext )
CTFontDescriptorRef pFD = static_cast<CTFontDescriptorRef>(pValue);
bool bFontEnabled;
- ImplDevFontAttributes rDFA = DevFontFromCTFontDescriptor( pFD, &bFontEnabled );
+ ImplFontAttributes rDFA = DevFontFromCTFontDescriptor( pFD, &bFontEnabled );
if( bFontEnabled)
{
diff --git a/vcl/quartz/ctfonts.hxx b/vcl/quartz/ctfonts.hxx
index b896c6a..1752f17 100644
--- a/vcl/quartz/ctfonts.hxx
+++ b/vcl/quartz/ctfonts.hxx
@@ -27,7 +27,7 @@
#include "sallayout.hxx"
SystemFontList* GetCoretextFontList();
-ImplDevFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef, bool* );
+ImplFontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef, bool* );
#endif // INCLUDED_VCL_QUARTZ_CTFONTS_HXX
diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx
index 0eff2a0..f13d617 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;
- ImplDevFontAttributes rDevFontAttr;
+ ImplFontAttributes rDevFontAttr;
boost::ptr_vector<CTRunData>::const_iterator iter = m_vRunData.begin();
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index f8b9fbf..0619b54 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -63,7 +63,7 @@ CoreTextFontData::CoreTextFontData( const CoreTextFontData& rSrc )
mpCharMap = rSrc.mpCharMap;
}
-CoreTextFontData::CoreTextFontData( const ImplDevFontAttributes& rDFA, sal_IntPtr nFontId )
+CoreTextFontData::CoreTextFontData( const ImplFontAttributes& rDFA, sal_IntPtr nFontId )
: PhysicalFontFace( rDFA, 0 )
, mnFontId( nFontId )
, mbOs2Read( false )
diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx
index f306e4b..c7c7ee2 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -25,8 +25,8 @@
#include "PhysicalFontFace.hxx"
-PhysicalFontFace::PhysicalFontFace( const ImplDevFontAttributes& rDFA, int nMagic )
- : ImplDevFontAttributes( rDFA )
+PhysicalFontFace::PhysicalFontFace( const ImplFontAttributes& rDFA, int nMagic )
+ : ImplFontAttributes( rDFA )
, mnWidth(0)
, mnHeight(0)
, mnMagic( nMagic )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 34298db..9e8428f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2262,9 +2262,9 @@ inline const ImplPdfBuiltinFontData* GetPdfFontData( const PhysicalFontFace* pFo
return pFD;
}
-static ImplDevFontAttributes GetDevFontAttributes( const PDFWriterImpl::BuiltinFont& rBuiltin )
+static ImplFontAttributes GetDevFontAttributes( const PDFWriterImpl::BuiltinFont& rBuiltin )
{
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
aDFA.SetFamilyName( OUString::createFromAscii( rBuiltin.m_pName ) );
aDFA.SetStyleName( OUString::createFromAscii( rBuiltin.m_pStyleName ) );
aDFA.SetFamilyType( rBuiltin.m_eFamily );
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 13cee10..1c65120 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1709,7 +1709,7 @@ void OutputDevice::SetFontOrientation( ImplFontEntry* const pFontEntry ) const
bool ImplFontAttributes::CompareDeviceIndependentFontAttributes(const ImplFontAttributes& rOther) const
{
- if (maName != rOther.maName)
+ if (maFamilyName != rOther.maFamilyName)
return false;
if (maStyleName != rOther.maStyleName)
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index a99b9ee..e92aa55 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -415,7 +415,7 @@ void CairoTextRender::GetDevFontList( PhysicalFontCollection* pFontCollection )
int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID );
// inform GlyphCache about this font provided by the PsPrint subsystem
- ImplDevFontAttributes aDFA = GenPspGraphics::Info2DevFontAttributes( aInfo );
+ ImplFontAttributes aDFA = GenPspGraphics::Info2FontAttributes( aInfo );
aDFA.IncreaseQualityBy( 4096 );
const OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID );
rGC.AddFontFile( rFileName, nFaceNum, aInfo.m_nID, aDFA );
diff --git a/vcl/win/gdi/salgdi3.cxx b/vcl/win/gdi/salgdi3.cxx
index c26d795..9e290be 100644
--- a/vcl/win/gdi/salgdi3.cxx
+++ b/vcl/win/gdi/salgdi3.cxx
@@ -72,7 +72,7 @@ static bool bImplSalCourierScalable = false;
static bool bImplSalCourierNew = false;
// TODO: also support temporary TTC font files
-typedef std::map< OUString, ImplDevFontAttributes > FontAttrMap;
+typedef std::map< OUString, ImplFontAttributes > FontAttrMap;
class ImplFontAttrCache
{
@@ -92,8 +92,8 @@ public:
const OUString& rBaseURL);
~ImplFontAttrCache();
- ImplDevFontAttributes GetFontAttr( const OUString& rFontFileName ) const;
- void AddFontAttr( const OUString& rFontFileName, const ImplDevFontAttributes& );
+ ImplFontAttributes GetFontAttr( const OUString& rFontFileName ) const;
+ void AddFontAttr( const OUString& rFontFileName, const ImplFontAttributes& );
};
ImplFontAttrCache::ImplFontAttrCache( const OUString& rFileNameURL, const OUString& rBaseURL ) : aBaseURL( rBaseURL )
@@ -115,7 +115,7 @@ ImplFontAttrCache::ImplFontAttrCache( const OUString& rFileNameURL, const OUStri
// read the cache entries from the file
OUString aFontFileURL;
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
for(;;)
{
aFontFileURL = read_uInt16_lenPrefixed_uInt8s_ToOUString(aCacheFile, RTL_TEXTENCODING_UTF8);
@@ -160,7 +160,7 @@ ImplFontAttrCache::~ImplFontAttrCache()
while ( aIter != aFontAttributes.end() )
{
const OUString rFontFileURL( (*aIter).first );
- const ImplDevFontAttributes& rDFA( (*aIter).second );
+ const ImplFontAttributes& rDFA( (*aIter).second );
write_uInt16_lenPrefixed_uInt8s_FromOUString(aCacheFile, rFontFileURL, RTL_TEXTENCODING_UTF8);
write_uInt16_lenPrefixed_uInt8s_FromOUString(aCacheFile, rDFA.GetFamilyName(), RTL_TEXTENCODING_UTF8);
@@ -189,9 +189,9 @@ OUString ImplFontAttrCache::OptimizeURL( const OUString& rURL ) const
return aOptimizedFontFileURL;
}
-ImplDevFontAttributes ImplFontAttrCache::GetFontAttr( const OUString& rFontFileName ) const
+ImplFontAttributes ImplFontAttrCache::GetFontAttr( const OUString& rFontFileName ) const
{
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
FontAttrMap::const_iterator it = aFontAttributes.find( OptimizeURL( rFontFileName ) );
if( it != aFontAttributes.end() )
{
@@ -200,7 +200,7 @@ ImplDevFontAttributes ImplFontAttrCache::GetFontAttr( const OUString& rFontFileN
return aDFA;
}
-void ImplFontAttrCache::AddFontAttr( const OUString& rFontFileName, const ImplDevFontAttributes& rDFA )
+void ImplFontAttrCache::AddFontAttr( const OUString& rFontFileName, const ImplFontAttributes& rDFA )
{
SAL_WARN_IF(rFontFileName.isEmpty() || rDFA.GetFamilyName().isEmpty(),
"vcl.gdi", "ImplFontNameCache::AddFontName - invalid data!");
@@ -769,10 +769,10 @@ inline BYTE ImplPitchToWin( FontPitch ePitch )
return DEFAULT_PITCH;
}
-static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rEnumFont,
+static ImplFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rEnumFont,
const NEWTEXTMETRICW& rMetric, DWORD nFontType )
{
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
const LOGFONTW rLogFont = rEnumFont.elfLogFont;
@@ -993,7 +993,7 @@ const void * GrFontData::getTable(unsigned int name, size_t *len) const
}
#endif
-ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS,
+ImplWinFontData::ImplWinFontData( const ImplFontAttributes& rDFS,
int nHeight, BYTE eWinCharSet, BYTE nPitchAndFamily )
: PhysicalFontFace( rDFS, 0 ),
mnId( 0 ),
@@ -1694,7 +1694,7 @@ void ImplReleaseTempFonts( SalData& rSalData )
}
static bool ImplGetFontAttrFromFile( const OUString& rFontFileURL,
- ImplDevFontAttributes& rDFA )
+ ImplFontAttributes& rDFA )
{
OUString aUSytemPath;
OSL_VERIFY( !osl::FileBase::getSystemPathFromFileURL( rFontFileURL, aUSytemPath ) );
@@ -1792,7 +1792,7 @@ bool WinSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
{
SAL_INFO( "vcl.gdi", "WinSalGraphics::AddTempDevFont(): " << OUStringToOString( rFontFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
- ImplDevFontAttributes aDFA;
+ ImplFontAttributes aDFA;
aDFA.SetFamilyName(rFontName);
aDFA.SetQuality( 1000 );
aDFA.SetBuiltInFontFlag( true );
@@ -1829,7 +1829,7 @@ bool WinSalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
aDFA.SetEmbeddableFlag( false );
/*
- // TODO: improve ImplDevFontAttributes using the "font resource file"
+ // TODO: improve ImplFontAttributes using the "font resource file"
aDFS.maName = // using "FONTRES:" from file
if( rFontName != aDFS.maName )
aDFS.maMapName = aFontName;
More information about the Libreoffice-commits
mailing list