diff options
author | László Németh <nemeth@numbertext.org> | 2021-06-14 20:46:17 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-06-17 10:43:08 +0200 |
commit | 12da70f88517bf3c053afe1c504bb70bd27573f2 (patch) | |
tree | 27097e4bb9cc343ece830f77991b5d5220ea2ff3 /include/xmloff | |
parent | svx: pragma once for some SdrObject subclasses (diff) | |
download | core-12da70f88517bf3c053afe1c504bb70bd27573f2.tar.gz core-12da70f88517bf3c053afe1c504bb70bd27573f2.zip |
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>
Diffstat (limited to 'include/xmloff')
-rw-r--r-- | include/xmloff/xmlexp.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index adba9e653077..5b72788313ef 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -43,6 +43,7 @@ #include <com/sun/star/container/XNamed.hpp> #include <unotools/saveopt.hxx> +#include <unotools/securityoptions.hxx> #include <xmloff/XMLPageExport.hxx> #include <comphelper/servicehelper.hxx> @@ -69,6 +70,7 @@ namespace com::sun::star::xml::sax { class XExtendedDocumentHandler; } namespace com::sun::star::xml::sax { class XLocator; } class SvXMLNamespaceMap; +class SvtSecurityMapPersonalInfo; class SvXMLExport_Impl; class ProgressBarHelper; class XMLEventExport; @@ -135,6 +137,7 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public cppu::WeakImplHelper< OUString msFilterName; OUString msImgFilterName; std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap; // the namespace map + std::unique_ptr<SvtSecurityMapPersonalInfo> mpAuthorIDs; // map authors to remove personal info SvXMLUnitConverter maUnitConv; // the unit converter std::unique_ptr<SvXMLNumFmtExport> mpNumExport; std::unique_ptr<ProgressBarHelper> mpProgressBarHelper; @@ -390,6 +393,9 @@ public: // Get (const) namespace map. const SvXMLNamespaceMap& GetNamespaceMap() const { return *mpNamespaceMap; } + // Get author id to remove personal info + size_t GetInfoID( const OUString sPersonalInfo ) const { return mpAuthorIDs->GetInfoID(sPersonalInfo); } + // Get unit converter const SvXMLUnitConverter& GetMM100UnitConverter() const { return maUnitConv; } |