summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-16 17:44:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-16 17:45:12 +0200
commitd67da1e7216a1b1281f418ecaa067cd3014e47c0 (patch)
treec7547bd271aa2a2600ca10ddc5c03c63b2dd1c91 /vcl
parentbcbf14f6077b0ccf1179dcba3e382bda4f9bdcad (diff)
Remove FontNameHash, use standard OUStringHash
Change-Id: If123bbe8a4ee044ef45f418be0118ccf9509f4e7
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/PhysicalFontCollection.hxx2
-rw-r--r--vcl/source/outdev/font.cxx9
2 files changed, 7 insertions, 4 deletions
diff --git a/vcl/inc/PhysicalFontCollection.hxx b/vcl/inc/PhysicalFontCollection.hxx
index 9c0c7a19ada2..fd9eb157ae51 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -35,7 +35,7 @@ private:
mutable bool mbMatchData; // true if matching attributes are initialized
bool mbMapNames; // true if MapNames are available
- typedef boost::unordered_map<const OUString, PhysicalFontFamily*,FontNameHash> PhysicalFontFamilies;
+ typedef boost::unordered_map<const OUString, PhysicalFontFamily*,OUStringHash> PhysicalFontFamilies;
PhysicalFontFamilies maPhysicalFontFamilies;
ImplPreMatchFontSubstitution* mpPreMatchHook; // device specific prematch substitution
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index c1565f743b14..c82badd18ec5 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -770,16 +770,19 @@ size_t ImplFontCache::IFSD_Hash::operator()( const FontSelectPattern& rFSD ) con
size_t FontSelectPatternAttributes::hashCode() const
{
// TODO: does it pay off to improve this hash function?
- static FontNameHash aFontNameHash;
- size_t nHash = aFontNameHash( maSearchName );
+ size_t nHash;
#if ENABLE_GRAPHITE
// check for features and generate a unique hash if necessary
if (maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
!= -1)
{
- nHash = aFontNameHash( maTargetName );
+ nHash = maTargetName.hashCode();
}
+ else
#endif
+ {
+ nHash = maSearchName.hashCode();
+ }
nHash += 11 * mnHeight;
nHash += 19 * GetWeight();
nHash += 29 * GetSlant();