diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2024-06-27 09:23:08 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2024-06-27 13:49:05 +0200 |
commit | 0acac1a2741d47b98ae600800e2db0e7a5fb3efe (patch) | |
tree | dbbaefd2976f798b282ba94f49a9f49ae02468a5 /sc/qa/unit | |
parent | 9d0d9d8aa0ba4bb465e376621b426fb9ff00507e (diff) |
xlsx: Don't export notes author when in privacy mode
Change-Id: Id0b3f0aca7bd4e21f41c2a8307964423debcf5bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169616
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/data/xlsx/cell-note.xlsx | bin | 0 -> 7083 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export_test4.cxx | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/cell-note.xlsx b/sc/qa/unit/data/xlsx/cell-note.xlsx Binary files differnew file mode 100644 index 000000000000..9df212a2970f --- /dev/null +++ b/sc/qa/unit/data/xlsx/cell-note.xlsx diff --git a/sc/qa/unit/subsequent_export_test4.cxx b/sc/qa/unit/subsequent_export_test4.cxx index a6e5802cf98f..fbf31673ada3 100644 --- a/sc/qa/unit/subsequent_export_test4.cxx +++ b/sc/qa/unit/subsequent_export_test4.cxx @@ -1917,6 +1917,26 @@ CPPUNIT_TEST_FIXTURE(ScExportTest4, testChangesAuthorDateXLSX) pBatch->commit(); } +CPPUNIT_TEST_FIXTURE(ScExportTest4, testNotesAuthor) +{ + createScDoc("xlsx/cell-note.xlsx"); + + auto pBatch(comphelper::ConfigurationChanges::create()); + // Remove all personal info + officecfg::Office::Common::Security::Scripting::RemovePersonalInfoOnSaving::set(true, pBatch); + pBatch->commit(); + + save(u"Calc Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"xl/comments1.xml"_ustr); + CPPUNIT_ASSERT(pXmlDoc); + + assertXPathContent(pXmlDoc, "/x:comments/x:authors/x:author"_ostr, u"Author1"_ustr); + + // Reset config change + officecfg::Office::Common::Security::Scripting::RemovePersonalInfoOnSaving::set(false, pBatch); + pBatch->commit(); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |