diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-03-17 08:36:26 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-04-18 21:34:46 +0200 |
commit | 9830fd36dbdb72c79703b0c61efc027fba793c5a (patch) | |
tree | 2e9d698e6ca109dc6627adb5c84aa2b635bcfe92 /sfx2/source/doc/SfxDocumentMetaData.cxx | |
parent | 5aaaf0694b6e3213685563fc3bc90d19b10f5c75 (diff) |
date/time IDL datatypes incompatible change
- nanosecond precision
- signed (allowed negative) year
Also: assorted improvements / bugfixes in date/time handling code.
Some factorisation of copy/pasted code.
Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
Diffstat (limited to 'sfx2/source/doc/SfxDocumentMetaData.cxx')
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index e4a03d0be849..d83b1950dc7d 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -412,7 +412,7 @@ bool operator== (const css::util::DateTime &i_rLeft, && i_rLeft.Hours == i_rRight.Hours && i_rLeft.Minutes == i_rRight.Minutes && i_rLeft.Seconds == i_rRight.Seconds - && i_rLeft.HundredthSeconds == i_rRight.HundredthSeconds; + && i_rLeft.NanoSeconds == i_rRight.NanoSeconds; } // NB: keep these two arrays in sync! @@ -633,7 +633,7 @@ OUString SAL_CALL durationToText(sal_Int32 i_value) throw () ud.Hours = static_cast<sal_Int16>((i_value % (24 * 3600)) / 3600); ud.Minutes = static_cast<sal_Int16>((i_value % 3600) / 60); ud.Seconds = static_cast<sal_Int16>(i_value % 60); - ud.MilliSeconds = 0; + ud.NanoSeconds = 0; return durationToText(ud); } @@ -967,7 +967,7 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet) ud.Hours = ut.Hours; ud.Minutes = ut.Minutes; ud.Seconds = ut.Seconds; - ud.MilliSeconds = 10 * ut.HundredthSeconds; + ud.NanoSeconds = ut.NanoSeconds; values.push_back(durationToText(ud)); as.push_back(std::make_pair(vt, OUString("time"))); @@ -1837,7 +1837,7 @@ SfxDocumentMetaData::resetUserData(const OUString & the_value) bool bModified( false ); bModified |= setMetaText("meta:initial-creator", the_value); ::DateTime now( ::DateTime::SYSTEM ); - css::util::DateTime uDT(now.Get100Sec(), now.GetSec(), now.GetMin(), + css::util::DateTime uDT(now.GetNanoSec(), now.GetSec(), now.GetMin(), now.GetHour(), now.GetDay(), now.GetMonth(), now.GetYear()); bModified |= setMetaText("meta:creation-date", dateTimeToText(uDT)); bModified |= setMetaText("dc:creator", OUString()); |