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

New commits:
commit bb75291797f40b1c2b8777704ab6159d1cf5d156
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Feb 7 13:28:06 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Feb 8 12:15:46 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
    (cherry picked from commit 30585873ca8c861aa2d13f85797930f62195ee55)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129613
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 23b49f0fc712..b5e94882a0fb 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 )
@@ -8566,9 +8566,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