summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-07-20 12:14:08 +0200
committerEike Rathke <erack@redhat.com>2017-07-20 12:14:18 +0200
commitc93eb59b65d5cecb185b4dae11593149009a60bf (patch)
tree6844ef45d03111d19cd825863dcc886c3900d4e0
parentf8206849e8c437ec8eb74d044ba50be5f1622b70 (diff)
Obtain days using GetInt32()
Change-Id: I1f23c1e7f0fee6ffe90b3f5b094a7a672fc7ff0d
-rw-r--r--sc/source/core/tool/interpr2.cxx8
1 files changed, 4 insertions, 4 deletions
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;