diff options
author | Gökçen Eraslan <gokcen.eraslan@gmail.com> | 2012-06-20 15:46:13 +0300 |
---|---|---|
committer | Gökçen Eraslan <gokcen.eraslan@gmail.com> | 2012-06-20 15:46:13 +0300 |
commit | 9ad3203bc1585085c70b026465de1fdc27d1a3a2 (patch) | |
tree | 1c1433f615a14b3682e97bbe2d8723b74ac68117 /vcl | |
parent | 4ef8a04b6a11bed9f83685242672492c6d723d9d (diff) |
Fix the calculation of ByteRange values.
Change-Id: I1d386f381871da7e73cd9efc30ccb71081d24bbc
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index cc65911d89d6..6746d4b5ec4b 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6111,9 +6111,9 @@ bool PDFWriterImpl::emitSignature() appendLiteralStringEncrypt( m_aCreationDateString, m_nSignatureObject, aLine ); aLine.append( " /ByteRange [ 0 "); - aLine.append( m_nSignatureContentOffset, 10 ); + aLine.append( m_nSignatureContentOffset - 1, 10 ); aLine.append( " " ); - aLine.append( m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH, 10 ); + aLine.append( m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH + 1, 10 ); aLine.append( " " ); m_nSignatureLastByteRangeNoOffset = nOffset + aLine.getLength(); @@ -6142,7 +6142,7 @@ bool PDFWriterImpl::finalizeSignature() if ( aError != osl_File_E_None ) return false; - sal_Int64 nLastByteRangeNo = nOffset - (m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH); + sal_Int64 nLastByteRangeNo = nOffset - (m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH) - 1; // 2- overwrite the value to the m_nSignatureLastByteRangeNoOffset position sal_uInt64 nWritten = 0; |