summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorBjörn Milcke <bm@openoffice.org>2003-12-19 14:06:05 +0000
committerBjörn Milcke <bm@openoffice.org>2003-12-19 14:06:05 +0000
commit7fc8f827dae00663db40de3b80c329b9ed267a0c (patch)
tree2585939bfa1631a4d5217cf6b4fd95275e5b98df /chart2
parenteb00eb55d5d7108fd6a5be3734e9d1bbfd9d2139 (diff)
getRepresentation: do not show 1*...
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
index 58f07cda1629..bd729b963573 100644
--- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: LogarithmicRegressionCurveCalculator.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: bm $ $Date: 2003-12-17 14:38:29 $
+ * last change: $Author: bm $ $Date: 2003-12-19 15:06:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -169,10 +169,13 @@ OUString SAL_CALL LogarithmicRegressionCurveCalculator::getRepresentation()
if( m_fSlope != 0.0 )
{
- aBuf.append( NUMBER_TO_STR( m_fSlope ));
- aBuf.append( sal_Unicode( ' ' ));
- aBuf.append( sal_Unicode( 0x00b7 ));
- aBuf.append( sal_Unicode( ' ' ));
+ if( ! ::rtl::math::approxEqual( m_fSlope, 1.0 ))
+ {
+ aBuf.append( NUMBER_TO_STR( m_fSlope ));
+ aBuf.append( sal_Unicode( ' ' ));
+ aBuf.append( sal_Unicode( 0x00b7 ));
+ aBuf.append( sal_Unicode( ' ' ));
+ }
aBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "log(x)" ));
bHaveSlope = true;
}