From fa6ce5a6e8c35430977857477fc09f6a03698e63 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Fri, 5 Jul 2013 12:13:36 +0200 Subject: API change: osl/time.h take const pointers where appropriate Should be backwards-compatible... Change-Id: I6b04bec2c032ff8c57a1b5192b2d3962dcc96c84 --- include/osl/time.h | 8 ++++---- sal/osl/unx/time.c | 8 ++++---- sal/osl/w32/time.c | 8 ++++---- sdext/source/presenter/PresenterToolBar.cxx | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/osl/time.h b/include/osl/time.h index 6bb48f2d4bce..484adb0e70c6 100644 --- a/include/osl/time.h +++ b/include/osl/time.h @@ -111,7 +111,7 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getSystemTime( @return sal_False if any error occurs else sal_True. */ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( - TimeValue* pTimeVal, oslDateTime* pDateTime ); + const TimeValue* pTimeVal, oslDateTime* pDateTime ); /** Get the GMT from a oslDateTime and fill a TimeValue @@ -121,7 +121,7 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( @return sal_False if any error occurs else sal_True. */ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getTimeValueFromDateTime( - oslDateTime* pDateTime, TimeValue* pTimeVal ); + const oslDateTime* pDateTime, TimeValue* pTimeVal ); /** Convert GMT to local time @@ -131,7 +131,7 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getTimeValueFromDateTime( @return sal_False if any error occurs else sal_True. */ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( - TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal ); + const TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal ); /** Convert local time to GMT @@ -141,7 +141,7 @@ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( @return sal_False if any error occurs else sal_True. */ SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( - TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal ); + const TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal ); /** Get the value of the global timer diff --git a/sal/osl/unx/time.c b/sal/osl/unx/time.c index d038f46204a3..24947b15e40b 100644 --- a/sal/osl/unx/time.c +++ b/sal/osl/unx/time.c @@ -92,7 +92,7 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* tv) * osl_getDateTimeFromTimeValue *-------------------------------------------------*/ -sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( TimeValue* pTimeVal, oslDateTime* pDateTime ) +sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( const TimeValue* pTimeVal, oslDateTime* pDateTime ) { struct tm *pSystemTime; struct tm tmBuf; @@ -126,7 +126,7 @@ sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( TimeValue* pTimeVal, oslDateTime * osl_getTimeValueFromDateTime *--------------------------------------------------*/ -sal_Bool SAL_CALL osl_getTimeValueFromDateTime( oslDateTime* pDateTime, TimeValue* pTimeVal ) +sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, TimeValue* pTimeVal ) { struct tm aTime; time_t nSeconds; @@ -193,7 +193,7 @@ sal_Bool SAL_CALL osl_getTimeValueFromDateTime( oslDateTime* pDateTime, TimeValu * osl_getLocalTimeFromSystemTime *--------------------------------------------------*/ -sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal ) +sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( const TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal ) { struct tm *pLocalTime; struct tm tmBuf; @@ -230,7 +230,7 @@ sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( TimeValue* pSystemTimeVal, Tim * osl_getSystemTimeFromLocalTime *--------------------------------------------------*/ -sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal ) +sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( const TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal ) { struct tm *pLocalTime; struct tm tmBuf; diff --git a/sal/osl/w32/time.c b/sal/osl/w32/time.c index fc8855b53680..52fe8ac09b87 100644 --- a/sal/osl/w32/time.c +++ b/sal/osl/w32/time.c @@ -65,7 +65,7 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal) // osl_getDateTimeFromTimeValue //-------------------------------------------------- -sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( TimeValue* pTimeVal, oslDateTime* pDateTime ) +sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( const TimeValue* pTimeVal, oslDateTime* pDateTime ) { FILETIME aFileTime; SYSTEMTIME aSystemTime; @@ -95,7 +95,7 @@ sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( TimeValue* pTimeVal, oslDateTime // osl_getTimeValueFromDateTime //-------------------------------------------------- -sal_Bool SAL_CALL osl_getTimeValueFromDateTime( oslDateTime* pDateTime, TimeValue* pTimeVal ) +sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, TimeValue* pTimeVal ) { FILETIME aFileTime; SYSTEMTIME aSystemTime; @@ -126,7 +126,7 @@ sal_Bool SAL_CALL osl_getTimeValueFromDateTime( oslDateTime* pDateTime, TimeValu // osl_getLocalTimeFromSystemTime //-------------------------------------------------- -sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal ) +sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( const TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal ) { TIME_ZONE_INFORMATION aTimeZoneInformation; DWORD Success; @@ -157,7 +157,7 @@ sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( TimeValue* pSystemTimeVal, Tim // osl_getSystemTimeFromLocalTime //-------------------------------------------------- -sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal ) +sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( const TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal ) { TIME_ZONE_INFORMATION aTimeZoneInformation; DWORD Success; diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index ce5c61f41ac6..e5d7efe98c37 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -1928,7 +1928,7 @@ PresentationTimeLabel::PresentationTimeLabel ( void PresentationTimeLabel::TimeHasChanged (const oslDateTime& rCurrentTime) { TimeValue aCurrentTimeValue; - if (osl_getTimeValueFromDateTime(const_cast(&rCurrentTime), &aCurrentTimeValue)) + if (osl_getTimeValueFromDateTime(&rCurrentTime, &aCurrentTimeValue)) { if (maStartTimeValue.Seconds==0 && maStartTimeValue.Nanosec==0) { -- cgit