[Libreoffice-commits] core.git: sw/qa

Justin Luth justin_luth at sil.org
Fri Aug 25 12:10:20 UTC 2017


 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 9c8c4415f64d91c0c30b025edef649344649c3d7
Author: Justin Luth <justin_luth at sil.org>
Date:   Mon Aug 21 15:54:47 2017 -0400

    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 at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>

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());


More information about the Libreoffice-commits mailing list