sc/source/core/tool/interpr2.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit c93eb59b65d5cecb185b4dae11593149009a60bf Author: Eike Rathke <er...@redhat.com> Date: Thu Jul 20 12:14:08 2017 +0200 Obtain days using GetInt32() Change-Id: I1f23c1e7f0fee6ffe90b3f5b094a7a672fc7ff0d diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index aa2daa821989..3c3a5f41bd83 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -783,8 +783,8 @@ void ScInterpreter::ScGetDateDif() if ( MustHaveParamCount( GetByte(), 3 ) ) { OUString aInterval = GetString().getString(); - long nDate2 = ::rtl::math::approxFloor( GetDouble() ); - long nDate1 = ::rtl::math::approxFloor( GetDouble() ); + sal_Int32 nDate2 = GetInt32(); + sal_Int32 nDate1 = GetInt32(); if (nGlobalError != FormulaError::NONE) { @@ -799,9 +799,9 @@ void ScInterpreter::ScGetDateDif() return; } - long dd = nDate2 - nDate1; + double dd = nDate2 - nDate1; // Zero difference or number of days can be returned immediately. - if (dd == 0 || aInterval.equalsIgnoreAsciiCase( "d" )) + if (dd == 0.0 || aInterval.equalsIgnoreAsciiCase( "d" )) { PushDouble( dd ); return; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits