diff options
author | Eike Rathke <erack@redhat.com> | 2013-05-17 14:04:34 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-05-17 14:13:36 +0200 |
commit | cd9d1bdf5e3351c929d5b651c009ee17b4d962c4 (patch) | |
tree | 6f7dacb40a5c24f736ce1a3765ce0db791a88b35 /sc | |
parent | 5573ee341b1fc38d26fcfabffbfb23eb3cadea68 (diff) |
resolved fdo#63805 max day of month of the intended month
Since 6619955e72c1c2f29a32e82478d19147c0d7610a Date::GetDaysInMonth()
operates on the normalized value that corresponds to the actual values
set at the Date instance, obtain and set number of days for the intended
month instead of using the rolled-over date.
Change-Id: Ia6b007675104f8e134b278f216c3bb48b72f061c
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/table4.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index d63971e779df..df6f52cb502b 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -1252,8 +1252,7 @@ void ScTable::IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillD { aDate.SetMonth((sal_uInt16) nMonth); aDate.SetYear((sal_uInt16) nYear); - if ( nDayOfMonth > 28 ) - aDate.SetDay( std::min( aDate.GetDaysInMonth(), nDayOfMonth ) ); + aDate.SetDay( std::min( Date::GetDaysInMonth( nMonth, nYear), nDayOfMonth ) ); } } break; |