sw/qa/extras/ooxmlexport/data/sectionprot.odt |binary sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 15 +++++++++++++++ 2 files changed, 15 insertions(+)
New commits: commit 2813cfaae68af93b24bf4ecc1128f6647178f642 Author: Eilidh McAdam <eilidh.mca...@itomig.de> Date: Wed Mar 25 15:25:56 2015 +0000 tdf#60060: unit test for docx section protection export Change-Id: I307466e7336bcf767ebb1ac3bb330cfb2130f84c Reviewed-on: https://gerrit.libreoffice.org/15003 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/sw/qa/extras/ooxmlexport/data/sectionprot.odt b/sw/qa/extras/ooxmlexport/data/sectionprot.odt new file mode 100644 index 0000000..5a98a0b Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/sectionprot.odt differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index dd3e7cf..e2a21b5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -741,6 +741,21 @@ DECLARE_OOXMLEXPORT_TEST(testTdf89774, "tdf89774.fodt") assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:TotalTime", "1"); } +DECLARE_OOXMLEXPORT_TEST(testSectionProtection, "sectionprot.odt") +{ + if (xmlDocPtr pXmlDoc = parseExport("word/document.xml")) + { + assertXPath(pXmlDoc, "//w:formProt[1]", "val", "true"); + assertXPath(pXmlDoc, "//w:formProt[2]", "val", "false"); + } + + if (xmlDocPtr pXmlSettings = parseExport("word/settings.xml")) + { + assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "enforcement", "true"); + assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "edit", "forms"); + } +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits