[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/osl sal/osl sdext/source

Lionel Elie Mamane lionel at mamane.lu
Mon Jul 8 01:56:22 PDT 2013


 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(-)

New commits:
commit 5456cddf0ae6ca16c107834216371898764147f8
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Jul 5 12:13:36 2013 +0200

    API change: osl/time.h take const pointers where appropriate
    
    Should be backwards-compatible...
    
    Change-Id: I6b04bec2c032ff8c57a1b5192b2d3962dcc96c84
    Reviewed-on: https://gerrit.libreoffice.org/4736
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/include/osl/time.h b/include/osl/time.h
index 4be9e72..297cc95 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 c99036b..971a63a 100644
--- a/sal/osl/unx/time.c
+++ b/sal/osl/unx/time.c
@@ -70,7 +70,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;
@@ -104,7 +104,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;
@@ -174,7 +174,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;
@@ -211,7 +211,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 49f33c2..e0f89ce 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 ce5c61f..e5d7efe 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<oslDateTime*>(&rCurrentTime), &aCurrentTimeValue))
+    if (osl_getTimeValueFromDateTime(&rCurrentTime, &aCurrentTimeValue))
     {
         if (maStartTimeValue.Seconds==0 && maStartTimeValue.Nanosec==0)
         {


More information about the Libreoffice-commits mailing list