[Libreoffice-commits] .: Branch 'libreoffice-3-4' - vcl/source

Lubos Lunak llunak at kemper.freedesktop.org
Mon May 2 02:29:38 PDT 2011


 vcl/source/gdi/pdfwriter_impl.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ba678b7d44fbde9e9ac1f0e01b49dc0b211530c0
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon May 2 11:21:15 2011 +0200

    fix off-by-one when exporting postscript fonts to pdf
    
    The problem shows when exporting a text document to pdf and there
    a .pfb font is used (e.g. Standard Symbols L or Bitstream Charter).
    As far as I can say this is actually harmless, as this is just
    a padding section, but Acroread shows an error dialog for this
    (bnc#690005).

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 485dad3..91c4f32 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3359,9 +3359,9 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
                 throw FontException();
             
             // nLength3 is the rest of the file - excluding any section headers
-            // nIndex now points to the first of the 512 '0' characters marking the
+            // nIndex now points before the first of the 512 '0' characters marking the
             // fixed content portion
-            sal_Int32 nLength3 = nFontLen - nIndex;
+            sal_Int32 nLength3 = nFontLen - nIndex - 1;
             for( it = aSections.begin(); it != aSections.end(); ++it )
             {
                 if( *it >= nIndex  )


More information about the Libreoffice-commits mailing list