summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2019-01-22 13:58:17 +0300
committerMiklos Vajna <vmiklos@collabora.com>2019-01-23 13:36:13 +0100
commita7afdcd8d191248fd143743e818aa9985b95743c (patch)
treeaee59caadc5ff0d27155c378cbb515120ef7fec5 /sw/qa/extras/rtfimport/rtfimport.cxx
parent02ba8155edd409ab249e04d317181a2ef8045191 (diff)
tdf#90097 rtfimport: rewrite unit test so it run reliably
Already broken for windows and mac, the numbers changed for me on Ubuntu when switching from gcc5 to gcc7 or gcc8. How it still works on the tinderboxes etc I don't know. Anyway, by removing the obviously irrelevant actual numbers, the test still covers the original intent by ensuring that the top point is farther to the right than the bottom point. Change-Id: Ieeb7cd854847d47a11dc305db82371e2b8f85049 Reviewed-on: https://gerrit.libreoffice.org/66724 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx16
1 files changed, 1 insertions, 15 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 4672c1910d08..0d29eea41d49 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1257,7 +1257,6 @@ DECLARE_RTFIMPORT_TEST(testClassificatonPaste, "hello.rtf")
CPPUNIT_ASSERT_EQUAL(aOld, xText->getString());
}
-#if !defined(MACOSX) && !defined(WNT)
DECLARE_RTFIMPORT_TEST(testTdf90097, "tdf90097.rtf")
{
// Get the second child of the group shape.
@@ -1267,22 +1266,9 @@ DECLARE_RTFIMPORT_TEST(testTdf90097, "tdf90097.rtf")
xShape->getPropertyValue("PolyPolygon") >>= aPolyPolySequence;
uno::Sequence<awt::Point>& rPolygon = aPolyPolySequence[0];
- // tdf#106792 These values were wrong all the time due to a missing
- // conversion in SvxShapePolyPolygon::getPropertyValueImpl. There was no
- // ForceMetricTo100th_mm -> the old results were in twips due to the
- // object residing in Writer. The UNO API by definition is in 100thmm,
- // thus I will correct the values here.
- // Indeed need to use the Linux values, I have no idea why these differ
- // from Mac/Win ones, but the disable above hints to that (maybe a problem
- // of its own). Factor between Twips and 100thmm is ca. 1.76 -> stable change
-
// Vertical flip for the line shape was ignored, so Y coordinates were swapped.
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4972), rPolygon[0].X); // was: 2819, win is 10927
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3463), rPolygon[0].Y); // was: 1963
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5617), rPolygon[1].X); // was: 3181, win is 11572
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2852), rPolygon[1].Y); // was: 1620
+ CPPUNIT_ASSERT(rPolygon[0].Y > rPolygon[1].Y);
}
-#endif
DECLARE_RTFIMPORT_TEST(testTdf91684, "tdf91684.rtf")
{