diff options
author | László Németh <nemeth@numbertext.org> | 2021-06-18 13:03:17 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-07-03 12:54:39 +0200 |
commit | ded2452a52d21131347a0dc2e25c8161f20fcfad (patch) | |
tree | ab5aa76d91aaffdb0de9e302e8789c91e44f4783 /xmloff/source/draw | |
parent | 56ae948b08010ed1b61be9857c8c6ae4e97e86b2 (diff) |
tdf#142902 DOCX export: remove personal info of comments and changes
If Options → LibreOffice → Security → Security Options
and Warnings → Options... → Security Options → Remove personal
information on saving" is enabled.
Use the same time (Unix epoch) for mandatory time stamps, and
replace authors with "Author1", "Author2", ... and creator-initials
with "1", "2", "3" etc., also to avoid of joining adjacent redline
ranges.
Note: to see the work of the unit test in Linux command line:
(cd sw && make UITest_writer_tests7 UITEST_TEST_NAME="tdf90401.tdf90401.test_tdf142902_remove_personal_info_in_DOCX" SAL_USE_VCLPLUGIN=gen)
Follow-up to commit 12da70f88517bf3c053afe1c504bb70bd27573f2
"tdf#90401 xmloff: remove personal info of comments and changes".
Change-Id: Ice996f171f5d82d13ce0ea2e4833696af0aab90c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117444
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index db1542fc511f..cdc6a70e31dd 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2580,12 +2580,12 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage ) { // date time - css::util::DateTime aDate( xAnnotation->getDateTime() ); + css::util::DateTime aDate( bRemovePersonalInfo + ? css::util::DateTime(0, 0, 0, 0, 1, 1, 1970, true) // Epoch time + : xAnnotation->getDateTime() ); ::sax::Converter::convertDateTime(sStringBuffer, aDate, nullptr, true); SvXMLElementExport aDateElem( *this, XML_NAMESPACE_DC, XML_DATE, true, false ); - Characters( bRemovePersonalInfo - ? "1970-01-01T00:00::00" - : sStringBuffer.makeStringAndClear() ); + Characters( sStringBuffer.makeStringAndClear() ); } css::uno::Reference < css::text::XText > xText( xAnnotation->getTextRange() ); |