summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2016-04-25 13:25:39 +0200
committerAndras Timar <andras.timar@collabora.com>2016-10-10 19:22:25 +0200
commit1e12fcfcdded86098b661bd391812eff86c79eed (patch)
tree627413cf48a7830b595c4f5ed896f72e193c9bcc /sw/qa/extras
parent958ead3894877de753d1e163f96d3414883e6d42 (diff)
tdf#99434: import/export documentProtection-forms from .docx incl. test
the setting <w:documentProtection w:edit="forms"> disables editing of content outside of form controls. Change-Id: I0d11373d9010778ed5798598020e453cde06fa0f Reviewed-on: https://gerrit.libreoffice.org/24365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de> (cherry picked from commit 523a3d18e98cd51aa8bf76cf76314a22ddc2b2cf)
Diffstat (limited to 'sw/qa/extras')
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/protectedform.docxbin0 -> 18511 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/protectedform.docx b/sw/qa/extras/ooxmlexport/data/protectedform.docx
new file mode 100755
index 000000000000..a67d88006c6f
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/protectedform.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 612e7bf7ef43..8f41610f4030 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -800,6 +800,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf91594, "tdf91594.docx")
CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty<OUString>(xRun, "CharFontNameAsian"));
CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty<OUString>(xRun, "CharFontNameComplex"));
}
+DECLARE_OOXMLEXPORT_TEST(testTDF99434, "protectedform.docx")
+{
+ css::uno::Reference<css::lang::XMultiServiceFactory> m_xTextFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference< beans::XPropertySet > xSettings(m_xTextFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
+ uno::Any aProtect = xSettings->getPropertyValue("ProtectForm");
+ bool bProt = false;
+ aProtect >>= bProt;
+ CPPUNIT_ASSERT(bProt);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();