summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-02-12 12:50:05 +0100
committerAndras Timar <andras.timar@collabora.com>2024-02-16 22:42:19 +0100
commitbe1b3d039c66b852414c3b9403859e7cd41a89ef (patch)
tree80519a023eb070d4e573be837d17e9ab4db065ce /vcl
parente0928a97fc7a18b50c946ac5a65474e02767166f (diff)
tdf#159689: trailing newline before "endstream" must not count in Length
Change-Id: Ic1e636c9d4e5a531113f26e147427fb75ce3591c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163185 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 5121c1f8a3dc1e326a4195393f463f5c0383859b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163281 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index c7ef07ff49cb..a5365e681b3b 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2775,7 +2775,7 @@ bool PDFWriterImpl::emitType3Font(const vcl::font::PhysicalFontFace* pFace,
aLine.setLength(0);
aLine.append(OString::number(nStream)
+ " 0 obj\n<</Length "
- + OString::number(aContents.getLength())
+ + OString::number(aContents.getLength() - 1) // Trailing newline doesn't count
+ ">>\nstream\n");
if (!writeBuffer(aLine))
return false;