summaryrefslogtreecommitdiff
path: root/sd/qa/unit/export-tests-ooxml2.cxx
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2018-06-26 15:01:05 +0200
committerLászló Németh <nemeth@numbertext.org>2018-06-28 16:35:59 +0200
commitbbdb6cb8ed0d77eeb2e413b38f29d2084bd8257b (patch)
tree46f7119b5fb0d31be6a9a26743d8fcf817936302 /sd/qa/unit/export-tests-ooxml2.cxx
parent9a5c56a9c4e04589b0a6bb710573922e459d9685 (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 'sd/qa/unit/export-tests-ooxml2.cxx')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 01ca434b33b3..6ca55d72a4e3 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -145,6 +145,7 @@ public:
void testTdf90627();
void testTdf104786();
void testTdf104789();
+ void testOpenDocumentAsReadOnly();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -211,6 +212,7 @@ public:
CPPUNIT_TEST(testTdf90627);
CPPUNIT_TEST(testTdf104786);
CPPUNIT_TEST(testTdf104789);
+ CPPUNIT_TEST(testOpenDocumentAsReadOnly);
CPPUNIT_TEST_SUITE_END();
@@ -1682,6 +1684,16 @@ void SdOOXMLExportTest2::testTdf104789()
xDocShRef->DoClose();
}
+void SdOOXMLExportTest2::testOpenDocumentAsReadOnly()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/open-as-read-only.pptx"), PPTX);
+ CPPUNIT_ASSERT(xDocShRef->IsSecurityOptOpenReadOnly());
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ CPPUNIT_ASSERT(xDocShRef->IsSecurityOptOpenReadOnly());
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
CPPUNIT_PLUGIN_IMPLEMENT();