vcl/unx/generic/print/bitmap_gfx.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 810e5008e75e54241e056de2129886689d7c21eb Author: Stephan Bergmann <[email protected]> AuthorDate: Thu Jan 17 14:35:34 2019 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Thu Jan 17 16:51:59 2019 +0100 Comment non-obvious Ascii85Encoder::ConvertToAscii85 code (see e.g. the "ASCII85Encode Filter" section on p. 129 of the PostScript Language Reference Manual, 2nd ed., Addison-Wesley 1990) Change-Id: Icfb6d64f67e40053ae8a0f292dd52bd72178ef36 Reviewed-on: https://gerrit.libreoffice.org/66522 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/vcl/unx/generic/print/bitmap_gfx.cxx b/vcl/unx/generic/print/bitmap_gfx.cxx index 613920aaed27..fffe137f7981 100644 --- a/vcl/unx/generic/print/bitmap_gfx.cxx +++ b/vcl/unx/generic/print/bitmap_gfx.cxx @@ -170,6 +170,7 @@ Ascii85Encoder::PutEOD () void Ascii85Encoder::ConvertToAscii85 () { + // Add (4 - mnByte) zero padding bytes: if (mnByte < 4) std::memset (mpByteBuffer + mnByte, 0, (4 - mnByte) * sizeof(sal_uInt8)); @@ -199,6 +200,8 @@ Ascii85Encoder::ConvertToAscii85 () nByteValue /= 85; mpFileBuffer [mnOffset + 0] = (nByteValue % 85) + 33; + // Ignore the last (4 - mnByte) generated characters that correspond to the (4 - mnByte) + // zero padding bytes: mnColumn += (mnByte + 1); mnOffset += (mnByte + 1); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
