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

New commits:
commit 61d5f971496cb0091f9b37aaafcb87694f3810ea
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Mon Nov 13 17:08:13 2023 +0100
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Mon Nov 13 19:31:38 2023 +0100

    Resolves: tdf#127498 Force corrected TIMEVALUE() result
    
    Change-Id: I750a3251c3cf5e8cad4a37c7c4b646c0457f2dbe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159389
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 8255fe7f76c1..61f88d638a00 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -28,6 +28,7 @@
 #include <sfx2/objsh.hxx>
 #include <svl/numformat.hxx>
 #include <svl/zforlist.hxx>
+#include <tools/duration.hxx>
 #include <sal/macros.h>
 #include <osl/diagnose.h>
 
@@ -923,6 +924,7 @@ void ScInterpreter::ScGetTimeValue()
             nFuncFmtType = SvNumFormatType::TIME;
             double fDateVal = rtl::math::approxFloor(fVal);
             double fTimeVal = fVal - fDateVal;
+            fTimeVal = ::tools::Duration(fTimeVal).GetInDays();  // force 
corrected
             PushDouble(fTimeVal);
         }
         else

Reply via email to