summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Balland-Poirier <laurent.balland-poirier@laposte.net>2013-12-09 07:54:38 +0100
committerTomaž Vajngerl <quikee@gmail.com>2013-12-09 07:12:27 +0000
commit496ae60435db1c7b508cbdf85bd5cc00c351cf88 (patch)
tree4f76f9341717eb95c49d1455908d57e598e13167
parentf38277dc0337df15f3ea689096a2c18a03354a61 (diff)
fdo#40314 Force intercept only for linear/poly trendlines
Force intercept option is available only for linear and polynomial trendlines Change-Id: I98f551a51b4d1e85924ce23135588a03fabbea35 Reviewed-on: https://gerrit.libreoffice.org/7001 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index e1b6a070ce29..c8bba7e290b4 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -303,10 +303,11 @@ void TrendlineResources::FillValueSets()
void TrendlineResources::UpdateControlStates()
{
bool bMovingAverage = ( m_eTrendLineType == CHREGRESS_MOVING_AVERAGE );
+ bool bInterceptAvailable = ( m_eTrendLineType == CHREGRESS_LINEAR ) || ( m_eTrendLineType == CHREGRESS_POLYNOMIAL );
m_pNF_ExtrapolateForward->Enable(!bMovingAverage);
m_pNF_ExtrapolateBackward->Enable(!bMovingAverage);
- m_pCB_SetIntercept->Enable(!bMovingAverage);
- m_pFmtFld_InterceptValue->Enable(!bMovingAverage);
+ m_pCB_SetIntercept->Enable( bInterceptAvailable );
+ m_pFmtFld_InterceptValue->Enable( bInterceptAvailable );
if(bMovingAverage)
{
m_pCB_ShowEquation->SetState( STATE_NOCHECK );