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).
This commit is contained in:
Luboš Luňák 2011-05-02 11:21:15 +02:00
parent 78ea0365da
commit 1385ee42a3

View file

@ -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 )