diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-09-14 22:21:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-09-14 22:24:14 +0200 |
commit | b6cccb9e77111254932ebcf96f883aab04cb3f56 (patch) | |
tree | a0004ed0221faeb97f408d8b4a7da3b0dcabe608 /vcl/source/gdi/outdev3.cxx | |
parent | fb1e454e7fa513f6b9d667a32da4aacf185f067a (diff) |
Fix nSearchType vs. nMatchType typo and simplify resulting code.
Issue unearthed by julien2412.
Diffstat (limited to 'vcl/source/gdi/outdev3.cxx')
-rwxr-xr-x | vcl/source/gdi/outdev3.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 3f3e9fb09b8c..24ab4b817772 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) ) |