summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-05-02 11:21:15 +0200
committerLuboš Luňák <l.lunak@suse.cz>2011-05-02 11:29:32 +0200
commitba678b7d44fbde9e9ac1f0e01b49dc0b211530c0 (patch)
tree3303d3c26f5a391199ab4668be7b9431c320017a
parent18211731500d267bd68c914d2cf204d8e9ee755f (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).
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 485dad301c..91c4f328af 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 )