incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1167576 - /incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx
Date Sat, 10 Sep 2011 18:12:10 GMT
Author: erack
Date: Sat Sep 10 18:12:10 2011
New Revision: 1167576

URL: http://svn.apache.org/viewvc?rev=1167576&view=rev
Log:
ooo34gsl02: #i117807# fix an off by one error (index actually inside the pfb section header)

# User Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>

Modified:
    incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx

Modified: incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx?rev=1167576&r1=1167575&r2=1167576&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx Sat Sep 10 18:12:10 2011
@@ -3375,18 +3375,15 @@ std::map< sal_Int32, sal_Int32 > PDFWrit
             sal_Int32 nLength3 = nFontLen - nIndex;
             for( it = aSections.begin(); it != aSections.end(); ++it )
             {
-                if( *it >= nIndex  )
-                {
                 // special case: nIndex inside a section marker
-                    if( nIndex >= (*it) && (*it)+5 > nIndex )
-                        nLength3 -= (*it)+5 - nIndex;
-                    else
-                    {
-                        if( *it < nFontLen - 6 )
-                            nLength3 -= 6;
-                        else // the last section 0x8003 is only 2 bytes after all
-                            nLength3 -= (nFontLen - *it);
-                    }
+                if( nIndex >= (*it) && (*it)+6 > nIndex )
+                    nLength3 -= (*it)+6 - nIndex;
+                else if( *it >= nIndex  )
+                {
+                    if( *it < nFontLen - 6 )
+                        nLength3 -= 6;
+                    else // the last section 0x8003 is only 2 bytes after all
+                        nLength3 -= (nFontLen - *it);
                 }
             }
             



Mime
View raw message