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

Takeshi Abe tabe at fixedpoint.jp
Mon May 21 07:11:50 UTC 2018


 sc/source/core/tool/interpr2.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 622691b89573850c35fe6c4b4f0b2f9bdb4c091d
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue May 8 16:35:49 2018 +0900

    sc: Avoid looking up system clock twice to get current datetime
    
    Change-Id: I904067260c15263f8169f095809e642d0738f6bb
    Reviewed-on: https://gerrit.libreoffice.org/53957
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index db02e70710eb..7846d0d162b6 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -112,9 +112,8 @@ void ScInterpreter::ScGetActDate()
 void ScInterpreter::ScGetActTime()
 {
     nFuncFmtType = SvNumFormatType::DATETIME;
-    Date aActDate( Date::SYSTEM );
-    long nDiff = aActDate - pFormatter->GetNullDate();
-    tools::Time aActTime( tools::Time::SYSTEM );
+    DateTime aActTime( DateTime::SYSTEM );
+    long nDiff = aActTime - pFormatter->GetNullDate();
     double fTime = aActTime.GetHour()    / static_cast<double>(::tools::Time::hourPerDay)   +
                    aActTime.GetMin()     / static_cast<double>(::tools::Time::minutePerDay) +
                    aActTime.GetSec()     / static_cast<double>(::tools::Time::secondPerDay) +


More information about the Libreoffice-commits mailing list