Kaydet (Commit) 8db392f1 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

API change: oslDateTime signed year

Change-Id: Ic4f1e424b130fd2ccca379adbe0a66836b6cac41
üst e436c491
......@@ -92,7 +92,7 @@ typedef struct _oslDateTime
/*----------------------------------------------------------------------*/
/** is the year.
*/
sal_uInt16 Year;
sal_Int16 Year;
} oslDateTime;
......
......@@ -98,7 +98,7 @@ util::DateTime OOXMLDocPropHandler::GetDateTimeFromW3CDTF( const OUString& aChar
sal_Int32 nLen = aChars.getLength();
if ( nLen >= 4 )
{
aOslDTime.Year = (sal_uInt16)aChars.copy( 0, 4 ).toInt32();
aOslDTime.Year = (sal_Int16)aChars.copy( 0, 4 ).toInt32();
if ( nLen >= 7 && aChars.getStr()[4] == (sal_Unicode)'-' )
{
......
......@@ -143,10 +143,7 @@ sal_Bool SAL_CALL osl_getTimeValueFromDateTime( oslDateTime* pDateTime, TimeValu
else
return sal_False;
if ( pDateTime->Year >= 1900 )
aTime.tm_year = pDateTime->Year - 1900;
else
return sal_False;
aTime.tm_year = pDateTime->Year - 1900;
aTime.tm_isdst = -1;
aTime.tm_wday = 0;
......
......@@ -89,7 +89,7 @@ bool DateTimeHelper::ISO8601_To_DateTime (const OUString& s,
aDateTime.Day = sal::static_int_cast< sal_uInt16 >(day); // 1-31
aDateTime.DayOfWeek = 0; // 0-6, 0 = Sunday
aDateTime.Month = sal::static_int_cast< sal_uInt16 >(month); // 1-12
aDateTime.Year = sal::static_int_cast< sal_uInt16 >(year);
aDateTime.Year = sal::static_int_cast< sal_Int16 >(year);
TimeValue aTimeValue;
if ( osl_getTimeValueFromDateTime( &aDateTime, &aTimeValue ) )
......@@ -206,7 +206,7 @@ bool DateTimeHelper::RFC2068_To_DateTime (const OUString& s,
aDateTime.DayOfWeek = 0; //dayofweek; // 0-6, 0 = Sunday
aDateTime.Month = sal::static_int_cast< sal_uInt16 >(month);
// 1-12
aDateTime.Year = sal::static_int_cast< sal_uInt16 >(year);
aDateTime.Year = sal::static_int_cast< sal_Int16 >(year);
TimeValue aTimeValue;
if ( osl_getTimeValueFromDateTime( &aDateTime,
......
......@@ -79,7 +79,7 @@ bool DateTimeHelper::ISO8601_To_DateTime (const OUString& s,
aDateTime.Day = sal::static_int_cast< sal_uInt16 >(day); // 1-31
aDateTime.DayOfWeek = 0; // 0-6, 0 = Sunday
aDateTime.Month = sal::static_int_cast< sal_uInt16 >(month); // 1-12
aDateTime.Year = sal::static_int_cast< sal_uInt16 >(year);
aDateTime.Year = sal::static_int_cast< sal_Int16 >(year);
TimeValue aTimeValue;
if ( osl_getTimeValueFromDateTime( &aDateTime, &aTimeValue ) )
......@@ -218,7 +218,7 @@ bool DateTimeHelper::RFC2068_To_DateTime (const OUString& s,
aDateTime.DayOfWeek = 0; //dayofweek; // 0-6, 0 = Sunday
aDateTime.Month = sal::static_int_cast< sal_uInt16 >(month);
// 1-12
aDateTime.Year = sal::static_int_cast< sal_uInt16 >(year);
aDateTime.Year = sal::static_int_cast< sal_Int16 >(year);
TimeValue aTimeValue;
if ( osl_getTimeValueFromDateTime( &aDateTime,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment