[Libreoffice-commits] core.git: sdext/source

Caolán McNamara caolanm at redhat.com
Thu Aug 18 14:51:20 UTC 2016


 sdext/source/pdfimport/wrapper/wrapper.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 93295a069b9ccccd6fa4da78a6b1ae98c63940f0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 18 15:44:28 2016 +0100

    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

diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index e15ba17..b213e8e 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;


More information about the Libreoffice-commits mailing list