diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-11-23 21:26:05 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-11-24 19:43:18 +0100 |
commit | fdb6711835ceab636222d8ec5264d008c2621748 (patch) | |
tree | 7aff6520851c340742cfc338c84fc608eb32d80d /sc | |
parent | c86aed38b67ee5d1b842a7765e363015aea22fcc (diff) |
Fix detection of force intercept in XLS 97/2000/XP format.
NaN value indicates if the force intercept is enabled or not.
Change-Id: I51d33a6e04a4b5832f241e7ae7ee6d2fbb32ea9b
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xichart.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 51e00c12fb28..d99c12c7d30d 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -195,13 +195,6 @@ void lclConvertTimeInterval( Any& rInterval, sal_uInt16 nValue, bool bAuto, sal_ rInterval <<= cssc::TimeInterval( nValue, lclGetApiTimeUnit( nTimeUnit ) ); } -bool lcl_IsForceIntercept(double intercept) -{ - sal_math_Double* pIntercept = reinterpret_cast<sal_math_Double*>(&intercept); - return (pIntercept->w32_parts.msw != 0xFFFFFFFF || - pIntercept->w32_parts.lsw != 0xFFFFFFFF); -} - } // namespace // Common ===================================================================== @@ -1657,7 +1650,7 @@ Reference< XRegressionCurve > XclImpChSerTrendLine::CreateRegressionCurve() cons aPropSet.SetProperty(EXC_CHPROP_EXTRAPOLATE_FORWARD, maData.mfForecastFor); aPropSet.SetProperty(EXC_CHPROP_EXTRAPOLATE_BACKWARD, maData.mfForecastBack); - sal_Bool bForceIntercept = lcl_IsForceIntercept(maData.mfIntercept); + sal_Bool bForceIntercept = !rtl::math::isNan(maData.mfIntercept); aPropSet.SetProperty(EXC_CHPROP_FORCE_INTERCEPT, bForceIntercept); if (bForceIntercept) { |