summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-13 12:28:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-15 15:35:10 +0100
commitc4b23192b4ab1f3ea75df7e48da36b6b17de248b (patch)
tree147d665b875e83e7aec978274759a06f2e4c3c9f
parent89e9f4984d0dfbc2b69a04e59abc1a3a5d69a0c1 (diff)
tdf#96892 3 to 5 digit precision
Change-Id: Iaecfff78a3e17548dbd097a30c2a6b061806a974 Reviewed-on: https://gerrit.libreoffice.org/49643 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index cb03680a4703..5aadf9fe3d4f 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -732,14 +732,14 @@ void PdfExportTest::testTdf108963()
CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, FPDFPathSegment_GetType(pSegment));
FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
CPPUNIT_ASSERT_EQUAL(275102, static_cast<int>(round(fX * 1000)));
- CPPUNIT_ASSERT_EQUAL(267590, static_cast<int>(round(fY * 1000)));
+ CPPUNIT_ASSERT_EQUAL(267591, static_cast<int>(round(fY * 1000)));
CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 2);
CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, FPDFPathSegment_GetType(pSegment));
FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
CPPUNIT_ASSERT_EQUAL(287518, static_cast<int>(round(fX * 1000)));
- CPPUNIT_ASSERT_EQUAL(251801, static_cast<int>(round(fY * 1000)));
+ CPPUNIT_ASSERT_EQUAL(251802, static_cast<int>(round(fY * 1000)));
CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 3);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index fcb30130d3c4..dd8aebb49a24 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -505,8 +505,8 @@ void doTestCode()
}
#endif
-static const sal_Int32 nLog10Divisor = 3;
-static const double fDivisor = 1000.0;
+static const sal_Int32 nLog10Divisor = 5;
+static const double fDivisor = 100000.0;
static inline double pixelToPoint( double px ) { return px/fDivisor; }
static inline sal_Int32 pointToPixel( double pt ) { return sal_Int32(pt*fDivisor); }