summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-10-27 16:08:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-10-27 16:39:32 +0100
commitbea5e37dd32f30d301aca89ba4875657de7c1025 (patch)
treeb0f0384cdaa9f6ff6d7ce511c7aaa876549fdf30 /vcl/generic
parentac1eb33bfc4ce95779e8a1ed252d928c799afa40 (diff)
Rename ImplFontSelectData to FontSelectPattern so I know what it does
Rename ImplFontSelectData to FontSelectPattern because I can never remember the name of the thing. This way I'll be able to remember that its basically the equivalent of fontconfig's FcPattern
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/fontsubst.cxx18
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx12
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.hxx4
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx2
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx12
-rw-r--r--vcl/generic/print/genpspgraphics.cxx6
6 files changed, 27 insertions, 27 deletions
diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx
index 2d187b18cbf7..6ad4ff157f1f 100644
--- a/vcl/generic/fontmanager/fontsubst.cxx
+++ b/vcl/generic/fontmanager/fontsubst.cxx
@@ -53,7 +53,7 @@ class FcPreMatchSubstititution
: public ImplPreMatchFontSubstitution
{
public:
- bool FindFontSubstitute( ImplFontSelectData& ) const;
+ bool FindFontSubstitute( FontSelectPattern& ) const;
};
class FcGlyphFallbackSubstititution
@@ -61,7 +61,7 @@ class FcGlyphFallbackSubstititution
{
// TODO: add a cache
public:
- bool FindFontSubstitute( ImplFontSelectData&, rtl::OUString& rMissingCodes ) const;
+ bool FindFontSubstitute( FontSelectPattern&, rtl::OUString& rMissingCodes ) const;
};
int SalGenericInstance::FetchFontSubstitutionFlags()
@@ -117,9 +117,9 @@ void SalGenericInstance::RegisterFontSubstitutors( ImplDevFontList* pList )
// -----------------------------------------------------------------------
-static ImplFontSelectData GetFcSubstitute(const ImplFontSelectData &rFontSelData, rtl::OUString& rMissingCodes )
+static FontSelectPattern GetFcSubstitute(const FontSelectPattern &rFontSelData, rtl::OUString& rMissingCodes )
{
- ImplFontSelectData aRet(rFontSelData);
+ FontSelectPattern aRet(rFontSelData);
const rtl::OString aLangAttrib = MsLangId::convertLanguageToIsoByteString( rFontSelData.meLanguage );
@@ -145,7 +145,7 @@ static ImplFontSelectData GetFcSubstitute(const ImplFontSelectData &rFontSelData
namespace
{
- bool uselessmatch(const ImplFontSelectData &rOrig, const ImplFontSelectData &rNew)
+ bool uselessmatch(const FontSelectPattern &rOrig, const FontSelectPattern &rNew)
{
return
(
@@ -160,7 +160,7 @@ namespace
//--------------------------------------------------------------------------
-bool FcPreMatchSubstititution::FindFontSubstitute( ImplFontSelectData &rFontSelData ) const
+bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelData ) const
{
// We dont' actually want to talk to Fontconfig at all for symbol fonts
if( rFontSelData.IsSymbolFont() )
@@ -176,7 +176,7 @@ bool FcPreMatchSubstititution::FindFontSubstitute( ImplFontSelectData &rFontSelD
//don't cache just on the name, cache on all the input and be don't just
//return the original selection data with the fontname updated
rtl::OUString aDummy;
- const ImplFontSelectData aOut = GetFcSubstitute( rFontSelData, aDummy );
+ const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, aDummy );
if( !aOut.maSearchName.Len() )
return false;
@@ -204,7 +204,7 @@ bool FcPreMatchSubstititution::FindFontSubstitute( ImplFontSelectData &rFontSelD
// -----------------------------------------------------------------------
-bool FcGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFontSelData,
+bool FcGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFontSelData,
rtl::OUString& rMissingCodes ) const
{
// We dont' actually want to talk to Fontconfig at all for symbol fonts
@@ -215,7 +215,7 @@ bool FcGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFon
|| 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) )
return false;
- const ImplFontSelectData aOut = GetFcSubstitute( rFontSelData, rMissingCodes );
+ const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, rMissingCodes );
// TODO: cache the unicode + srcfont specific result
// FC doing it would be preferable because it knows the invariables
// e.g. FC knows the FC rule that all Arial gets replaced by LiberationSans
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index ffa4aa33b642..44d8958a0081 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -640,7 +640,7 @@ void FreetypeManager::ClearFontList( )
// -----------------------------------------------------------------------
-ServerFont* FreetypeManager::CreateFont( const ImplFontSelectData& rFSD )
+ServerFont* FreetypeManager::CreateFont( const FontSelectPattern& rFSD )
{
FtFontInfo* pFontInfo = NULL;
@@ -670,7 +670,7 @@ ImplFTSFontData::ImplFTSFontData( FtFontInfo* pFI, const ImplDevFontAttributes&
// -----------------------------------------------------------------------
-ImplFontEntry* ImplFTSFontData::CreateFontInstance( ImplFontSelectData& rFSD ) const
+ImplFontEntry* ImplFTSFontData::CreateFontInstance( FontSelectPattern& rFSD ) const
{
ImplServerFontEntry* pEntry = new ImplServerFontEntry( rFSD );
return pEntry;
@@ -680,7 +680,7 @@ ImplFontEntry* ImplFTSFontData::CreateFontInstance( ImplFontSelectData& rFSD ) c
// ServerFont
// =======================================================================
-ServerFont::ServerFont( const ImplFontSelectData& rFSD, FtFontInfo* pFI )
+ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI )
: maGlyphList( 0),
maFontSelData(rFSD),
mnExtInfo(0),
@@ -1872,7 +1872,7 @@ int ServerFont::GetGlyphKernValue( int nGlyphLeft, int nGlyphRight ) const
if( !nKernVal )
return 0;
// scale the kern value to match the font size
- const ImplFontSelectData& rFSD = GetFontSelData();
+ const FontSelectPattern& rFSD = GetFontSelData();
nKernVal *= rFSD.mnWidth ? rFSD.mnWidth : rFSD.mnHeight;
return (nKernVal + 500) / 1000;
}
@@ -1901,7 +1901,7 @@ sal_uLong ServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
// then we have may have extra kerning info from e.g. psprint
int nCount = mpFontInfo->GetExtraKernPairs( ppKernPairs );
// scale the kern values to match the font size
- const ImplFontSelectData& rFSD = GetFontSelData();
+ const FontSelectPattern& rFSD = GetFontSelData();
int nFontWidth = rFSD.mnWidth ? rFSD.mnWidth : rFSD.mnHeight;
ImplKernPairData* pKernPair = *ppKernPairs;
for( int i = nCount; --i >= 0; ++pKernPair )
@@ -2388,7 +2388,7 @@ bool ServerFont::GetGlyphOutline( int nGlyphIndex,
// -----------------------------------------------------------------------
-bool ServerFont::ApplyGSUB( const ImplFontSelectData& rFSD )
+bool ServerFont::ApplyGSUB( const FontSelectPattern& rFSD )
{
#define MKTAG(s) ((((((s[0]<<8)+s[1])<<8)+s[2])<<8)+s[3])
diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx
index 7386bb3d1e82..79926726be22 100644
--- a/vcl/generic/glyphs/gcach_ftyp.hxx
+++ b/vcl/generic/glyphs/gcach_ftyp.hxx
@@ -164,7 +164,7 @@ public:
void AnnounceFonts( ImplDevFontList* ) const;
void ClearFontList();
- ServerFont* CreateFont( const ImplFontSelectData& );
+ ServerFont* CreateFont( const FontSelectPattern& );
private:
typedef ::boost::unordered_map<sal_IntPtr,FtFontInfo*> FontList;
@@ -187,7 +187,7 @@ public:
FtFontInfo* GetFtFontInfo() const { return mpFtFontInfo; }
- virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const;
+ virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const;
virtual ImplFontData* Clone() const { return new ImplFTSFontData( *this ); }
virtual sal_IntPtr GetFontId() const { return mpFtFontInfo->GetFontId(); }
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index ae5ad511268d..e681c2c4d2d4 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -251,7 +251,7 @@ le_int32 IcuFontFromServerFont::getUnitsPerEM() const
float IcuFontFromServerFont::getXPixelsPerEm() const
{
- const ImplFontSelectData& r = mrServerFont.GetFontSelData();
+ const FontSelectPattern& r = mrServerFont.GetFontSelData();
float fX = r.mnWidth ? r.mnWidth : r.mnHeight;
return fX;
}
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index fa712bb8dc9e..42dddf9912ea 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -102,7 +102,7 @@ void GlyphCache::InvalidateAllGlyphs()
// -----------------------------------------------------------------------
inline
-size_t GlyphCache::IFSD_Hash::operator()( const ImplFontSelectData& rFontSelData ) const
+size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData ) const
{
// TODO: is it worth to improve this hash function?
sal_IntPtr nFontId = reinterpret_cast<sal_IntPtr>( rFontSelData.mpFontData );
@@ -128,7 +128,7 @@ size_t GlyphCache::IFSD_Hash::operator()( const ImplFontSelectData& rFontSelData
// -----------------------------------------------------------------------
-bool GlyphCache::IFSD_Equal::operator()( const ImplFontSelectData& rA, const ImplFontSelectData& rB) const
+bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const FontSelectPattern& rB) const
{
// check font ids
sal_IntPtr nFontIdA = reinterpret_cast<sal_IntPtr>( rA.mpFontData );
@@ -199,7 +199,7 @@ void GlyphCache::AnnounceFonts( ImplDevFontList* pList ) const
// -----------------------------------------------------------------------
-ServerFont* GlyphCache::CacheFont( const ImplFontSelectData& rFontSelData )
+ServerFont* GlyphCache::CacheFont( const FontSelectPattern& rFontSelData )
{
// a serverfont request has pFontData
if( rFontSelData.mpFontData == NULL )
@@ -210,7 +210,7 @@ ServerFont* GlyphCache::CacheFont( const ImplFontSelectData& rFontSelData )
return NULL;
// the FontList's key mpFontData member is reinterpreted as font id
- ImplFontSelectData aFontSelData = rFontSelData;
+ FontSelectPattern aFontSelData = rFontSelData;
aFontSelData.mpFontData = reinterpret_cast<ImplFontData*>( nFontId );
FontList::iterator it = maFontList.find( aFontSelData );
if( it != maFontList.end() )
@@ -301,7 +301,7 @@ void GlyphCache::GarbageCollect()
pServerFont->GarbageCollect( mnLruIndex+0x10000000 );
if( pServerFont == mpCurrentGCFont )
mpCurrentGCFont = NULL;
- const ImplFontSelectData& rIFSD = pServerFont->GetFontSelData();
+ const FontSelectPattern& rIFSD = pServerFont->GetFontSelData();
maFontList.erase( rIFSD );
mrPeer.RemovingFont( *pServerFont );
mnBytesUsed -= pServerFont->GetByteCount();
@@ -432,7 +432,7 @@ bool ServerFont::IsGlyphInvisible( int nGlyphIndex )
// =======================================================================
-ImplServerFontEntry::ImplServerFontEntry( ImplFontSelectData& rFSD )
+ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD )
: ImplFontEntry( rFSD )
, mpServerFont( NULL )
, mbGotFontOptions( false )
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 823d46ac28b9..8aae4c42a110 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -552,7 +552,7 @@ public:
ImplPspFontData( const psp::FastPrintFontInfo& );
virtual sal_IntPtr GetFontId() const { return mnFontId; }
virtual ImplFontData* Clone() const { return new ImplPspFontData( *this ); }
- virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const;
+ virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const;
static bool CheckFontData( const ImplFontData& r ) { return r.CheckMagic( PSPFD_MAGIC ); }
};
@@ -565,7 +565,7 @@ ImplPspFontData::ImplPspFontData( const psp::FastPrintFontInfo& rInfo )
//--------------------------------------------------------------------------
-ImplFontEntry* ImplPspFontData::CreateFontInstance( ImplFontSelectData& rFSD ) const
+ImplFontEntry* ImplPspFontData::CreateFontInstance( FontSelectPattern& rFSD ) const
{
ImplServerFontEntry* pEntry = new ImplServerFontEntry( rFSD );
return pEntry;
@@ -817,7 +817,7 @@ bool GenPspGraphics::GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabil
return m_pServerFont[0]->GetFontCapabilities(rFontCapabilities);
}
-sal_uInt16 GenPspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel )
+sal_uInt16 GenPspGraphics::SetFont( FontSelectPattern *pEntry, int nFallbackLevel )
{
// release all fonts that are to be overridden
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )