[Libreoffice-commits] .: vcl/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Wed Sep 14 13:24:24 PDT 2011
vcl/source/gdi/outdev3.cxx | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
New commits:
commit b6cccb9e77111254932ebcf96f883aab04cb3f56
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Sep 14 22:21:58 2011 +0200
Fix nSearchType vs. nMatchType typo and simplify resulting code.
Issue unearthed by julien2412.
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 3f3e9fb..24ab4b8 100755
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -1996,13 +1996,10 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAttributes( sal_uLong nSearchTyp
nTestMatch += 10000;
// test OTHERSTYLE attribute
- if( nMatchType & IMPL_FONT_ATTR_OTHERSTYLE )
+ if( ((nSearchType ^ nMatchType) & IMPL_FONT_ATTR_OTHERSTYLE) != 0 )
{
- if( !(nMatchType & IMPL_FONT_ATTR_OTHERSTYLE) )
- nTestMatch -= 10000;
- }
- else if( nMatchType & IMPL_FONT_ATTR_OTHERSTYLE )
nTestMatch -= 10000;
+ }
// test ROUNDED attribute
if( 0 == ((nSearchType ^ nMatchType) & IMPL_FONT_ATTR_ROUNDED) )
More information about the Libreoffice-commits
mailing list