summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-21 09:39:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-22 00:25:03 +0200
commitcbce9044b075f22a936c8a15bacf3cb57130c984 (patch)
treec0891d57768de0382d56590bed977e64d49e95a1 /vcl/unx
parent450b89b61d3a061174194acb1c18cb859cfc0123 (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')
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx2
-rw-r--r--vcl/unx/generic/fontmanager/fontsubst.cxx26
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx2
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx4
-rw-r--r--vcl/unx/generic/glyphs/glyphcache.cxx14
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx2
6 files changed, 25 insertions, 25 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
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 3b250838e785..11d4e94592c4 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -198,7 +198,7 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG
if (cairo_glyphs.empty())
return;
- const FontSelectPatternAttributes& rFSD = rInstance.GetFontSelectPattern();
+ const FontSelectPattern& rFSD = rInstance.GetFontSelectPattern();
int nHeight = rFSD.mnHeight;
int nWidth = rFSD.mnWidth ? rFSD.mnWidth : nHeight;
if (nWidth == 0 || nHeight == 0)
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 0dd01d679ad0..69da74515515 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -353,7 +353,7 @@ FreetypeFontFace::FreetypeFontFace( FreetypeFontInfo* pFI, const FontAttributes&
{
}
-rtl::Reference<LogicalFontInstance> FreetypeFontFace::CreateFontInstance(const FontSelectPatternAttributes& rFSD) const
+rtl::Reference<LogicalFontInstance> FreetypeFontFace::CreateFontInstance(const FontSelectPattern& rFSD) const
{
return new FreetypeFontInstance(*this, rFSD);
}
@@ -385,7 +385,7 @@ FreetypeFont::FreetypeFont(LogicalFontInstance* pFontInstance, FreetypeFontInfo*
maFaceFT = pFI->GetFaceFT();
- const FontSelectPatternAttributes& rFSD = pFontInstance->GetFontSelectPattern();
+ const FontSelectPattern& rFSD = pFontInstance->GetFontSelectPattern();
if( rFSD.mnOrientation != 0 )
{
diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx
index b48e3178c35b..cbdfbb1bb87d 100644
--- a/vcl/unx/generic/glyphs/glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/glyphcache.cxx
@@ -85,9 +85,9 @@ size_t GlyphCache::IFSD_Hash::operator()(const rtl::Reference<LogicalFontInstanc
// TODO: is it worth to improve this hash function?
sal_uIntPtr nFontId = GetFontId(*rFontInstance);
- const FontSelectPatternAttributes& rFontSelData = rFontInstance->GetFontSelectPattern();
+ const FontSelectPattern& rFontSelData = rFontInstance->GetFontSelectPattern();
- if (rFontSelData.maTargetName.indexOf(FontSelectPatternAttributes::FEAT_PREFIX)
+ if (rFontSelData.maTargetName.indexOf(FontSelectPattern::FEAT_PREFIX)
!= -1)
{
OString aFeatName = OUStringToOString( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 );
@@ -115,8 +115,8 @@ bool GlyphCache::IFSD_Equal::operator()(const rtl::Reference<LogicalFontInstance
if (GetFontId(*rAFontInstance) != GetFontId(*rBFontInstance))
return false;
- const FontSelectPatternAttributes& rA = rAFontInstance->GetFontSelectPattern();
- const FontSelectPatternAttributes& rB = rBFontInstance->GetFontSelectPattern();
+ const FontSelectPattern& rA = rAFontInstance->GetFontSelectPattern();
+ const FontSelectPattern& rB = rBFontInstance->GetFontSelectPattern();
// compare with the requested metrics
if( (rA.mnHeight != rB.mnHeight)
@@ -140,9 +140,9 @@ bool GlyphCache::IFSD_Equal::operator()(const rtl::Reference<LogicalFontInstance
if (rA.meLanguage != rB.meLanguage)
return false;
// check for features
- if ((rA.maTargetName.indexOf(FontSelectPatternAttributes::FEAT_PREFIX)
+ if ((rA.maTargetName.indexOf(FontSelectPattern::FEAT_PREFIX)
!= -1 ||
- rB.maTargetName.indexOf(FontSelectPatternAttributes::FEAT_PREFIX)
+ rB.maTargetName.indexOf(FontSelectPattern::FEAT_PREFIX)
!= -1) && rA.maTargetName != rB.maTargetName)
return false;
@@ -354,7 +354,7 @@ void FreetypeFont::GarbageCollect( long nMinLruIndex )
}
}
-FreetypeFontInstance::FreetypeFontInstance(const PhysicalFontFace& rPFF, const FontSelectPatternAttributes& rFSP)
+FreetypeFontInstance::FreetypeFontInstance(const PhysicalFontFace& rPFF, const FontSelectPattern& rFSP)
: LogicalFontInstance(rPFF, rFSP)
, mpFreetypeFont(nullptr)
{}
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index aa376c7629fe..0fcaad04dc78 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -611,7 +611,7 @@ void GenPspGraphics::SetFont(LogicalFontInstance *pFontInstance, int nFallbackLe
sal_IntPtr nID = pFontInstance->GetFontFace()->GetFontId();
- const FontSelectPatternAttributes& rEntry = pFontInstance->GetFontSelectPattern();
+ const FontSelectPattern& rEntry = pFontInstance->GetFontSelectPattern();
// determine which font attributes need to be emulated
bool bArtItalic = false;