summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-08-21 15:54:47 -0400
committerJustin Luth <justin_luth@sil.org>2017-08-25 14:05:01 +0200
commit9c8c4415f64d91c0c30b025edef649344649c3d7 (patch)
tree8f1866637b9d4e7bca4fc06733c368510fa8cc54 /sw/qa/extras/ooxmlimport
parent4467dc6685dbe2862da5eb54edb89c1711253812 (diff)
tdf#60351 - add unit test for shape brought to foreground
Test for this comment in d59ef5b2ddb9249905fecf941be6ec83251d12de // We should bring it to front, even if wp:anchor's behindDoc="1", // because otherwise paragraph background overlaps the graphic // TODO: if paragraph's background becomes bottommost, // then remove this hack Actually, the proper fix for this would be that the paragraph background also "wraps" around the picture (just like the text), not that the paragraph background becomes bottommost. The main concern in forcing to the foreground would be if wrap_THROUGH text would become hidden. However, testing suggests that cannot happen in this code. In that case, the worst would be that this shape now overlaps another shape - a rather unlikely situation. So this hack should be safe and maintained since it visually fixes a compatibility problem. Change-Id: I96495cd08a580afbca71a7f6d6dfd85652ff021b Reviewed-on: https://gerrit.libreoffice.org/41487 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 894c573a929f..1f93b06fa34f 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1092,6 +1092,9 @@ DECLARE_OOXMLIMPORT_TEST(testTdf60351, "tdf60351.docx")
// Get the first image in the document and check its contour polygon.
// It should contain 6 points. Check their coordinates.
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ // test for TODO: if paragraph's background becomes bottommost [better yet: wraps around shape], then remove this hack
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("HACK ALERT: Shape is in foreground", true, getProperty<bool>(xPropertySet, "Opaque"));
+
css::drawing::PointSequenceSequence aPolyPolygon;
xPropertySet->getPropertyValue("ContourPolyPolygon") >>= aPolyPolygon;
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aPolyPolygon.getLength());