summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2017-09-29 18:01:54 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-10-06 08:06:59 +0200
commit2694162969cf86ef366d3ce812fccd0630acc800 (patch)
treed138fe58a69d5c048f31e5a571b52b86a36db558 /sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
parentb567cfb980435df131d776915bce9152135bdf0f (diff)
tdf#66398 Import/export docx document protection properties
Added: + import/export of all doc protection properties + unit test Change-Id: I7b65cf4f5c7add2a96fef407c243081fcc2b6d8d Reviewed-on: https://gerrit.libreoffice.org/43156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport5.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 96868a3b6f66..418b0dc64019 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -945,6 +945,22 @@ DECLARE_OOXMLEXPORT_TEST(testSectionProtection, "sectionprot.odt")
}
}
+DECLARE_OOXMLEXPORT_TEST(tdf66398_permissions, "tdf66398_permissions.docx")
+{
+ if (xmlDocPtr pXmlSettings = parseExport("word/settings.xml"))
+ {
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "edit", "readOnly");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "enforcement", "1");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "cryptProviderType", "rsaAES");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "cryptAlgorithmClass","hash");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "cryptAlgorithmType", "typeAny");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "cryptAlgorithmSid", "14");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "cryptSpinCount", "100000");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "hash", "A0/Xy6KcXljJlZjP0TwJMPJuW2rc46UwXqn2ctxckc2nCECE5i89M85z2Noh3ZEA5NBQ9RJ5ycxiUH6nzmJaKw==");
+ assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "salt", "B8k6wb1pkjUs4Nv/8QBk/w==");
+ }
+}
+
DECLARE_OOXMLEXPORT_TEST(testSectionHeader, "sectionprot.odt")
{
if (xmlDocPtr pXmlDoc = parseExport("word/document.xml"))