summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/classes/sbunoobj.cxx2
-rw-r--r--basic/source/sbx/sbxdate.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index da309e79b7e7..4a1541138a5a 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1028,7 +1028,7 @@ Any sbxToUnoValueImpl( const SbxValue* pVar, bool bBlockConversionToSmallestType
case TypeClass_DOUBLE:
{
double d = pVar->GetDouble();
- if( d == floor( d ) )
+ if( rtl::math::approxEqual(d, floor( d )) )
{
if( d >= -128 && d <= 127 )
aType = ::cppu::UnoType<sal_Int8>::get();
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index ebe574d42292..b678f220c2e4 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -281,7 +281,7 @@ start:
if( n <= -1.0 || n >= 1.0 )
{
// Time only if != 00:00:00
- if( floor( n ) == n )
+ if( rtl::math::approxEqual(floor( n ), n) )
{
switch( eDate )
{