Revert "tdf#96892 3 to 5 digit precision"

1 to 3 was helpful, reportedly 3 to 5 isn't.

This reverts commit c4b23192b4.

Change-Id: I51d31a8473ff51f1dcc89a063af568803efe5e11
Reviewed-on: https://gerrit.libreoffice.org/50252
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2018-02-23 15:05:33 +00:00
parent 2e63d45540
commit 36bd5662e7
2 changed files with 4 additions and 4 deletions

View File

@@ -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(267591, static_cast<int>(round(fY * 1000)));
CPPUNIT_ASSERT_EQUAL(267590, 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(251802, static_cast<int>(round(fY * 1000)));
CPPUNIT_ASSERT_EQUAL(251801, static_cast<int>(round(fY * 1000)));
CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 3);

View File

@@ -505,8 +505,8 @@ void doTestCode()
}
#endif
static const sal_Int32 nLog10Divisor = 5;
static const double fDivisor = 100000.0;
static const sal_Int32 nLog10Divisor = 3;
static const double fDivisor = 1000.0;
static inline double pixelToPoint( double px ) { return px/fDivisor; }
static inline sal_Int32 pointToPixel( double pt ) { return sal_Int32(pt*fDivisor); }