summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorEike Rathke <erack@apache.org>2011-09-10 17:12:10 +0000
committerEike Rathke <erack@apache.org>2011-09-10 17:12:10 +0000
commit89479c3d07962c6e48e715f7559f6e60cd182047 (patch)
tree4236118953337f0990296cfbfb8f0f60d4db6450 /vcl
parent87a59e3900a429fe393ba4b35f968d5eb52d532b (diff)
ooo34gsl02: #i117807# fix an off by one error (index actually inside the pfb section header)
# User Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>
Diffstat (limited to 'vcl')
-rwxr-xr-xvcl/source/gdi/pdfwriter_impl.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 95fe0ac6fad8..74f14c1023d6 100755
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3375,18 +3375,15 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
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);
}
}