diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-05-02 11:21:15 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-05-02 11:27:25 +0200 |
commit | bf01c23b63bd0f1e795fddbc0f20bf37be67d51a (patch) | |
tree | 3b58cf41dd8d4c1575d43a09b24900a334d75025 /vcl | |
parent | 4dbde949438c5ba859605af6f1542b1c3b27a958 (diff) |
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).
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 66072a48d392..b9d76cd4faa5 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 ) |