diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-06-06 21:52:48 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-06-06 21:55:06 +0200 |
commit | f7d51f43deda5e28df63f1b8e168e84838d0d0b4 (patch) | |
tree | 4741929dfee04031a3c986b6f1204d92c6aa8c45 /sfx2 | |
parent | c2034f3993ab0e6f4550f3059b3229bc319b6b56 (diff) |
html export: More standard time specification in <meta/>.
Change-Id: I1a62d12531029cc36fb8aeabecb9d92a8af837f7
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/bastyp/frmhtmlw.cxx | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index 93567e2176a1..5d4f1ad7bc82 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -44,9 +44,7 @@ #include <rtl/bootstrap.hxx> #include <rtl/strbuf.hxx> - - - +#include <sax/tools/converter.hxx> using namespace ::com::sun::star; @@ -164,12 +162,10 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL, // created ::util::DateTime uDT = i_xDocProps->getCreationDate(); - Date aD(uDT.Day, uDT.Month, uDT.Year); - Time aT(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds); - OUString sOut = OUString::number(aD.GetDate()); - sOut += ";"; - sOut += OUString::number(aT.GetTime()); - OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, sOut, false, + OUStringBuffer aBuffer; + ::sax::Converter::convertTimeOrDateTime(aBuffer, uDT, 0); + + OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_created, aBuffer.makeStringAndClear(), false, eDestEnc, pNonConvertableChars ); // changedby @@ -180,12 +176,9 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL, // changed uDT = i_xDocProps->getModificationDate(); - Date aD2(uDT.Day, uDT.Month, uDT.Year); - Time aT2(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds); - sOut = OUString::number(aD2.GetDate()); - sOut += ";"; - sOut += OUString::number(aT2.GetTime()); - OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, sOut, false, + ::sax::Converter::convertTimeOrDateTime(aBuffer, uDT, 0); + + OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changed, aBuffer.makeStringAndClear(), false, eDestEnc, pNonConvertableChars ); // Subject |