summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-10-19 14:56:12 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-10-19 14:57:59 -0400
commit9b18a49fddf67c68973f1eb408fa61cb1c1952dc (patch)
tree9890ae9eab5db11e1dd28d9b5a2a42b21d9e069f
parent31ec3547085939d76b25e6794af0620d7d1a9171 (diff)
approxEqual with 0.0 always is false. Do a normal non-equality check.
Plus approxEqual is slightly slower. Change-Id: I16e7db6b06b3c0eceb8b8a1b7afd29660ff1da6a
-rw-r--r--sc/source/core/tool/compare.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index 5f7dd1292e02..bf50093e08a6 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -55,7 +55,7 @@ double CompareFunc( const Compare& rComp, CompareOptions* pOptions )
; // empty cell == empty cell, fRes 0
else if( rComp.bVal[ 1 ] )
{
- if ( !::rtl::math::approxEqual( rComp.nVal[ 1 ], 0.0 ) )
+ if (rComp.nVal[1] != 0.0)
{
if ( rComp.nVal[ 1 ] < 0.0 )
fRes = 1; // empty cell > -x
@@ -75,7 +75,7 @@ double CompareFunc( const Compare& rComp, CompareOptions* pOptions )
{
if( rComp.bVal[ 0 ] )
{
- if ( !::rtl::math::approxEqual( rComp.nVal[ 0 ], 0.0 ) )
+ if (rComp.nVal[0] != 0.0)
{
if ( rComp.nVal[ 0 ] < 0.0 )
fRes = -1; // -x < empty cell