diff options
author | László Németh <nemeth@numbertext.org> | 2018-06-26 15:01:05 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2018-06-28 16:35:59 +0200 |
commit | bbdb6cb8ed0d77eeb2e413b38f29d2084bd8257b (patch) | |
tree | 46f7119b5fb0d31be6a9a26743d8fcf817936302 /sw | |
parent | 9a5c56a9c4e04589b0a6bb710573922e459d9685 (diff) |
tdf#107690 DOCX, XLSX and PPTX unit tests for "Open as read-only"
ie. OOXML export/import of "_MarkAsFinal" MSO document property.
Change-Id: I01f0702d5467e78eb93ce8dce8ba25874839c3e3
Reviewed-on: https://gerrit.libreoffice.org/56475
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/open-as-read-only.docx | bin | 0 -> 4594 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 7 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/open-as-read-only.docx b/sw/qa/extras/ooxmlexport/data/open-as-read-only.docx Binary files differnew file mode 100644 index 000000000000..057c67ff6dfe --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/open-as-read-only.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 730765a8c9ff..3e1c80d23ace 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -408,6 +408,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107969, "tdf107969.docx") // SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word/document.xml'. } +DECLARE_OOXMLEXPORT_TEST(testOpenDocumentAsReadOnly, "open-as-read-only.docx") +{ + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + CPPUNIT_ASSERT(pTextDoc->GetDocShell()->IsSecurityOptOpenReadOnly()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |