diff options
27 files changed, 126 insertions, 126 deletions
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index 5ac685cfcb2b..db0136933f19 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -116,7 +116,7 @@ ImplFontData* ImplMacFontData::Clone() const // ----------------------------------------------------------------------- -ImplFontEntry* ImplMacFontData::CreateFontInstance(ImplFontSelectData& rFSD) const +ImplFontEntry* ImplMacFontData::CreateFontInstance(FontSelectPattern& rFSD) const { return new ImplFontEntry(rFSD); } @@ -1885,7 +1885,7 @@ void AquaSalGraphics::DrawServerFontLayout( const ServerFontLayout& ) // ----------------------------------------------------------------------- -sal_uInt16 AquaSalGraphics::SetFont( ImplFontSelectData* pReqFont, int /*nFallbackLevel*/ ) +sal_uInt16 AquaSalGraphics::SetFont( FontSelectPattern* pReqFont, int /*nFallbackLevel*/ ) { if( !pReqFont ) { 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 ) diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx index 9426183bc5da..866a49f70d91 100644 --- a/vcl/headless/svptext.cxx +++ b/vcl/headless/svptext.cxx @@ -234,7 +234,7 @@ void PspKernInfo::Initialize() const // =========================================================================== -sal_uInt16 SvpSalGraphics::SetFont( ImplFontSelectData* pIFSD, int nFallbackLevel ) +sal_uInt16 SvpSalGraphics::SetFont( FontSelectPattern* pIFSD, int nFallbackLevel ) { // release all no longer needed font resources for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) diff --git a/vcl/inc/aqua/salgdi.h b/vcl/inc/aqua/salgdi.h index d4176d83ca0e..01478dfc5f1e 100644 --- a/vcl/inc/aqua/salgdi.h +++ b/vcl/inc/aqua/salgdi.h @@ -58,7 +58,7 @@ public: virtual ~ImplMacFontData(); virtual ImplFontData* Clone() const; - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; + virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const; virtual sal_IntPtr GetFontId() const; const ImplFontCharMap* GetImplFontCharMap() const; @@ -273,7 +273,7 @@ public: // set the text color to a specific color virtual void SetTextColor( SalColor nSalColor ); // set the font - virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ); + virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ); // get the current font's etrics virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); // get kernign pairs of the current font diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h index 026113a1dc70..b20db0d6aa29 100644 --- a/vcl/inc/generic/genpspgraphics.h +++ b/vcl/inc/generic/genpspgraphics.h @@ -97,7 +97,7 @@ public: virtual void SetROPFillColor( SalROPColor nROPColor ); virtual void SetTextColor( SalColor nSalColor ); - virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ); + virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ); virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); virtual sal_uLong GetKernPairs( sal_uLong nMaxPairs, ImplKernPairData* ); virtual const ImplFontCharMap* GetImplFontCharMap() const; diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx index f08cb2b2c049..6ed1cb81b92e 100644 --- a/vcl/inc/generic/glyphcache.hxx +++ b/vcl/inc/generic/glyphcache.hxx @@ -85,7 +85,7 @@ public: const ExtraKernInfo* = NULL ); void AnnounceFonts( ImplDevFontList* ) const; - ServerFont* CacheFont( const ImplFontSelectData& ); + ServerFont* CacheFont( const FontSelectPattern& ); void UncacheFont( ServerFont& ); void InvalidateAllGlyphs(); @@ -105,9 +105,9 @@ private: // the GlyphCache's FontList matches a font request to a serverfont instance // the FontList key's mpFontData member is reinterpreted as integer font id - struct IFSD_Equal{ bool operator()( const ImplFontSelectData&, const ImplFontSelectData& ) const; }; - struct IFSD_Hash{ size_t operator()( const ImplFontSelectData& ) const; }; - typedef ::boost::unordered_map<ImplFontSelectData,ServerFont*,IFSD_Hash,IFSD_Equal > FontList; + struct IFSD_Equal{ bool operator()( const FontSelectPattern&, const FontSelectPattern& ) const; }; + struct IFSD_Hash{ size_t operator()( const FontSelectPattern& ) const; }; + typedef ::boost::unordered_map<FontSelectPattern,ServerFont*,IFSD_Hash,IFSD_Equal > FontList; FontList maFontList; sal_uLong mnMaxSize; // max overall cache size in bytes mutable sal_uLong mnBytesUsed; @@ -188,7 +188,7 @@ class FtFontInfo; class VCL_DLLPUBLIC ServerFont { public: - ServerFont( const ImplFontSelectData&, FtFontInfo* ); + ServerFont( const FontSelectPattern&, FtFontInfo* ); virtual ~ServerFont(); const ::rtl::OString* GetFontFileName() const; @@ -201,7 +201,7 @@ public: bool NeedsArtificialBold() const { return mbArtBold; } bool NeedsArtificialItalic() const { return mbArtItalic; } - const ImplFontSelectData& GetFontSelData() const { return maFontSelData; } + const FontSelectPattern& GetFontSelData() const { return maFontSelData; } void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const; sal_uLong GetKernPairs( ImplKernPairData** ) const; @@ -246,14 +246,14 @@ private: void ReleaseFromGarbageCollect(); int ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_*, bool ) const; - bool ApplyGSUB( const ImplFontSelectData& ); + bool ApplyGSUB( const FontSelectPattern& ); ServerFontLayoutEngine* GetLayoutEngine(); typedef ::boost::unordered_map<int,GlyphData> GlyphList; mutable GlyphList maGlyphList; - const ImplFontSelectData maFontSelData; + const FontSelectPattern maFontSelData; // info for GlyphcachePeer int mnExtInfo; @@ -309,7 +309,7 @@ private: bool mbGotFontOptions; public: - ImplServerFontEntry( ImplFontSelectData& ); + ImplServerFontEntry( FontSelectPattern& ); virtual ~ImplServerFontEntry(); void SetServerFont( ServerFont* p) { mpServerFont = p; } void HandleFontOptions(); diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 92d17c4868a5..b08edba55ed0 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -99,7 +99,7 @@ public: virtual void SetROPFillColor( SalROPColor nROPColor ); virtual void SetTextColor( SalColor nSalColor ); - virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ); + virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ); virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); virtual sal_uLong GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs ); virtual const ImplFontCharMap* GetImplFontCharMap() const; diff --git a/vcl/inc/ios/salgdi.h b/vcl/inc/ios/salgdi.h index 0c3e591b3d98..5874675911e8 100644 --- a/vcl/inc/ios/salgdi.h +++ b/vcl/inc/ios/salgdi.h @@ -54,7 +54,7 @@ public: virtual ~ImplIosFontData(); virtual ImplFontData* Clone() const; - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; + virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const; virtual sal_IntPtr GetFontId() const; const ImplFontCharMap* GetImplFontCharMap() const; @@ -270,7 +270,7 @@ public: // set the text color to a specific color virtual void SetTextColor( SalColor nSalColor ); // set the font - virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ); + virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ); // get the current font's etrics virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); // get kernign pairs of the current font diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h index 43ba77df8ab7..f640bc1a1f85 100644 --- a/vcl/inc/outdev.h +++ b/vcl/inc/outdev.h @@ -73,7 +73,7 @@ public: bool AddFontFace( ImplFontData* ); void InitMatchData( const utl::FontSubstConfiguration&, const String& rSearchName ); - ImplFontData* FindBestFontFace( const ImplFontSelectData& rFSD ) const; + ImplFontData* FindBestFontFace( const FontSelectPattern& rFSD ) const; void GetFontHeights( std::set<int>& rHeights ) const; void UpdateDevFontList( ImplGetDevFontList& ) const; @@ -191,7 +191,7 @@ class ImplPreMatchFontSubstitution : public ImplFontSubstitution { public: - virtual bool FindFontSubstitute( ImplFontSelectData& ) const = 0; + virtual bool FindFontSubstitute( FontSelectPattern& ) const = 0; }; // ImplGlyphFallbackFontSubstitution @@ -200,7 +200,7 @@ class ImplGlyphFallbackFontSubstitution : public ImplFontSubstitution { public: - virtual bool FindFontSubstitute( ImplFontSelectData&, rtl::OUString& rMissingCodes ) const = 0; + virtual bool FindFontSubstitute( FontSelectPattern&, rtl::OUString& rMissingCodes ) const = 0; }; // ----------------- @@ -216,9 +216,9 @@ private: bool mbPrinter; // cache of recently used font instances - struct IFSD_Equal { bool operator()( const ImplFontSelectData&, const ImplFontSelectData& ) const; }; - struct IFSD_Hash { size_t operator()( const ImplFontSelectData& ) const; }; - typedef ::boost::unordered_map<ImplFontSelectData,ImplFontEntry*,IFSD_Hash,IFSD_Equal > FontInstanceList; + struct IFSD_Equal { bool operator()( const FontSelectPattern&, const FontSelectPattern& ) const; }; + struct IFSD_Hash { size_t operator()( const FontSelectPattern& ) const; }; + typedef ::boost::unordered_map<FontSelectPattern,ImplFontEntry*,IFSD_Hash,IFSD_Equal > FontInstanceList; FontInstanceList maFontInstanceList; // cache of recently requested font names vs. selected font names @@ -233,8 +233,8 @@ public: const Font&, const Size& rPixelSize, float fExactHeight, ImplDirectFontSubstitution* pDevSpecific ); ImplFontEntry* GetFontEntry( ImplDevFontList*, - ImplFontSelectData&, ImplDirectFontSubstitution* pDevSpecific ); - ImplFontEntry* GetGlyphFallbackFont( ImplDevFontList*, ImplFontSelectData&, + FontSelectPattern&, ImplDirectFontSubstitution* pDevSpecific ); + ImplFontEntry* GetGlyphFallbackFont( ImplDevFontList*, FontSelectPattern&, int nFallbackLevel, rtl::OUString& rMissingCodes ); void Release( ImplFontEntry* ); void Invalidate(); diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx index 8dda453c7492..75871dac4293 100644 --- a/vcl/inc/outfont.hxx +++ b/vcl/inc/outfont.hxx @@ -46,7 +46,7 @@ class ImplFontEntry; class ImplDirectFontSubstitution; class ImplPreMatchFontSubstitution; class ImplGlyphFallbackFontSubstitution; -class ImplFontSelectData; +class FontSelectPattern; class Font; class ConvertChar; struct FontMatchStatus; @@ -122,7 +122,7 @@ public: // by using an ImplFontData object as a factory for its corresponding // ImplFontEntry an ImplFontEntry can be extended to cache device and // font instance specific data - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const = 0; + virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const = 0; virtual int GetHeight() const { return mnHeight; } virtual int GetWidth() const { return mnWidth; } @@ -133,7 +133,7 @@ public: ImplFontData* GetNextFace() const { return mpNext; } ImplFontData* CreateAlias() const { return Clone(); } - bool IsBetterMatch( const ImplFontSelectData&, FontMatchStatus& ) const; + bool IsBetterMatch( const FontSelectPattern&, FontMatchStatus& ) const; StringCompare CompareWithSize( const ImplFontData& ) const; StringCompare CompareIgnoreSize( const ImplFontData& ) const; virtual ~ImplFontData() {} @@ -153,15 +153,15 @@ friend class ImplDevFontListData; }; // ---------------------- -// - ImplFontSelectData - +// - FontSelectPattern - // ---------------------- -class ImplFontSelectData : public ImplFontAttributes +class FontSelectPattern : public ImplFontAttributes { public: - ImplFontSelectData( const Font&, const String& rSearchName, + FontSelectPattern( const Font&, const String& rSearchName, const Size&, float fExactHeight ); - ImplFontSelectData( const ImplFontData&, const Size&, + FontSelectPattern( const ImplFontData&, const Size&, float fExactHeight, int nOrientation, bool bVertical ); public: // TODO: change to private @@ -212,11 +212,11 @@ public: // find the device font ImplDevFontListData* FindFontFamily( const String& rFontName ) const; - ImplDevFontListData* ImplFindByFont( ImplFontSelectData&, bool bPrinter, ImplDirectFontSubstitution* ) const; + ImplDevFontListData* ImplFindByFont( FontSelectPattern&, bool bPrinter, ImplDirectFontSubstitution* ) const; ImplDevFontListData* ImplFindBySearchName( const String& ) const; // suggest fonts for glyph fallback - ImplDevFontListData* GetGlyphFallbackFont( ImplFontSelectData&, + ImplDevFontListData* GetGlyphFallbackFont( FontSelectPattern&, rtl::OUString& rMissingCodes, int nFallbackLevel ) const; // prepare platform specific font substitutions @@ -270,7 +270,7 @@ struct ImplKernPairData class ImplFontMetricData : public ImplFontAttributes { public: - explicit ImplFontMetricData( const ImplFontSelectData& ); + explicit ImplFontMetricData( const FontSelectPattern& ); void ImplInitTextLineSize( const OutputDevice* pDev ); void ImplInitAboveTextLineSize(); @@ -330,11 +330,11 @@ public: // TODO: hide members behind accessor methods class VCL_PLUGIN_PUBLIC ImplFontEntry { public: - explicit ImplFontEntry( const ImplFontSelectData& ); + explicit ImplFontEntry( const FontSelectPattern& ); virtual ~ImplFontEntry(); public: // TODO: make data members private - ImplFontSelectData maFontSelData; // FontSelectionData + FontSelectPattern maFontSelData; // FontSelectionData ImplFontMetricData maMetric; // Font Metric const ConvertChar* mpConversion; // used e.g. for StarBats->StarSymbol long mnLineHeight; diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index f2aa64a9549a..75559cb7fc63 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -43,7 +43,7 @@ class ImplDevFontList; class SalBitmap; -class ImplFontSelectData; +class FontSelectPattern; class ImplFontMetricData; struct ImplKernPairData; class ImplFontData; @@ -224,7 +224,7 @@ public: // set the text color to a specific color virtual void SetTextColor( SalColor nSalColor ) = 0; // set the font - virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ) = 0; + virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ) = 0; // release the fonts void ReleaseFonts() { SetFont( NULL, 0 ); } // get the current font's metrics diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx index d8bd6c527f85..4ba0f338254f 100644 --- a/vcl/inc/salwtype.hxx +++ b/vcl/inc/salwtype.hxx @@ -38,7 +38,7 @@ class SalFrame; class SalObject; class Window; -class ImplFontSelectData; +class FontSelectPattern; // --------------- // - SalExtInput - @@ -331,9 +331,9 @@ struct SalFrameState struct SalInputContext { - ImplFontSelectData* mpFont; - LanguageType meLanguage; - sal_uLong mnOptions; + FontSelectPattern* mpFont; + LanguageType meLanguage; + sal_uLong mnOptions; }; #endif // __cplusplus diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index fc055c0b241e..59bb8b7688dc 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -44,7 +44,7 @@ // -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= class ImplFontMetricData; -class ImplFontSelectData; +class FontSelectPattern; class SalBitmap; class SalColormap; class SalDisplay; @@ -204,7 +204,7 @@ protected: SalColor nTransparentColor ); GC GetFontGC(); - bool setFont( const ImplFontSelectData* pEntry, int nFallbackLevel ); + bool setFont( const FontSelectPattern* pEntry, int nFallbackLevel ); void drawMaskedBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap, @@ -260,7 +260,7 @@ public: virtual void SetROPFillColor( SalROPColor nROPColor ); virtual void SetTextColor( SalColor nSalColor ); - virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ); + virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ); virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); virtual sal_uLong GetKernPairs( sal_uLong nMaxPairs, ImplKernPairData* ); virtual const ImplFontCharMap* GetImplFontCharMap() const; diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index 30e9e698b2c5..6aacf92e2e5c 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -279,7 +279,7 @@ enum OutDevViewType { OUTDEV_VIEWTYPE_DONTKNOW, OUTDEV_VIEWTYPE_PRINTPREVIEW, OU class VirtualDevice; class Printer; -class ImplFontSelectData; +class FontSelectPattern; class ImplFontMetricData; class VCLXGraphics; @@ -571,7 +571,7 @@ public: void impPaintLineGeometryWithEvtlExpand(const LineInfo& rInfo, basegfx::B2DPolyPolygon aLinePolyPolygon); SAL_DLLPRIVATE void forceFallbackFontToFit(SalLayout &rFallback, ImplFontEntry &rFallbackFont, - ImplFontSelectData &rFontSelData, int nFallbackLevel, + FontSelectPattern &rFontSelData, int nFallbackLevel, ImplLayoutArgs& rLayoutArgs, const ImplFontMetricData& rOrigMetric) const; protected: OutputDevice(); diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index fd21114a648c..baf6665be04c 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -42,7 +42,7 @@ #include <graphite2/Font.h> #endif -class ImplFontSelectData; +class FontSelectPattern; class ImplWinFontEntry; class ImplFontAttrCache; @@ -88,7 +88,7 @@ public: virtual ~ImplWinFontData(); virtual ImplFontData* Clone() const; - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; + virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const; virtual sal_IntPtr GetFontId() const; void SetFontId( sal_IntPtr nId ) { mnId = nId; } void UpdateFromHDC( HDC ) const; @@ -205,7 +205,7 @@ public: SalColor maLineColor; SalColor maFillColor; - HFONT ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, HFONT& o_rOldFont ); + HFONT ImplDoSetFont( FontSelectPattern* i_pFont, float& o_rFontScale, HFONT& o_rOldFont ); public: explicit WinSalGraphics(); @@ -303,7 +303,7 @@ public: // set the text color to a specific color virtual void SetTextColor( SalColor nSalColor ); // set the font - virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ); + virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ); // get the current font's etrics virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); // get kernign pairs of the current font @@ -388,7 +388,7 @@ void ImplSalInitGraphics( WinSalGraphics* ); void ImplSalDeInitGraphics( WinSalGraphics* ); void ImplUpdateSysColorEntries(); int ImplIsSysColorEntry( SalColor nSalColor ); -void ImplGetLogFontFromFontSelect( HDC, const ImplFontSelectData*, +void ImplGetLogFontFromFontSelect( HDC, const FontSelectPattern*, LOGFONTW&, bool bTestVerticalAvail ); // ----------- diff --git a/vcl/ios/source/gdi/salgdi.cxx b/vcl/ios/source/gdi/salgdi.cxx index ce557deefc72..83b95a5f7704 100644 --- a/vcl/ios/source/gdi/salgdi.cxx +++ b/vcl/ios/source/gdi/salgdi.cxx @@ -106,7 +106,7 @@ ImplFontData* ImplIosFontData::Clone() const // ----------------------------------------------------------------------- -ImplFontEntry* ImplIosFontData::CreateFontInstance(ImplFontSelectData& rFSD) const +ImplFontEntry* ImplIosFontData::CreateFontInstance(FontSelectPattern& rFSD) const { return new ImplFontEntry(rFSD); } @@ -1607,7 +1607,7 @@ void IosSalGraphics::DrawServerFontLayout( const ServerFontLayout& ) // ----------------------------------------------------------------------- -sal_uInt16 IosSalGraphics::SetFont( ImplFontSelectData* pReqFont, int /*nFallbackLevel*/ ) +sal_uInt16 IosSalGraphics::SetFont( FontSelectPattern* pReqFont, int /*nFallbackLevel*/ ) { if( !pReqFont ) { diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 3cc438cd503b..6cd8e34d8891 100755 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -841,7 +841,7 @@ public: const xub_Unicode* mpTargetStyleName; }; -bool ImplFontData::IsBetterMatch( const ImplFontSelectData& rFSD, FontMatchStatus& rStatus ) const +bool ImplFontData::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchStatus& rStatus ) const { int nMatch = 0; @@ -985,7 +985,7 @@ bool ImplFontData::IsBetterMatch( const ImplFontSelectData& rFSD, FontMatchStatu // ======================================================================= -ImplFontEntry::ImplFontEntry( const ImplFontSelectData& rFontSelData ) +ImplFontEntry::ImplFontEntry( const FontSelectPattern& rFontSelData ) : maFontSelData( rFontSelData ), maMetric( rFontSelData ), mpConversion( NULL ), @@ -1198,7 +1198,7 @@ void ImplDevFontListData::InitMatchData( const utl::FontSubstConfiguration& rFon // ----------------------------------------------------------------------- -ImplFontData* ImplDevFontListData::FindBestFontFace( const ImplFontSelectData& rFSD ) const +ImplFontData* ImplDevFontListData::FindBestFontFace( const FontSelectPattern& rFSD ) const { if( !mpFirst ) return NULL; @@ -1414,7 +1414,7 @@ void ImplDevFontList::InitGenericGlyphFallback( void ) const // ----------------------------------------------------------------------- -ImplDevFontListData* ImplDevFontList::GetGlyphFallbackFont( ImplFontSelectData& rFontSelData, +ImplDevFontListData* ImplDevFontList::GetGlyphFallbackFont( FontSelectPattern& rFontSelData, rtl::OUString& rMissingCodes, int nFallbackLevel ) const { ImplDevFontListData* pFallbackData = NULL; @@ -2184,7 +2184,7 @@ ImplGetDevSizeList* ImplDevFontList::GetDevSizeList( const String& rFontName ) c // ======================================================================= -ImplFontSelectData::ImplFontSelectData( const Font& rFont, +FontSelectPattern::FontSelectPattern( const Font& rFont, const String& rSearchName, const Size& rSize, float fExactHeight) : maSearchName( rSearchName ), mnWidth( rSize.Width() ), @@ -2220,7 +2220,7 @@ ImplFontSelectData::ImplFontSelectData( const Font& rFont, // ----------------------------------------------------------------------- -ImplFontSelectData::ImplFontSelectData( const ImplFontData& rFontData, +FontSelectPattern::FontSelectPattern( const ImplFontData& rFontData, const Size& rSize, float fExactHeight, int nOrientation, bool bVertical ) : ImplFontAttributes( rFontData ), mnWidth( rSize.Width() ), @@ -2240,7 +2240,7 @@ ImplFontSelectData::ImplFontSelectData( const ImplFontData& rFontData, // ======================================================================= -size_t ImplFontCache::IFSD_Hash::operator()( const ImplFontSelectData& rFSD ) const +size_t ImplFontCache::IFSD_Hash::operator()( const FontSelectPattern& rFSD ) const { // TODO: does it pay off to improve this hash function? static FontNameHash aFontNameHash; @@ -2265,7 +2265,7 @@ size_t ImplFontCache::IFSD_Hash::operator()( const ImplFontSelectData& rFSD ) co // ----------------------------------------------------------------------- -bool ImplFontCache::IFSD_Equal::operator()(const ImplFontSelectData& rA, const ImplFontSelectData& rB) const +bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const FontSelectPattern& rB) const { // check normalized font family name if( rA.maSearchName != rB.maSearchName ) @@ -2366,14 +2366,14 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, } // initialize internal font request object - ImplFontSelectData aFontSelData( rFont, aSearchName, rSize, fExactHeight ); + FontSelectPattern aFontSelData( rFont, aSearchName, rSize, fExactHeight ); return GetFontEntry( pFontList, aFontSelData, pDevSpecific ); } // ----------------------------------------------------------------------- ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, - ImplFontSelectData& aFontSelData, ImplDirectFontSubstitution* pDevSpecific ) + FontSelectPattern& aFontSelData, ImplDirectFontSubstitution* pDevSpecific ) { // check if a directly matching logical font instance is already cached, // the most recently used font usually has a hit rate of >50% @@ -2446,7 +2446,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, // ----------------------------------------------------------------------- -ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD, +ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD, bool bPrinter, ImplDirectFontSubstitution* pDevSpecific ) const { // give up if no fonts are available @@ -2761,7 +2761,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD, // ----------------------------------------------------------------------- ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( ImplDevFontList* pFontList, - ImplFontSelectData& rFontSelData, int nFallbackLevel, rtl::OUString& rMissingCodes ) + FontSelectPattern& rFontSelData, int nFallbackLevel, rtl::OUString& rMissingCodes ) { // get a candidate font for glyph fallback // unless the previously selected font got a device specific substitution @@ -3321,7 +3321,7 @@ void OutputDevice::ImplInitAboveTextLineSize() // ----------------------------------------------------------------------- -ImplFontMetricData::ImplFontMetricData( const ImplFontSelectData& rFontSelData ) +ImplFontMetricData::ImplFontMetricData( const FontSelectPattern& rFontSelData ) : ImplFontAttributes( rFontSelData ) { // initialize the members provided by the font request @@ -6114,7 +6114,7 @@ SalLayout* OutputDevice::ImplLayout( const String& rOrigStr, } void OutputDevice::forceFallbackFontToFit(SalLayout &rFallback, ImplFontEntry &rFallbackFont, - ImplFontSelectData &rFontSelData, int nFallbackLevel, + FontSelectPattern &rFontSelData, int nFallbackLevel, ImplLayoutArgs& rLayoutArgs, const ImplFontMetricData& rOrigMetric) const { Rectangle aBoundRect; @@ -6184,7 +6184,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay rLayoutArgs.ResetPos(); rtl::OUString aMissingCodes = aMissingCodeBuf.makeStringAndClear(); - ImplFontSelectData aFontSelData = mpFontEntry->maFontSelData; + FontSelectPattern aFontSelData = mpFontEntry->maFontSelData; ImplFontMetricData aOrigMetric( aFontSelData ); // TODO: use cached metric in fontentry diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 7a607afb534c..239a5eb5566f 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2229,7 +2229,7 @@ public: const PDFWriterImpl::BuiltinFont* GetBuiltinFont() const { return &mrBuiltin; } virtual ImplFontData* Clone() const { return new ImplPdfBuiltinFontData(*this); } - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; + virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const; virtual sal_IntPtr GetFontId() const { return reinterpret_cast<sal_IntPtr>(&mrBuiltin); } }; @@ -2266,7 +2266,7 @@ ImplPdfBuiltinFontData::ImplPdfBuiltinFontData( const PDFWriterImpl::BuiltinFont mrBuiltin( rBuiltin ) {} -ImplFontEntry* ImplPdfBuiltinFontData::CreateFontInstance( ImplFontSelectData& rFSD ) const +ImplFontEntry* ImplPdfBuiltinFontData::CreateFontInstance( FontSelectPattern& rFSD ) const { ImplFontEntry* pEntry = new ImplFontEntry( rFSD ); return pEntry; @@ -2293,7 +2293,7 @@ bool PDFWriterImpl::isBuiltinFont( const ImplFontData* pFont ) const return (pFD != NULL); } -void PDFWriterImpl::getFontMetric( ImplFontSelectData* pSelect, ImplFontMetricData* pMetric ) const +void PDFWriterImpl::getFontMetric( FontSelectPattern* pSelect, ImplFontMetricData* pMetric ) const { const ImplPdfBuiltinFontData* pFD = GetPdfFontData( pSelect->mpFontData ); if( !pFD ) @@ -2430,7 +2430,7 @@ void PDFSalLayout::DrawText( SalGraphics& ) const // ----------------------------------------------------------------------- -SalLayout* PDFWriterImpl::GetTextLayout( ImplLayoutArgs& rArgs, ImplFontSelectData* pSelect ) +SalLayout* PDFWriterImpl::GetTextLayout( ImplLayoutArgs& rArgs, FontSelectPattern* pSelect ) { DBG_ASSERT( (pSelect->mpFontData != NULL), "PDFWriterImpl::GetTextLayout mpFontData is NULL" ); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 65fc682b3b75..fd1c2d742706 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -56,7 +56,7 @@ #include <boost/shared_array.hpp> -class ImplFontSelectData; +class FontSelectPattern; class ImplFontMetricData; class FontSubsetInfo; class ZCodec; @@ -1082,8 +1082,8 @@ public: /* for OutputDevice: get layout for builtin fonts */ bool isBuiltinFont( const ImplFontData* ) const; - SalLayout* GetTextLayout( ImplLayoutArgs& rArgs, ImplFontSelectData* pFont ); - void getFontMetric( ImplFontSelectData* pFont, ImplFontMetricData* pMetric ) const; + SalLayout* GetTextLayout( ImplLayoutArgs& rArgs, FontSelectPattern* pFont ); + void getFontMetric( FontSelectPattern* pFont, ImplFontMetricData* pMetric ) const; /* for documentation of public functions please see pdfwriter.hxx */ diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx index aa71c78f471d..9d2cb4bfcc09 100644 --- a/vcl/unx/generic/gdi/salgdi3.cxx +++ b/vcl/unx/generic/gdi/salgdi3.cxx @@ -165,7 +165,7 @@ X11SalGraphics::GetFontGC() //-------------------------------------------------------------------------- -bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLevel ) +bool X11SalGraphics::setFont( const FontSelectPattern *pEntry, int nFallbackLevel ) { // release all no longer needed font resources for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) @@ -369,7 +369,7 @@ void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout ) aId.mbEmbolden = rFont.NeedsArtificialBold(); cairo_matrix_t m; - const ImplFontSelectData& rFSD = rFont.GetFontSelData(); + const FontSelectPattern& rFSD = rFont.GetFontSelData(); int nHeight = rFSD.mnHeight; int nWidth = rFSD.mnWidth ? rFSD.mnWidth : nHeight; @@ -494,7 +494,7 @@ bool X11SalGraphics::GetImplFontCapabilities(vcl::FontCapabilities &rGetImplFont // // ---------------------------------------------------------------------------- -sal_uInt16 X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) +sal_uInt16 X11SalGraphics::SetFont( FontSelectPattern *pEntry, int nFallbackLevel ) { sal_uInt16 nRetVal = 0; if( !setFont( pEntry, nFallbackLevel ) ) diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 6bcc58ea2831..658cecc79d21 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -483,7 +483,7 @@ class WinGlyphFallbackSubstititution public: explicit WinGlyphFallbackSubstititution( HDC ); - bool FindFontSubstitute( ImplFontSelectData&, rtl::OUString& rMissingChars ) const; + bool FindFontSubstitute( FontSelectPattern&, rtl::OUString& rMissingChars ) const; private: HDC mhDC; bool HasMissingChars( const ImplFontData*, const rtl::OUString& rMissingChars ) const; @@ -493,7 +493,7 @@ inline WinGlyphFallbackSubstititution::WinGlyphFallbackSubstititution( HDC hDC ) : mhDC( hDC ) {} -void ImplGetLogFontFromFontSelect( HDC, const ImplFontSelectData*, +void ImplGetLogFontFromFontSelect( HDC, const FontSelectPattern*, LOGFONTW&, bool /*bTestVerticalAvail*/ ); // does a font face hold the given missing characters? @@ -503,10 +503,10 @@ bool WinGlyphFallbackSubstititution::HasMissingChars( const ImplFontData* pFace, const ImplFontCharMap* pCharMap = pWinFont->GetImplFontCharMap(); if( !pCharMap ) { - // construct a Size structure as the parameter of constructor of class ImplFontSelectData + // construct a Size structure as the parameter of constructor of class FontSelectPattern const Size aSize( pFace->GetWidth(), pFace->GetHeight() ); - // create a ImplFontSelectData object for getting s LOGFONT - const ImplFontSelectData aFSD( *pFace, aSize, (float)aSize.Height(), 0, false ); + // create a FontSelectPattern object for getting s LOGFONT + const FontSelectPattern aFSD( *pFace, aSize, (float)aSize.Height(), 0, false ); // construct log font LOGFONTW aLogFont; ImplGetLogFontFromFontSelect( mhDC, &aFSD, aLogFont, true ); @@ -549,7 +549,7 @@ bool WinGlyphFallbackSubstititution::HasMissingChars( const ImplFontData* pFace, // find a fallback font for missing characters // TODO: should stylistic matches be searched and prefered? -bool WinGlyphFallbackSubstititution::FindFontSubstitute( ImplFontSelectData& rFontSelData, rtl::OUString& rMissingChars ) const +bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFontSelData, rtl::OUString& rMissingChars ) const { // guess a locale matching to the missing chars com::sun::star::lang::Locale aLocale; @@ -1533,7 +1533,7 @@ bool ImplIsFontAvailable( HDC hDC, const UniString& rName ) // ----------------------------------------------------------------------- void ImplGetLogFontFromFontSelect( HDC hDC, - const ImplFontSelectData* pFont, + const FontSelectPattern* pFont, LOGFONTW& rLogFont, bool /*bTestVerticalAvail*/ ) { @@ -1605,7 +1605,7 @@ void ImplGetLogFontFromFontSelect( HDC hDC, // ----------------------------------------------------------------------- -HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, HFONT& o_rOldFont ) +HFONT WinSalGraphics::ImplDoSetFont( FontSelectPattern* i_pFont, float& o_rFontScale, HFONT& o_rOldFont ) { HFONT hNewFont = 0; @@ -1678,7 +1678,7 @@ HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFont return hNewFont; } -sal_uInt16 WinSalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel ) +sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* pFont, int nFallbackLevel ) { // return early if there is no new font if( !pFont ) @@ -2784,10 +2784,10 @@ sal_Bool WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, { // TODO: use more of the central font-subsetting code, move stuff there if needed - // create matching ImplFontSelectData + // create matching FontSelectPattern // we need just enough to get to the font file data // use height=1000 for easier debugging (to match psprint's font units) - ImplFontSelectData aIFSD( *pFont, Size(0,1000), 1000.0, 0, false ); + FontSelectPattern aIFSD( *pFont, Size(0,1000), 1000.0, 0, false ); // TODO: much better solution: move SetFont and restoration of old font to caller ScopedFont aOldFont(*this); @@ -2939,9 +2939,9 @@ const void* WinSalGraphics::GetEmbedFontData( const ImplFontData* pFont, const sal_Unicode* pUnicodes, sal_Int32* pCharWidths, FontSubsetInfo& rInfo, long* pDataLen ) { - // create matching ImplFontSelectData + // create matching FontSelectPattern // we need just enough to get to the font file data - ImplFontSelectData aIFSD( *pFont, Size(0,1000), 1000.0, 0, false ); + FontSelectPattern aIFSD( *pFont, Size(0,1000), 1000.0, 0, false ); // TODO: much better solution: move SetFont and restoration of old font to caller ScopedFont aOldFont(*this); @@ -3031,9 +3031,9 @@ void WinSalGraphics::GetGlyphWidths( const ImplFontData* pFont, Int32Vector& rWidths, Ucs2UIntMap& rUnicodeEnc ) { - // create matching ImplFontSelectData + // create matching FontSelectPattern // we need just enough to get to the font file data - ImplFontSelectData aIFSD( *pFont, Size(0,1000), 1000.0, 0, false ); + FontSelectPattern aIFSD( *pFont, Size(0,1000), 1000.0, 0, false ); // TODO: much better solution: move SetFont and restoration of old font to caller ScopedFont aOldFont(*this); diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index a7989a7ea898..b1591f0aad9d 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -87,7 +87,7 @@ using ::rtl::OUStringToOString; class ImplWinFontEntry : public ImplFontEntry { public: - ImplWinFontEntry( ImplFontSelectData& ); + ImplWinFontEntry( FontSelectPattern& ); ~ImplWinFontEntry(); private: @@ -3059,7 +3059,7 @@ int WinSalGraphics::GetMinKashidaWidth() // ======================================================================= -ImplWinFontEntry::ImplWinFontEntry( ImplFontSelectData& rFSD ) +ImplWinFontEntry::ImplWinFontEntry( FontSelectPattern& rFSD ) : ImplFontEntry( rFSD ) , maWidthMap( 512 ) , mpKerningPairs( NULL ) @@ -3165,7 +3165,7 @@ ImplFontData* ImplWinFontData::Clone() const // ----------------------------------------------------------------------- -ImplFontEntry* ImplWinFontData::CreateFontInstance( ImplFontSelectData& rFSD ) const +ImplFontEntry* ImplWinFontData::CreateFontInstance( FontSelectPattern& rFSD ) const { ImplFontEntry* pEntry = new ImplWinFontEntry( rFSD ); return pEntry; |