diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-21 09:39:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-22 00:25:03 +0200 |
commit | cbce9044b075f22a936c8a15bacf3cb57130c984 (patch) | |
tree | c0891d57768de0382d56590bed977e64d49e95a1 /vcl/unx/generic/fontmanager | |
parent | 450b89b61d3a061174194acb1c18cb859cfc0123 (diff) |
rename FontSelectPatternAttributes to FontSelectPattern
Change-Id: I2c018e2e61707c0d89178b0cb38a0918906e23cb
Reviewed-on: https://gerrit.libreoffice.org/59390
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/generic/fontmanager')
-rw-r--r-- | vcl/unx/generic/fontmanager/fontconfig.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/fontmanager/fontsubst.cxx | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index 633f3ab4f914..3c49bb9d00b5 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -862,7 +862,7 @@ IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport, Timer *, void) m_aCurrentRequests.clear(); } -void PrintFontManager::Substitute(FontSelectPatternAttributes &rPattern, OUString& rMissingCodes) +void PrintFontManager::Substitute(FontSelectPattern &rPattern, OUString& rMissingCodes) { FontCfgWrapper& rWrapper = FontCfgWrapper::get(); diff --git a/vcl/unx/generic/fontmanager/fontsubst.cxx b/vcl/unx/generic/fontmanager/fontsubst.cxx index f43ed146e060..034f77bc7be5 100644 --- a/vcl/unx/generic/fontmanager/fontsubst.cxx +++ b/vcl/unx/generic/fontmanager/fontsubst.cxx @@ -28,8 +28,8 @@ class FcPreMatchSubstitution : public ImplPreMatchFontSubstitution { public: - bool FindFontSubstitute( FontSelectPatternAttributes& ) const override; - typedef ::std::pair<FontSelectPatternAttributes, FontSelectPatternAttributes> value_type; + bool FindFontSubstitute( FontSelectPattern& ) const override; + typedef ::std::pair<FontSelectPattern, FontSelectPattern> value_type; private: typedef ::std::list<value_type> CachedFontMapType; mutable CachedFontMapType maCachedFontMap; @@ -40,7 +40,7 @@ class FcGlyphFallbackSubstitution { // TODO: add a cache public: - bool FindFontSubstitute(FontSelectPatternAttributes&, LogicalFontInstance* pLogicalFont, OUString& rMissingCodes) const override; + bool FindFontSubstitute(FontSelectPattern&, LogicalFontInstance* pLogicalFont, OUString& rMissingCodes) const override; }; void SalGenericInstance::RegisterFontSubstitutors( PhysicalFontCollection* pFontCollection ) @@ -54,9 +54,9 @@ void SalGenericInstance::RegisterFontSubstitutors( PhysicalFontCollection* pFont pFontCollection->SetFallbackHook( &aSubstFallback ); } -static FontSelectPatternAttributes GetFcSubstitute(const FontSelectPatternAttributes &rFontSelData, OUString& rMissingCodes) +static FontSelectPattern GetFcSubstitute(const FontSelectPattern &rFontSelData, OUString& rMissingCodes) { - FontSelectPatternAttributes aSubstituted(rFontSelData); + FontSelectPattern aSubstituted(rFontSelData); psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); rMgr.Substitute(aSubstituted, rMissingCodes); return aSubstituted; @@ -64,7 +64,7 @@ static FontSelectPatternAttributes GetFcSubstitute(const FontSelectPatternAttrib namespace { - bool uselessmatch(const FontSelectPatternAttributes &rOrig, const FontSelectPatternAttributes &rNew) + bool uselessmatch(const FontSelectPattern &rOrig, const FontSelectPattern &rNew) { return ( @@ -79,9 +79,9 @@ namespace class equal { private: - const FontSelectPatternAttributes& mrAttributes; + const FontSelectPattern& mrAttributes; public: - explicit equal(const FontSelectPatternAttributes& rAttributes) + explicit equal(const FontSelectPattern& rAttributes) : mrAttributes(rAttributes) { } @@ -90,7 +90,7 @@ namespace }; } -bool FcPreMatchSubstitution::FindFontSubstitute(FontSelectPatternAttributes &rFontSelData) const +bool FcPreMatchSubstitution::FindFontSubstitute(FontSelectPattern &rFontSelData) const { // We don't actually want to talk to Fontconfig at all for symbol fonts if( rFontSelData.IsSymbolFont() ) @@ -104,7 +104,7 @@ bool FcPreMatchSubstitution::FindFontSubstitute(FontSelectPatternAttributes &rFo //different fonts depending on fontsize, bold, etc settings so don't cache //just on the name, cache map all the input and all the output not just map //from original selection to output fontname - FontSelectPatternAttributes& rPatternAttributes = rFontSelData; + FontSelectPattern& rPatternAttributes = rFontSelData; CachedFontMapType &rCachedFontMap = maCachedFontMap; CachedFontMapType::iterator itr = std::find_if(rCachedFontMap.begin(), rCachedFontMap.end(), equal(rPatternAttributes)); if (itr != rCachedFontMap.end()) @@ -120,7 +120,7 @@ bool FcPreMatchSubstitution::FindFontSubstitute(FontSelectPatternAttributes &rFo } OUString aDummy; - const FontSelectPatternAttributes aOut = GetFcSubstitute( rFontSelData, aDummy ); + const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, aDummy ); if( aOut.maSearchName.isEmpty() ) return false; @@ -155,7 +155,7 @@ bool FcPreMatchSubstitution::FindFontSubstitute(FontSelectPatternAttributes &rFo return bHaveSubstitute; } -bool FcGlyphFallbackSubstitution::FindFontSubstitute(FontSelectPatternAttributes& rFontSelData, +bool FcGlyphFallbackSubstitution::FindFontSubstitute(FontSelectPattern& rFontSelData, LogicalFontInstance* /*pLogicalFont*/, OUString& rMissingCodes ) const { @@ -166,7 +166,7 @@ bool FcGlyphFallbackSubstitution::FindFontSubstitute(FontSelectPatternAttributes if ( IsStarSymbol(rFontSelData.maSearchName) ) return false; - const FontSelectPatternAttributes 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 |