sw/qa/extras/ooxmlexport/data/tdf160827.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport20.cxx   |    8 ++++++++
 2 files changed, 8 insertions(+)

New commits:
commit bb55430412a9a0e211482ee853f78ea35989e92a
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Apr 29 17:21:52 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Apr 30 09:37:01 2024 +0200

    tdf#160827: sw_ooxmlexport20: Add unittest
    
    Change-Id: I6fb58ef5e2336a1dcf9c8bc805a494fd4dd8e4bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166871
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf160827.docx 
b/sw/qa/extras/ooxmlexport/data/tdf160827.docx
new file mode 100644
index 000000000000..5f2b76a3d429
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf160827.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
index 94f8872f263a..7418c2665bac 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
@@ -1123,6 +1123,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf158451)
                          getProperty<text::TextContentAnchorType>(getShape(1), 
"AnchorType"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf160827, "tdf160827.docx")
+{
+    // it crashes at import time
+    SwXTextDocument* pTextDoc = 
dynamic_cast<SwXTextDocument*>(mxComponent.get());
+    CPPUNIT_ASSERT(pTextDoc);
+    CPPUNIT_ASSERT(pTextDoc->GetDocShell()->IsSecurityOptOpenReadOnly());
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testTdf159110)
 {
     // Given a text with an URL with multiple spaces

Reply via email to