summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-07-05 12:11:42 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-07-05 12:22:03 +0200
commit8db392f1be4d6dac0da0fb35b5735e7c27c346cc (patch)
tree5f83b94ce7679fb60e964c46eff2f6edae06df7c
parente436c491887636aee32a019ea3ecc26c63ecd899 (diff)
API change: oslDateTime signed year
Change-Id: Ic4f1e424b130fd2ccca379adbe0a66836b6cac41
-rw-r--r--include/osl/time.h2
-rw-r--r--oox/source/docprop/docprophandler.cxx2
-rw-r--r--sal/osl/unx/time.c5
-rw-r--r--ucb/source/ucp/webdav-neon/DateTimeHelper.cxx4
-rw-r--r--ucb/source/ucp/webdav/DateTimeHelper.cxx4
5 files changed, 7 insertions, 10 deletions
diff --git a/include/osl/time.h b/include/osl/time.h
index 4be9e7278419..6bb48f2d4bce 100644
--- a/include/osl/time.h
+++ b/include/osl/time.h
@@ -92,7 +92,7 @@ typedef struct _oslDateTime
/*----------------------------------------------------------------------*/
/** is the year.
*/
- sal_uInt16 Year;
+ sal_Int16 Year;
} oslDateTime;
diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx
index 92a7d49956c6..467151dc2c16 100644
--- a/oox/source/docprop/docprophandler.cxx
+++ b/oox/source/docprop/docprophandler.cxx
@@ -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)'-' )
{
diff --git a/sal/osl/unx/time.c b/sal/osl/unx/time.c
index b71dd7d6f875..d038f46204a3 100644
--- a/sal/osl/unx/time.c
+++ b/sal/osl/unx/time.c
@@ -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;
diff --git a/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx b/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
index 4bf2ea8f0291..ce99c2db4dea 100644
--- a/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
+++ b/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
@@ -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,
diff --git a/ucb/source/ucp/webdav/DateTimeHelper.cxx b/ucb/source/ucp/webdav/DateTimeHelper.cxx
index c4ccbcaa2712..7ca9a3d7a61f 100644
--- a/ucb/source/ucp/webdav/DateTimeHelper.cxx
+++ b/ucb/source/ucp/webdav/DateTimeHelper.cxx
@@ -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,