summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-13 21:01:28 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-12-13 21:36:54 +0000
commitdd6f246a925e92cb0ef024ce4b495aa3990edbc5 (patch)
treedabd0d77401e03b90c9a9252b88277929de10e91 /vcl
parent2731c7d6ba6d3e39b050ea61b6fe76bd621b0367 (diff)
Resolves: rhbz#761009 IFSD_Equal is asymmetrical
(cherry picked from commit 39cbce553da1834f78b77f48b2f1be9578d6cc05) Signed-off-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 89696d1a4dd0..c524c08673e4 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -148,9 +148,11 @@ bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const Font
// NOTE: ignoring meFamily deliberately
// compare with the requested width, allow default width
- if( (rA.mnWidth != rB.mnWidth)
- && ((rA.mnHeight != rB.mnWidth) || (rA.mnWidth != 0)) )
+ int nAWidth = rA.mnWidth != 0 ? rA.mnWidth : rA.mnHeight;
+ int nBWidth = rB.mnWidth != 0 ? rB.mnWidth : rB.mnHeight;
+ if( nAWidth != nBWidth )
return false;
+
#ifdef ENABLE_GRAPHITE
if (rA.meLanguage != rB.meLanguage)
return false;