diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2009-10-21 13:32:17 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2009-10-21 13:32:17 +0000 |
commit | c10000ca290e88df57f35abded93be279dd20027 (patch) | |
tree | fe0fda04889fa425c1ec63e9cf89f0e545517d66 /i18npool | |
parent | d7851c0ddb30a34a7481e4af2c0510fc76f98d27 (diff) |
CWS-TOOLING: integrate CWS calc32stopper3
2009-10-12 14:26:09 +0200 er r276833 : disable dump again
2009-10-12 13:46:57 +0200 er r276832 : #i102294# setValue: yet another DST glitch
2009-10-12 13:21:48 +0200 iha r276828 : #i105767# Y axis vanishes in case of zero rotated axis title
2009-10-08 01:49:20 +0200 er r276772 : NextSymbol: actually do reset ODF reference detection on file/sheet separator
2009-10-08 00:18:58 +0200 er r276771 : #i101639# use TabIDs in cached RangeArrays, not RefData Tabs
2009-10-07 19:25:47 +0200 er r276767 : #i105200# UpdateBroadcastAreas: hash key changes, remove area from all slots and reinsert
2009-10-05 17:20:44 +0200 er r276690 : #i105365# SI prefixes for ang, ang3, m/h, m/hr
2009-10-05 16:21:29 +0200 er r276686 : #i105161 intersection has higher precedence than union
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/calendar/calendar_gregorian.cxx | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 50b61eae5cf1..e52cd4938f2a 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -531,8 +531,8 @@ void Calendar_gregorian::setValue() throw(RuntimeException) bool bNeedZone = !(fieldSet & (1 << CalendarFieldIndex::ZONE_OFFSET)); bool bNeedDST = !(fieldSet & (1 << CalendarFieldIndex::DST_OFFSET)); - sal_Int32 nZone1, nDST1, nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone, nDST; - nZone1 = nDST1 = nZone = nDST = 0; + sal_Int32 nZone1, nDST1, nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone0, nDST0; + nZone1 = nDST1 = nZone0 = nDST0 = 0; nYear = nMonth = nDay = nHour = nMinute = nSecond = nMilliSecond = -1; if ( bNeedZone || bNeedDST ) { @@ -581,19 +581,19 @@ void Calendar_gregorian::setValue() throw(RuntimeException) } if ( !(fieldSet & (1 << CalendarFieldIndex::ZONE_OFFSET)) ) { - nZone = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR); + nZone0 = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR); if ( !U_SUCCESS(status) ) - nZone = 0; + nZone0 = 0; } if ( !(fieldSet & (1 << CalendarFieldIndex::DST_OFFSET)) ) { - nDST = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR); + nDST0 = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR); if ( !U_SUCCESS(status) ) - nDST = 0; + nDST0 = 0; } // Submit values to obtain a time zone and DST corresponding to the date/time. - submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone, nDST); + submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone0, nDST0); DUMP_ICU_CAL_MSG(("%s\n","setValue() in bNeedZone||bNeedDST after submitValues()")); DUMP_I18N_CAL_MSG(("%s\n","setValue() in bNeedZone||bNeedDST after submitValues()")); @@ -605,7 +605,8 @@ void Calendar_gregorian::setValue() throw(RuntimeException) nDST1 = 0; } - // The original submission, may lead to a different zone/DST. + // The original submission, may lead to a different zone/DST and + // different date. submitFields(); DUMP_ICU_CAL_MSG(("%s\n","setValue() after original submission")); DUMP_I18N_CAL_MSG(("%s\n","setValue() after original submission")); @@ -619,7 +620,7 @@ void Calendar_gregorian::setValue() throw(RuntimeException) sal_Int32 nDST2 = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR); if ( !U_SUCCESS(status) ) nDST2 = nDST1; - if ( nZone2 != nZone1 || nDST2 != nDST1 ) + if ( nZone0 != nZone1 || nZone2 != nZone1 || nDST0 != nDST1 || nDST2 != nDST1 ) { // Due to different DSTs, resulting date values may differ if // DST is onset at 00:00 and the very onsetRule date was @@ -627,6 +628,12 @@ void Calendar_gregorian::setValue() throw(RuntimeException) // is not what we want. // Resubmit all values, this time including DST => date 01:00 // Similar for zone differences. + // If already the first full submission with nZone0 and nDST0 + // lead to date-1 23:00, the original submission was based on + // that date if it wasn't a full date (nDST0 set, nDST1 not + // set, nDST2==nDST1). If it was January 1st without year we're + // even off by one year now. Resubmit all values including new + // DST => date 00:00. // Set field values accordingly in case they were used. if (!bNeedZone) |