sw/qa/extras/ooxmlexport/data/tdf156484.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx   |   14 ++++++++++++++
 2 files changed, 14 insertions(+)

New commits:
commit decde4da4f4ab3a9bdc565ebc1e11c145ec4295a
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri May 10 12:33:40 2024 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Fri May 10 14:58:58 2024 +0200

    tdf#156484: sw_ooxmlexport13: Add unittest
    
    Change-Id: I3bcda136eff62a61783b4e52132125c4b1794ccb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167446
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/sw/qa/extras/ooxmlexport/data/tdf156484.docx 
b/sw/qa/extras/ooxmlexport/data/tdf156484.docx
new file mode 100644
index 000000000000..73a61738f681
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf156484.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index c7c670fe30ad..1f41e35f6877 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -709,6 +709,20 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119201, "tdf119201.docx")
     CPPUNIT_ASSERT_MESSAGE("Third shape should be printable.", 
getProperty<bool>(xShape, "Printable"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf156484, "tdf156484.docx")
+{
+    auto xShape(getShape(1));
+    // Without the fix in place, this test would have failed here
+    CPPUNIT_ASSERT_MESSAGE("First shape should not be visible.", 
!getProperty<bool>(xShape, "Visible"));
+    CPPUNIT_ASSERT_MESSAGE("First shape should not be printable.", 
!getProperty<bool>(xShape, "Printable"));
+    xShape = getShape(2);
+    CPPUNIT_ASSERT_MESSAGE("Second shape should not be visible.", 
!getProperty<bool>(xShape, "Visible"));
+    CPPUNIT_ASSERT_MESSAGE("Second shape should not be printable.", 
!getProperty<bool>(xShape, "Printable"));
+    xShape = getShape(3);
+    CPPUNIT_ASSERT_MESSAGE("Third shape should not be visible.", 
!getProperty<bool>(xShape, "Visible"));
+    CPPUNIT_ASSERT_MESSAGE("Third shape should not be printable.", 
!getProperty<bool>(xShape, "Printable"));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx")
 {
     xmlDocUniquePtr pDump = parseLayoutDump();

Reply via email to