summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx8
-rw-r--r--xmloff/source/text/XMLRedlineExport.cxx18
2 files changed, 14 insertions, 12 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() );
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index fad527a77b59..aa457bf2ad98 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -43,6 +43,8 @@
#include <xmloff/xmlexp.hxx>
#include <xmloff/xmluconv.hxx>
#include <unotools/securityoptions.hxx>
+#include <tools/date.hxx>
+#include <tools/datetime.hxx>
using namespace ::com::sun::star;
@@ -459,13 +461,13 @@ void XMLRedlineExport::ExportChangeInfo(
aAny >>= aDateTime;
{
OUStringBuffer sBuf;
- ::sax::Converter::convertDateTime(sBuf, aDateTime, nullptr);
+ ::sax::Converter::convertDateTime(sBuf, bRemovePersonalInfo
+ ? util::DateTime(0, 0, 0, 0, 1, 1, 1970, true) // Epoch time
+ : aDateTime, nullptr);
SvXMLElementExport aDateElem( rExport, XML_NAMESPACE_DC,
XML_DATE, true,
false );
- rExport.Characters(bRemovePersonalInfo
- ? "1970-01-01T00:00:00"
- : sBuf.makeStringAndClear());
+ rExport.Characters(sBuf.makeStringAndClear());
}
// comment as <text:p> sequence
@@ -504,10 +506,10 @@ void XMLRedlineExport::ExportChangeInfo(
util::DateTime aDateTime;
rVal.Value >>= aDateTime;
OUStringBuffer sBuf;
- ::sax::Converter::convertDateTime(sBuf, aDateTime, nullptr);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_DATE_TIME, bRemovePersonalInfo
- ? "1970-01-01T00:00:00"
- : sBuf.makeStringAndClear());
+ ::sax::Converter::convertDateTime(sBuf, bRemovePersonalInfo
+ ? util::DateTime(0, 0, 0, 0, 1, 1, 1970, true) // Epoch time
+ : aDateTime, nullptr);
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_DATE_TIME, sBuf.makeStringAndClear());
}
else if( rVal.Name == "RedlineType" )
{