diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/open-as-read-only.pptx | bin | 0 -> 21569 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/open-as-read-only.pptx b/sd/qa/unit/data/pptx/open-as-read-only.pptx Binary files differnew file mode 100644 index 000000000000..57a4d32de7f4 --- /dev/null +++ b/sd/qa/unit/data/pptx/open-as-read-only.pptx 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(); |