diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-18 15:44:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-18 15:50:56 +0100 |
commit | 93295a069b9ccccd6fa4da78a6b1ae98c63940f0 (patch) | |
tree | fc4874f3555022db0f59deaeb4ae743f578fa248 /sdext | |
parent | 0868f670374cdcf6c2610d91ff8702f59b2e0bd3 (diff) |
coverity#1371125 Copy-paste error
this went wrong with
commit 9b9e5cfd2fa629b2e1dc4a193e48a4a4e8d34126
Date: Mon Jun 20 17:40:13 2016 +0300
tdf#99589 - tolower / toupper - dangerous to Turks ...
restore the logic to the original logic, but with the new
api
Change-Id: I445064b19eeefabbd25849bae9ca569710cdfac5
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index e15ba172ad12..b213e8eed7ca 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -471,9 +471,12 @@ sal_Int32 Parser::parseFontCheckForString( if (nCopyLen < nAttribLen) return 0; for (sal_Int32 i = 0; i < nAttribLen; ++i) - if (rtl::toAsciiLowerCase(pCopy[i]) != rtl::toAsciiLowerCase(pAttrib[i]) - && rtl::toAsciiUpperCase(pCopy[i]) != rtl::toAsciiLowerCase(pAttrib[i])) + { + sal_uInt32 nCode = pAttrib[i]; + if (rtl::toAsciiLowerCase(pCopy[i]) != nCode + && rtl::toAsciiUpperCase(pCopy[i]) != nCode) return 0; + } rResult.isItalic |= bItalic; rResult.isBold |= bBold; return nAttribLen; |