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 /sc/source/filter/oox/unitconverter.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 'sc/source/filter/oox/unitconverter.cxx')
-rw-r--r-- | sc/source/filter/oox/unitconverter.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/oox/unitconverter.cxx b/sc/source/filter/oox/unitconverter.cxx index 632103b05135..20d9c487258c 100644 --- a/sc/source/filter/oox/unitconverter.cxx +++ b/sc/source/filter/oox/unitconverter.cxx @@ -58,10 +58,10 @@ inline sal_Int32 lclIsLeapYear( sal_Int32 nYear ) return ((nYear % 4) == 0) && (((nYear % 100) != 0) || ((nYear % 400) == 0)); } -void lclSkipYearBlock( sal_Int32& ornDays, sal_uInt16& ornYear, sal_Int32 nDaysInBlock, sal_Int32 nYearsPerBlock, sal_Int32 nMaxBlocks ) +void lclSkipYearBlock( sal_Int32& ornDays, sal_Int16& ornYear, sal_Int32 nDaysInBlock, sal_Int32 nYearsPerBlock, sal_Int32 nMaxBlocks ) { sal_Int32 nBlocks = ::std::min< sal_Int32 >( ornDays / nDaysInBlock, nMaxBlocks ); - ornYear = static_cast< sal_uInt16 >( ornYear + nYearsPerBlock * nBlocks ); + ornYear = static_cast< sal_Int16 >( ornYear + nYearsPerBlock * nBlocks ); ornDays -= nBlocks * nDaysInBlock; } |