diff options
author | László Németh <nemeth@numbertext.org> | 2021-06-14 20:46:17 +0200 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2021-06-17 19:46:23 +0200 |
commit | 658e947b699ad1e08810f0fefd5c901e750ad919 (patch) | |
tree | 315162f52e43340cf06e1cd7d6cf5dc5d75ed370 /unotools | |
parent | 585f89d031d4ffd19fca70a5c6152c10cc46bc4d (diff) |
tdf#90401 xmloff: 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 (1970-01-01T00:00:00) for mandatory
time stamps, and replace authors 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_tdf90401_remove_personal_info" SAL_USE_VCLPLUGIN=gen)
Change-Id: I3b4d710dbeeee12177aff378597cd2b683ca6c25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117319
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 12da70f88517bf3c053afe1c504bb70bd27573f2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117301
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/securityoptions.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 7acb0ff2d3c0..ff10bcb584b9 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -933,4 +933,18 @@ Mutex& SvtSecurityOptions::GetInitMutex() return theSecurityOptionsMutex::get(); } +// map personal info strings to 1, 2, ... to remove personal info +size_t SvtSecurityMapPersonalInfo::GetInfoID( const OUString sPersonalInfo ) +{ + SvtSecurityMapPersonalInfoType::iterator aIter = aInfoIDs.find( sPersonalInfo ); + if ( aIter == aInfoIDs.end() ) + { + size_t nNewID = aInfoIDs.size() + 1; + aInfoIDs[sPersonalInfo] = nNewID; + return nNewID; + } + + return aIter->second; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |