vcl/source/gdi/pdfwriter_impl.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 30585873ca8c861aa2d13f85797930f62195ee55
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Feb 7 13:28:06 2022 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Feb 7 18:44:37 2022 +0100

    PDF export: increase default precision of doubles
    
    Follow-up to commit 50682cea4196819980c8e2d4018f80384097ce6f (PDF
    export: improve precision of pdf image sizes, 2022-02-04), sounds like a
    good idea to do this in general, not only in that specific case that was
    required for the test to pass.
    
    Change-Id: I5b36a5a3be26132e96a4de9d224abcaaf79beadb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129599
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 71e1292baaf1..21f085fe2660 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -477,7 +477,7 @@ void appendFixedInt( sal_Int32 nValue, OStringBuffer& 
rBuffer )
 }
 
 // appends a double. PDF does not accept exponential format, only fixed point
-void appendDouble( double fValue, OStringBuffer& rBuffer, sal_Int32 nPrecision 
= 5 )
+void appendDouble( double fValue, OStringBuffer& rBuffer, sal_Int32 nPrecision 
= 10 )
 {
     bool bNeg = false;
     if( fValue < 0.0 )
@@ -8568,9 +8568,9 @@ void PDFWriterImpl::writeReferenceXObject(const 
ReferenceXObjectEmit& rEmit)
 
     aLine.append(">> >>");
     aLine.append(" /Matrix [ ");
-    appendDouble(fScaleX, aLine, /*nPrecision=*/10);
+    appendDouble(fScaleX, aLine);
     aLine.append(" 0 0 ");
-    appendDouble(fScaleY, aLine, /*nPrecision=*/10);
+    appendDouble(fScaleY, aLine);
     aLine.append(" 0 0 ]");
     aLine.append(" /BBox [ 0 0 ");
     aLine.append(aSize.Width());

Reply via email to