[Libreoffice-commits] core.git: 2 commits - connectivity/source sc/source

Lionel Elie Mamane lionel at mamane.lu
Thu Apr 18 22:18:08 PDT 2013


 connectivity/source/drivers/kab/KResultSet.cxx |   20 ++++++++++----------
 sc/source/filter/orcus/interface.cxx           |   12 ++++++------
 2 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 202d45cff25492bb4d7f550df5c368af097d2e0c
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Apr 19 07:14:48 2013 +0200

    date/time IDL datatypes incompatible change: fixup
    
    Change-Id: I3733deac232d0075bdd889ce52d7e6f67746d4f8

diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index e67c915..a32842c 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -224,17 +224,17 @@ void ScOrcusSheet::set_date_time(
     SvNumberFormatter* pFormatter = mrDoc.getDoc().GetFormatTable();
 
     Date aDate(day, month, year);
-    sal_uIntPtr nSec = floor(second);
-    sal_uIntPtr nSec100 = (second - nSec) * 100;
-    Time aTime(hour, minute, nSec, nSec100);
+    sal_uInt32 nSec = floor(second);
+    sal_uInt32 nNanoSec = (second - nSec) * ::Time::nanoSecPerSec;
+    Time aTime(hour, minute, nSec, nNanoSec);
     Date aNullDate(*pFormatter->GetNullDate());
     long nDateDiff = aDate - aNullDate;
 
     double fTime =
-        static_cast<double>(aTime.GetNanoSec()) / 1e9 +
+        static_cast<double>(aTime.GetNanoSec()) / ::Time::nanoSecPerSec +
         aTime.GetSec() +
-        aTime.GetMin() * 60.0 +
-        aTime.GetHour() * 3600.0;
+        aTime.GetMin() * ::Time::secondPerMinute +
+        aTime.GetHour() * ::Time::secondPerHour;
 
     fTime /= DATE_TIME_FACTOR;
 
commit 81cf58f191f57b3cfad08f5c7d622b30f7fc72d9
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Apr 19 07:14:23 2013 +0200

    date/time IDL datatypes incompatible change: fixup
    
    Change-Id: Ib750a009e49e19d63f8b6df85947a7b5c9b75bcf

diff --git a/connectivity/source/drivers/kab/KResultSet.cxx b/connectivity/source/drivers/kab/KResultSet.cxx
index c4eae77..043fce1 100644
--- a/connectivity/source/drivers/kab/KResultSet.cxx
+++ b/connectivity/source/drivers/kab/KResultSet.cxx
@@ -40,7 +40,7 @@ using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
 using namespace com::sun::star::sdbcx;
 using namespace com::sun::star::io;
-using namespace com::sun::star::util;
+namespace cssu = com::sun::star::util;
 
 IMPLEMENT_SERVICE_INFO(KabResultSet, "com.sun.star.sdbc.drivers.KabResultSet", "com.sun.star.sdbc.ResultSet");
 // -------------------------------------------------------------------------
@@ -298,34 +298,34 @@ Sequence< sal_Int8 > SAL_CALL KabResultSet::getBytes(sal_Int32) throw(SQLExcepti
     return Sequence< sal_Int8 >();
 }
 // -------------------------------------------------------------------------
-Date SAL_CALL KabResultSet::getDate(sal_Int32) throw(SQLException, RuntimeException)
+cssu::Date SAL_CALL KabResultSet::getDate(sal_Int32) throw(SQLException, RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(KabResultSet_BASE::rBHelper.bDisposed);
 
 ::dbtools::throwFunctionNotSupportedException("getDate", NULL);
 
-    Date aRet;
+    cssu::Date aRet;
     return aRet;
 }
 // -------------------------------------------------------------------------
-Time SAL_CALL KabResultSet::getTime(sal_Int32) throw(SQLException, RuntimeException)
+cssu::Time SAL_CALL KabResultSet::getTime(sal_Int32) throw(SQLException, RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(KabResultSet_BASE::rBHelper.bDisposed);
 
 ::dbtools::throwFunctionNotSupportedException("getTime", NULL);
 
-    Time nRet;
+    cssu::Time nRet;
     return nRet;
 }
 // -------------------------------------------------------------------------
-DateTime SAL_CALL KabResultSet::getTimestamp(sal_Int32 columnIndex) throw(SQLException, RuntimeException)
+cssu::DateTime SAL_CALL KabResultSet::getTimestamp(sal_Int32 columnIndex) throw(SQLException, RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(KabResultSet_BASE::rBHelper.bDisposed);
 
-    DateTime nRet;
+    cssu::DateTime nRet;
     sal_Int32 nAddressees = m_aKabAddressees.size();
 
     if (m_nRowPos != -1 && m_nRowPos != nAddressees && m_xMetaData.is())
@@ -745,19 +745,19 @@ void SAL_CALL KabResultSet::updateBytes(sal_Int32, const Sequence< sal_Int8 >&)
     checkDisposed(KabResultSet_BASE::rBHelper.bDisposed);
 }
 // -------------------------------------------------------------------------
-void SAL_CALL KabResultSet::updateDate(sal_Int32, const Date&) throw(SQLException, RuntimeException)
+void SAL_CALL KabResultSet::updateDate(sal_Int32, const cssu::Date&) throw(SQLException, RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(KabResultSet_BASE::rBHelper.bDisposed);
 }
 // -------------------------------------------------------------------------
-void SAL_CALL KabResultSet::updateTime(sal_Int32, const Time&) throw(SQLException, RuntimeException)
+void SAL_CALL KabResultSet::updateTime(sal_Int32, const cssu::Time&) throw(SQLException, RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(KabResultSet_BASE::rBHelper.bDisposed);
 }
 // -------------------------------------------------------------------------
-void SAL_CALL KabResultSet::updateTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException)
+void SAL_CALL KabResultSet::updateTimestamp(sal_Int32, const cssu::DateTime&) throw(SQLException, RuntimeException)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     checkDisposed(KabResultSet_BASE::rBHelper.bDisposed);


More information about the Libreoffice-commits mailing list