[Libreoffice-commits] core.git: chart2/source

Laurent Balland-Poirier laurent.balland-poirier at laposte.net
Sun Dec 8 23:12:52 PST 2013


 chart2/source/controller/dialogs/res_Trendline.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 496ae60435db1c7b508cbdf85bd5cc00c351cf88
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Mon Dec 9 07:54:38 2013 +0100

    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 at gmail.com>
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index e1b6a07..c8bba7e 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 );


More information about the Libreoffice-commits mailing list