summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-03-15 11:46:43 +0000
committerOliver Bolte <obo@openoffice.org>2004-03-15 11:46:43 +0000
commit9502d341dd4324eb256b86db521522889dc4b763 (patch)
tree0b4c7299fe811290ae3cbbe8f91c6560d91b66b5 /connectivity
parentde9e1c0e4094df9ab726d1a4ee803a1d6072172f (diff)
INTEGRATION: CWS oj08 (1.2.36); FILE MERGED
2004/01/29 09:44:30 oj 1.2.36.1: #i18960# insert ln function
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/file/FNumericFunctions.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/connectivity/source/drivers/file/FNumericFunctions.cxx b/connectivity/source/drivers/file/FNumericFunctions.cxx
index 50c85c304129..0d13b52871ed 100644
--- a/connectivity/source/drivers/file/FNumericFunctions.cxx
+++ b/connectivity/source/drivers/file/FNumericFunctions.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FNumericFunctions.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: obo $ $Date: 2003-09-04 08:25:12 $
+ * last change: $Author: obo $ $Date: 2004-03-15 12:46:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -142,11 +142,14 @@ ORowSetValue OOp_Exp::operate(const ORowSetValue& lhs) const
// -----------------------------------------------------------------------------
ORowSetValue OOp_Ln::operate(const ORowSetValue& lhs) const
{
- if ( lhs.isNull() )
+ if ( lhs.isNull() || static_cast<double>(lhs) < 0.0 )
return lhs;
double nVal(lhs);
- return log(nVal);
+ nVal = log(nVal);
+ if ( rtl::math::isNan(nVal) )
+ return ORowSetValue();
+ return nVal;
}
// -----------------------------------------------------------------------------
ORowSetValue OOp_Log::operate(const ::std::vector<ORowSetValue>& lhs) const