summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 10c32eb50c50..c7d2a2ca2af3 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1244,13 +1244,21 @@ DECLARE_RTFIMPORT_TEST(testTdf90097, "tdf90097.rtf")
uno::Sequence<uno::Sequence<awt::Point>> aPolyPolySequence;
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 it's 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>(2819), rPolygon[0].X);
- // This was 1619.
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1963), rPolygon[0].Y);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3181), rPolygon[1].X);
- // This was 1962.
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1620), rPolygon[1].Y);
+ 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
}
#endif