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 /oox/source/dump | |
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 'oox/source/dump')
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index dfa19ba4c013..867a66f1f4e3 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -2285,11 +2285,11 @@ util::DateTime InputObjectBase::dumpFileTime( const String& rName ) } // the day aDateTime.Day = static_cast< sal_uInt16 >( nDaysInYear + 1 ); - // number of 1/100 seconds in the day - sal_Int64 nTimeInDay = nFileTime % sal_Int64( 360000 * 24 ); - // 1/100 seconds - aDateTime.HundredthSeconds = static_cast< sal_uInt16 >( nTimeInDay % 100 ); - nTimeInDay /= 100; + // number of nanoseconds in the day + sal_Int64 nTimeInDay = nFileTime % sal_Int64( 86400000000000 ); + // nanoseconds + aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % 1000000000 ); + nTimeInDay /= 1000000000; // seconds aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % 60 ); nTimeInDay /= 60; |