diff options
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 2ac992a20930..9acae7b1ec0d 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3714,16 +3714,22 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape > if (xCurrentShape.get()!=xShape.get()) return; + bool bRemovePersonalInfo = SvtSecurityOptions::IsOptionSet( + SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo) && !SvtSecurityOptions::IsOptionSet( + SvtSecurityOptions::EOption::DocWarnKeepNoteAuthorDateInfo); + const OUString& sAuthor(pNote->GetAuthor()); if (!sAuthor.isEmpty()) { SvXMLElementExport aCreatorElem( *this, XML_NAMESPACE_DC, XML_CREATOR, true, false ); - Characters(sAuthor); + Characters( bRemovePersonalInfo + ? "Author" + OUString::number(SvXMLExport::GetInfoID(sAuthor)) + : sAuthor ); } - const OUString& aDate(pNote->GetDate()); + const OUString& aDate(bRemovePersonalInfo ? OUString("1970-01-01") : pNote->GetDate()); // Epoch time if (pDoc) { SvNumberFormatter* pNumForm = pDoc->GetFormatTable(); |