diff options
Diffstat (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index cb53c31ccfa1..a80aff6ce770 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -645,8 +645,12 @@ DECLARE_OOXMLIMPORT_TEST(testBnc779620, "bnc779620.docx") DECLARE_OOXMLIMPORT_TEST(testTdf105127, "tdf105127.docx") { auto aPolyPolygon = getProperty<drawing::PolyPolygonBezierCoords>(getShape(1), "PolyPolygonBezier"); - // This was 1910, the shape was rendered upside down. - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3257), aPolyPolygon.Coordinates[0][0].Y); + // 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 value here. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5744), aPolyPolygon.Coordinates[0][0].Y); // was: 3257 } DECLARE_OOXMLIMPORT_TEST(testTdf105143, "tdf105143.docx") @@ -1063,8 +1067,17 @@ DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx") uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xShape, uno::UNO_QUERY); // Make sure we're not testing the ellipse child. CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.LineShape"), xShapeDescriptor->getShapeType()); - // This was 2900: horizontal position of the line was incorrect, the 3 children were not connected visually. - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2267), xShape->getPosition().X); + + // tdf#106792 checked that during load of tdf85232.docx the method + // SvxShapePolyPolygon::setPropertyValueImpl is used three times. In + // that method, a call to ForceMetricToItemPoolMetric was missing so + // that the import did not convert the input values from 100thmm + // to twips what is needed due to the object residing in Writer. The + // UNO API by definition is in 100thmm. Result is that in SwXShape::getPosition + // the offset (aOffset) now is (0, 0) instead of an existing offset in + // the load of the document before (what is plausible for a GroupObject). + // Thus, I will adapt the result value here to the now (hopefully) correct one. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1630), xShape->getPosition().X); // was: 2267 } DECLARE_OOXMLIMPORT_TEST(testTdf95755, "tdf95755.docx") |