From 9c22f181ac19fc9a45dd9eb4f8e34d454575f671 Mon Sep 17 00:00:00 2001
From: Tomaž Vajngerl <quikee@gmail.com>
Date: Wed, 3 Jul 2013 21:42:39 +0200
Subject: Remove "None" Regression curve option and related files and code.

Change-Id: I38dde3854c08eecfe76d9f329ff2c0fa66449a58
---
 chart2/AllLangResTarget_chartcontroller.mk         |   1 -
 chart2/source/controller/dialogs/res_Trendline.cxx |  34 +--
 chart2/source/controller/dialogs/res_Trendline.hxx |   6 +-
 .../controller/dialogs/res_Trendline_IDs.hrc       |  54 -----
 .../controller/dialogs/res_Trendline_tmpl.hrc      | 235 ---------------------
 chart2/source/controller/dialogs/tp_Trendline.cxx  |   2 +-
 chart2/source/controller/dialogs/tp_Trendline.hrc  |  52 +++++
 chart2/source/controller/dialogs/tp_Trendline.src  | 198 ++++++++++++++++-
 8 files changed, 255 insertions(+), 327 deletions(-)
 delete mode 100644 chart2/source/controller/dialogs/res_Trendline_IDs.hrc
 delete mode 100644 chart2/source/controller/dialogs/res_Trendline_tmpl.hrc
 create mode 100644 chart2/source/controller/dialogs/tp_Trendline.hrc

(limited to 'chart2')

diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk
index 006266ab37c1..8e6d8527e068 100644
--- a/chart2/AllLangResTarget_chartcontroller.mk
+++ b/chart2/AllLangResTarget_chartcontroller.mk
@@ -79,7 +79,6 @@ $(eval $(call gb_SrsTarget_add_templates,chart2/res,\
     chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc \
     chart2/source/controller/dialogs/res_SecondaryAxisCheckBoxes_tmpl.hrc \
     chart2/source/controller/dialogs/res_Titlesx_tmpl.hrc \
-    chart2/source/controller/dialogs/res_Trendline_tmpl.hrc \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index 75f08dc68d67..62c61aea5be3 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -19,7 +19,7 @@
 
 
 #include "res_Trendline.hxx"
-#include "res_Trendline_IDs.hrc"
+#include "tp_Trendline.hrc"
 #include "ResId.hxx"
 #include "Strings.hrc"
 #include "Bitmaps.hrc"
@@ -58,10 +58,9 @@ namespace
 namespace chart
 {
 
-TrendlineResources::TrendlineResources( Window * pParent, const SfxItemSet& rInAttrs, bool bNoneAvailable ) :
+TrendlineResources::TrendlineResources( Window * pParent, const SfxItemSet& rInAttrs ) :
         m_aFLType( pParent, SchResId( FL_TYPE )),
 
-        m_aRBNone(          pParent, SchResId( RB_NONE              )),
         m_aRBLinear(        pParent, SchResId( RB_LINEAR            )),
         m_aRBLogarithmic(   pParent, SchResId( RB_LOGARITHMIC       )),
         m_aRBExponential(   pParent, SchResId( RB_EXPONENTIAL       )),
@@ -69,7 +68,6 @@ TrendlineResources::TrendlineResources( Window * pParent, const SfxItemSet& rInA
         m_aRBPolynomial(    pParent, SchResId( RB_POLYNOMIAL        )),
         m_aRBMovingAverage( pParent, SchResId( RB_MOVING_AVERAGE    )),
 
-        m_aFINone(          pParent, SchResId( FI_NONE              )),
         m_aFILinear(        pParent, SchResId( FI_LINEAR            )),
         m_aFILogarithmic(   pParent, SchResId( FI_LOGARITHMIC       )),
         m_aFIExponential(   pParent, SchResId( FI_EXPONENTIAL       )),
@@ -93,17 +91,11 @@ TrendlineResources::TrendlineResources( Window * pParent, const SfxItemSet& rInA
         m_aCBShowEquation(         pParent, SchResId( CB_SHOW_EQUATION          )),
         m_aCBShowCorrelationCoeff( pParent, SchResId( CB_SHOW_CORRELATION_COEFF )),
 
-        m_eTrendLineType( CHREGRESS_NONE ),
-        m_bNoneAvailable( bNoneAvailable ),
+        m_eTrendLineType( CHREGRESS_LINEAR ),
         m_bTrendLineUnique( true )
 {
     FillValueSets();
 
-    if( m_bNoneAvailable )
-        m_aRBNone.SetClickHdl( LINK(this, TrendlineResources, SelectTrendLine ));
-    else
-        m_aRBNone.Hide();
-
     m_aRBLinear.SetClickHdl( LINK(this, TrendlineResources, SelectTrendLine ));
     m_aRBLogarithmic.SetClickHdl( LINK(this, TrendlineResources, SelectTrendLine ));
     m_aRBExponential.SetClickHdl( LINK(this, TrendlineResources, SelectTrendLine ));
@@ -125,7 +117,6 @@ long TrendlineResources::adjustControlSizes()
 {
     // calculate right edge
     std::vector< long > aControlRightEdges;
-    aControlRightEdges.push_back( lcl_getRightEdge( m_aRBNone ));
     aControlRightEdges.push_back( lcl_getRightEdge( m_aRBLinear ));
     aControlRightEdges.push_back( lcl_getRightEdge( m_aRBLogarithmic ));
     aControlRightEdges.push_back( lcl_getRightEdge( m_aRBExponential ));
@@ -143,8 +134,6 @@ long TrendlineResources::adjustControlSizes()
     aControlRightEdges.push_back( lcl_getRightEdge( m_aCBShowEquation ));
     aControlRightEdges.push_back( lcl_getRightEdge( m_aCBShowCorrelationCoeff ));
 
-
-    lcl_AdjustControlSize( m_aRBNone );
     lcl_AdjustControlSize( m_aRBLinear );
     lcl_AdjustControlSize( m_aRBLogarithmic );
     lcl_AdjustControlSize( m_aRBExponential );
@@ -193,11 +182,6 @@ IMPL_LINK( TrendlineResources, SelectTrendLine, RadioButton *, pRadioButton )
         m_eTrendLineType = CHREGRESS_POLYNOMIAL;
     else if( pRadioButton == &m_aRBMovingAverage )
         m_eTrendLineType = CHREGRESS_MOVING_AVERAGE;
-    else if( pRadioButton == &m_aRBNone )
-    {
-        OSL_ASSERT( m_bNoneAvailable );
-        m_eTrendLineType = CHREGRESS_NONE;
-    }
     m_bTrendLineUnique = true;
 
     UpdateControlStates();
@@ -331,9 +315,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs )
             case CHREGRESS_MOVING_AVERAGE :
                 m_aRBMovingAverage.Check();
                 break;
-            case CHREGRESS_NONE:
-                OSL_ASSERT( m_bNoneAvailable );
-                m_aRBNone.Check();
+            default:
                 break;
         }
     }
@@ -373,8 +355,6 @@ sal_Bool TrendlineResources::FillItemSet(SfxItemSet& rOutAttrs) const
 
 void TrendlineResources::FillValueSets()
 {
-    if( m_bNoneAvailable )
-        m_aFINone.SetImage(     Image( SchResId( BMP_REGRESSION_NONE            ) ) );
     m_aFILinear.SetImage(       Image( SchResId( BMP_REGRESSION_LINEAR          ) ) );
     m_aFILogarithmic.SetImage(  Image( SchResId( BMP_REGRESSION_LOG             ) ) );
     m_aFIExponential.SetImage(  Image( SchResId( BMP_REGRESSION_EXP             ) ) );
@@ -385,12 +365,6 @@ void TrendlineResources::FillValueSets()
 
 void TrendlineResources::UpdateControlStates()
 {
-    if( m_bNoneAvailable )
-    {
-        bool bEnableEquationControls = !m_bTrendLineUnique || (m_eTrendLineType != CHREGRESS_NONE);
-        m_aCBShowEquation.Enable( bEnableEquationControls );
-        m_aCBShowCorrelationCoeff.Enable( bEnableEquationControls );
-    }
 }
 
 } //  namespace chart
diff --git a/chart2/source/controller/dialogs/res_Trendline.hxx b/chart2/source/controller/dialogs/res_Trendline.hxx
index 1ff8ca0adaf6..359286284253 100644
--- a/chart2/source/controller/dialogs/res_Trendline.hxx
+++ b/chart2/source/controller/dialogs/res_Trendline.hxx
@@ -32,7 +32,7 @@ namespace chart
 class TrendlineResources
 {
 public:
-    TrendlineResources( Window* pParent, const SfxItemSet& rInAttrs, bool bNoneAvailable );
+    TrendlineResources( Window* pParent, const SfxItemSet& rInAttrs );
     virtual ~TrendlineResources();
 
     void Reset(const SfxItemSet& rInAttrs);
@@ -44,7 +44,7 @@ public:
 
 private:
     FixedLine m_aFLType;
-    RadioButton m_aRBNone;
+
     RadioButton m_aRBLinear;
     RadioButton m_aRBLogarithmic;
     RadioButton m_aRBExponential;
@@ -52,7 +52,6 @@ private:
     RadioButton m_aRBPolynomial;
     RadioButton m_aRBMovingAverage;
 
-    FixedImage  m_aFINone;
     FixedImage  m_aFILinear;
     FixedImage  m_aFILogarithmic;
     FixedImage  m_aFIExponential;
@@ -81,7 +80,6 @@ private:
 
     SvxChartRegress     m_eTrendLineType;
 
-    bool                m_bNoneAvailable;
     bool                m_bTrendLineUnique;
 
     void UpdateControlStates();
diff --git a/chart2/source/controller/dialogs/res_Trendline_IDs.hrc b/chart2/source/controller/dialogs/res_Trendline_IDs.hrc
deleted file mode 100644
index cb9e8d8e6d21..000000000000
--- a/chart2/source/controller/dialogs/res_Trendline_IDs.hrc
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#define FL_TYPE 1
-#define FL_EQUATION 2
-
-#define FI_NONE 1
-#define FI_LINEAR 2
-#define FI_LOGARITHMIC 3
-#define FI_EXPONENTIAL 4
-#define FI_POWER 5
-#define FI_POLYNOMIAL 6
-#define FI_MOVING_AVERAGE 7
-
-#define NF_DEGREE 1
-#define NF_PERIOD 2
-#define NF_EXTRAPOLATE_FORWARD 3
-#define NF_EXTRAPOLATE_BACKWARD 4
-#define NF_INTERCEPT_VALUE 5
-
-#define FT_DEGREE 1
-#define FT_PERIOD 2
-#define FT_EXTRAPOLATE_FORWARD 3
-#define FT_EXTRAPOLATE_BACKWARD 4
-
-#define RB_NONE 1
-#define RB_LINEAR 2
-#define RB_LOGARITHMIC 3
-#define RB_EXPONENTIAL 4
-#define RB_POWER 5
-#define RB_POLYNOMIAL 6
-#define RB_MOVING_AVERAGE 7
-
-#define CB_SHOW_EQUATION 1
-#define CB_SHOW_CORRELATION_COEFF 2
-#define CB_SET_INTERCEPT 3
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc b/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc
deleted file mode 100644
index ff6498c031c8..000000000000
--- a/chart2/source/controller/dialogs/res_Trendline_tmpl.hrc
+++ /dev/null
@@ -1,235 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _CHART2_RESOURCE_TRENDLINE_HXX
-#define _CHART2_RESOURCE_TRENDLINE_HXX
-
-#include "res_Trendline_IDs.hrc"
-#include "HelpIds.hrc"
-
-#define RESOURCE_TRENDLINE(availablewidth, yoffset) \
-FixedLine FL_TYPE \
-{ \
-    Pos = MAP_APPFONT( 6 ,6  ); \
-    Size = MAP_APPFONT( availablewidth - 12 ,8 ); \
-    Text[ en-US ] = "Regression Type"; \
-}; \
-RadioButton RB_NONE \
-{ \
-    HelpId = HID_SCH_TRENDLINE_RB_NONE; \
-    Pos = MAP_APPFONT( 29, 22  ); \
-    Size = MAP_APPFONT( 100, 10 ); \
-    Text[ en-US ] = "~None"; \
-}; \
-RadioButton RB_LINEAR \
-{ \
-    HelpId = HID_SCH_TRENDLINE_RB_LINEAR; \
-    Pos = MAP_APPFONT( 29, 22 + yoffset ); \
-    Size = MAP_APPFONT( 100, 10 ); \
-    Text[ en-US ] = "~Linear"; \
-}; \
-RadioButton RB_LOGARITHMIC \
-{ \
-    HelpId = HID_SCH_TRENDLINE_RB_LOGARITHMIC; \
-    Pos = MAP_APPFONT( 29, 44  + yoffset ); \
-    Size = MAP_APPFONT( 100, 10 ); \
-    Text[ en-US ] = "L~ogarithmic"; \
-}; \
-RadioButton RB_EXPONENTIAL \
-{ \
-    HelpId = HID_SCH_TRENDLINE_RB_EXPONENTIAL; \
-    Pos = MAP_APPFONT( 29, 66 + yoffset  ); \
-    Size = MAP_APPFONT( 100, 10 ); \
-    Text[ en-US ] = "E~xponential"; \
-}; \
-RadioButton RB_POWER \
-{ \
-    HelpId = HID_SCH_TRENDLINE_RB_POWER; \
-    Pos = MAP_APPFONT( 29, 88 + yoffset ); \
-    Size = MAP_APPFONT( 100, 10 ); \
-    Text[ en-US ] = "~Power"; \
-}; \
-RadioButton RB_POLYNOMIAL \
-{ \
-    Pos = MAP_APPFONT( 130, 22 + yoffset ); \
-    Size = MAP_APPFONT( 70, 10 ); \
-    Text[ en-US ] = "~Polynomial"; \
-}; \
-RadioButton RB_MOVING_AVERAGE \
-{ \
-    Pos = MAP_APPFONT( 130, 66 + yoffset ); \
-    Size = MAP_APPFONT( 70, 10 ); \
-    Text[ en-US ] = "~Moving Average"; \
-}; \
-FixedImage FI_NONE \
-{ \
-    Pos = MAP_APPFONT( 10, 18 ); \
-    Size = MAP_APPFONT( 18, 18 ); \
-}; \
-FixedImage FI_LINEAR \
-{ \
-    Pos = MAP_APPFONT( 10, 18 + yoffset ); \
-    Size = MAP_APPFONT( 18, 18 ); \
-}; \
-FixedImage FI_LOGARITHMIC \
-{ \
-    Pos = MAP_APPFONT( 10, 40 + yoffset ); \
-    Size = MAP_APPFONT( 18, 18 ); \
-}; \
-FixedImage FI_EXPONENTIAL \
-{ \
-    Pos = MAP_APPFONT( 10, 62 + yoffset ); \
-    Size = MAP_APPFONT( 18, 18 ); \
-}; \
-FixedImage FI_POWER \
-{ \
-    Pos = MAP_APPFONT( 10, 84 + yoffset ); \
-    Size = MAP_APPFONT( 18, 18 ); \
-}; \
-FixedImage FI_POLYNOMIAL \
-{ \
-    Pos = MAP_APPFONT( 110, 18 + yoffset ); \
-    Size = MAP_APPFONT( 18, 18 ); \
-}; \
-FixedImage FI_MOVING_AVERAGE \
-{ \
-    Pos = MAP_APPFONT( 110, 62 + yoffset ); \
-    Size = MAP_APPFONT( 18, 18 ); \
-}; \
-FixedText FT_DEGREE \
-{ \
-    Pos = MAP_APPFONT ( 110, 44 + yoffset  ) ; \
-    Size = MAP_APPFONT ( 20 , 12 ) ; \
-    Text [ en-US ] = "Degree"; \
-}; \
-NumericField NF_DEGREE \
-{ \
-    Border = TRUE ; \
-    Pos = MAP_APPFONT ( 132, 42 + yoffset  ) ; \
-    Size = MAP_APPFONT ( 28 , 12 ) ; \
-    TabStop = TRUE ; \
-    Repeat = TRUE ; \
-    Spin = TRUE ; \
-    StrictFormat = TRUE ; \
-    SpinSize = 1 ; \
-    Minimum = 2 ; \
-    Maximum = 100 ; \
-}; \
-FixedText FT_PERIOD \
-{ \
-    Pos = MAP_APPFONT ( 110, 88 + yoffset  ) ; \
-    Size = MAP_APPFONT ( 20 , 12 ) ; \
-    Text [ en-US ] = "Period"; \
-}; \
-NumericField NF_PERIOD \
-{ \
-    Border = TRUE ; \
-    Pos = MAP_APPFONT ( 132, 86 + yoffset  ) ; \
-    Size = MAP_APPFONT ( 28 , 12 ) ; \
-    TabStop = TRUE ; \
-    Repeat = TRUE ; \
-    Spin = TRUE ; \
-    StrictFormat = TRUE ; \
-    SpinSize = 1 ; \
-    Minimum = 2 ; \
-    Maximum = 100 ; \
-}; \
-FixedLine FL_EQUATION \
-{ \
-    Pos = MAP_APPFONT( 6, 108 + yoffset ); \
-    Size = MAP_APPFONT( availablewidth - 12, 8 ); \
-    Text[ en-US ] = "Options"; \
-}; \
-FixedText FT_EXTRAPOLATE_FORWARD \
-{ \
-    Pos = MAP_APPFONT ( 10, 120 + yoffset  ) ; \
-    Size = MAP_APPFONT ( 70 , 12 ) ; \
-    Text [ en-US ] = "Extrapolate ~forward"; \
-}; \
-NumericField NF_EXTRAPOLATE_FORWARD \
-{ \
-    Border = TRUE ; \
-    Pos = MAP_APPFONT ( 80, 118 + yoffset  ) ; \
-    Size = MAP_APPFONT ( 40 , 12 ) ; \
-    TabStop = TRUE ; \
-    Repeat = TRUE ; \
-    Spin = TRUE ; \
-    StrictFormat = TRUE ; \
-    SpinSize = 50 ; \
-    Minimum = 0 ; \
-    Maximum = 10000 ; \
-    DecimalDigits = 2 ; \
-}; \
-FixedText FT_EXTRAPOLATE_BACKWARD \
-{ \
-    Pos = MAP_APPFONT ( 10, 134 + yoffset  ) ; \
-    Size = MAP_APPFONT ( 70 , 12 ) ; \
-    Text [ en-US ] = "Extrapolate ~backward"; \
-}; \
-NumericField NF_EXTRAPOLATE_BACKWARD \
-{ \
-    Border = TRUE ; \
-    Pos = MAP_APPFONT ( 80, 132 + yoffset  ) ; \
-    Size = MAP_APPFONT ( 40 , 12 ) ; \
-    TabStop = TRUE ; \
-    Repeat = TRUE ; \
-    Spin = TRUE ; \
-    StrictFormat = TRUE ; \
-    SpinSize = 50 ; \
-    Minimum = 0 ; \
-    Maximum = 10000 ; \
-    DecimalDigits = 2 ; \
-}; \
-CheckBox CB_SET_INTERCEPT \
-{ \
-    HelpId = HID_SCH_TRENDLINE_SHOW_EQUATION; \
-    Pos = MAP_APPFONT( 10, 148 + yoffset ); \
-    Size = MAP_APPFONT( 60, 12 ); \
-    TabStop = TRUE; \
-    Text[ en-US ] = "Force ~intercept"; \
-}; \
-NumericField NF_INTERCEPT_VALUE \
-{ \
-    Border = TRUE ; \
-    Pos = MAP_APPFONT ( 80, 146 + yoffset  ) ; \
-    Size = MAP_APPFONT ( 40 , 12 ) ; \
-    TabStop = TRUE ; \
-    Spin = TRUE ; \
-    SpinSize = 1000 ; \
-    DecimalDigits = 4 ; \
-}; \
-CheckBox CB_SHOW_EQUATION \
-{ \
-    HelpId = HID_SCH_TRENDLINE_SHOW_EQUATION; \
-    Pos = MAP_APPFONT( 10, 162 + yoffset ); \
-    Size = MAP_APPFONT( availablewidth - 20, 10 ); \
-    TabStop = TRUE; \
-    Text[ en-US ] = "Show ~equation"; \
-}; \
-CheckBox CB_SHOW_CORRELATION_COEFF \
-{ \
-    HelpId = HID_SCH_TRENDLINE_SHOW_R_SQUARED; \
-    Pos = MAP_APPFONT( 10, 176 + yoffset ); \
-    Size = MAP_APPFONT( availablewidth - 20, 10 ); \
-    TabStop = TRUE; \
-    Text[ en-US ] = "Show ~coefficient of determination (R²)"; \
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/tp_Trendline.cxx b/chart2/source/controller/dialogs/tp_Trendline.cxx
index 8c0a787e49c9..448fe85c6cdb 100644
--- a/chart2/source/controller/dialogs/tp_Trendline.cxx
+++ b/chart2/source/controller/dialogs/tp_Trendline.cxx
@@ -29,7 +29,7 @@ namespace chart
 
 TrendlineTabPage::TrendlineTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
         SfxTabPage( pParent, SchResId( TP_TRENDLINE ), rInAttrs ),
-        m_aTrendlineResources( this, rInAttrs, false )
+        m_aTrendlineResources( this, rInAttrs )
 {
     FreeResource();
 }
diff --git a/chart2/source/controller/dialogs/tp_Trendline.hrc b/chart2/source/controller/dialogs/tp_Trendline.hrc
new file mode 100644
index 000000000000..5ecfb77dbf0f
--- /dev/null
+++ b/chart2/source/controller/dialogs/tp_Trendline.hrc
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#define FL_TYPE 1
+#define FL_EQUATION 2
+
+#define FI_LINEAR 2
+#define FI_LOGARITHMIC 3
+#define FI_EXPONENTIAL 4
+#define FI_POWER 5
+#define FI_POLYNOMIAL 6
+#define FI_MOVING_AVERAGE 7
+
+#define NF_DEGREE 1
+#define NF_PERIOD 2
+#define NF_EXTRAPOLATE_FORWARD 3
+#define NF_EXTRAPOLATE_BACKWARD 4
+#define NF_INTERCEPT_VALUE 5
+
+#define FT_DEGREE 1
+#define FT_PERIOD 2
+#define FT_EXTRAPOLATE_FORWARD 3
+#define FT_EXTRAPOLATE_BACKWARD 4
+
+#define RB_LINEAR 2
+#define RB_LOGARITHMIC 3
+#define RB_EXPONENTIAL 4
+#define RB_POWER 5
+#define RB_POLYNOMIAL 6
+#define RB_MOVING_AVERAGE 7
+
+#define CB_SHOW_EQUATION 1
+#define CB_SHOW_CORRELATION_COEFF 2
+#define CB_SET_INTERCEPT 3
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/tp_Trendline.src b/chart2/source/controller/dialogs/tp_Trendline.src
index 37a708208c68..2ed7deaf8860 100644
--- a/chart2/source/controller/dialogs/tp_Trendline.src
+++ b/chart2/source/controller/dialogs/tp_Trendline.src
@@ -18,7 +18,7 @@
  */
 #include "HelpIds.hrc"
 #include "TabPages.hrc"
-#include "res_Trendline.hrc"
+#include "tp_Trendline.hrc"
 
 TabPage TP_TRENDLINE
 {
@@ -26,7 +26,201 @@ TabPage TP_TRENDLINE
     Hide = TRUE ;
     SVLook = TRUE ;
     Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    RESOURCE_TRENDLINE( 260 - 12, 0 )
+
+    FixedLine FL_TYPE
+    {
+        Pos = MAP_APPFONT( 6 ,6  );
+        Size = MAP_APPFONT( 248 - 12 ,8 );
+        Text[ en-US ] = "Regression Type";
+    };
+    RadioButton RB_LINEAR
+    {
+        HelpId = HID_SCH_TRENDLINE_RB_LINEAR;
+        Pos = MAP_APPFONT( 29, 22 );
+        Size = MAP_APPFONT( 100, 10 );
+        Text[ en-US ] = "~Linear";
+    };
+    RadioButton RB_LOGARITHMIC
+    {
+        HelpId = HID_SCH_TRENDLINE_RB_LOGARITHMIC;
+        Pos = MAP_APPFONT( 29, 44 );
+        Size = MAP_APPFONT( 100, 10 );
+        Text[ en-US ] = "L~ogarithmic";
+    };
+    RadioButton RB_EXPONENTIAL
+    {
+        HelpId = HID_SCH_TRENDLINE_RB_EXPONENTIAL;
+        Pos = MAP_APPFONT( 29, 66 );
+        Size = MAP_APPFONT( 100, 10 );
+        Text[ en-US ] = "E~xponential";
+    };
+    RadioButton RB_POWER
+    {
+        HelpId = HID_SCH_TRENDLINE_RB_POWER;
+        Pos = MAP_APPFONT( 29, 88 );
+        Size = MAP_APPFONT( 100, 10 );
+        Text[ en-US ] = "~Power";
+    };
+    RadioButton RB_POLYNOMIAL
+    {
+        Pos = MAP_APPFONT( 130, 22 );
+        Size = MAP_APPFONT( 70, 10 );
+        Text[ en-US ] = "~Polynomial";
+    };
+    RadioButton RB_MOVING_AVERAGE
+    {
+        Pos = MAP_APPFONT( 130, 66 );
+        Size = MAP_APPFONT( 70, 10 );
+        Text[ en-US ] = "~Moving Average";
+    };
+    FixedImage FI_LINEAR
+    {
+        Pos = MAP_APPFONT( 10, 18 );
+        Size = MAP_APPFONT( 18, 18 );
+    };
+    FixedImage FI_LOGARITHMIC
+    {
+        Pos = MAP_APPFONT( 10, 40 );
+        Size = MAP_APPFONT( 18, 18 );
+    };
+    FixedImage FI_EXPONENTIAL
+    {
+        Pos = MAP_APPFONT( 10, 62 );
+        Size = MAP_APPFONT( 18, 18 );
+    };
+    FixedImage FI_POWER
+    {
+        Pos = MAP_APPFONT( 10, 84 );
+        Size = MAP_APPFONT( 18, 18 );
+    };
+    FixedImage FI_POLYNOMIAL
+    {
+        Pos = MAP_APPFONT( 110, 18 );
+        Size = MAP_APPFONT( 18, 18 );
+    };
+    FixedImage FI_MOVING_AVERAGE
+    {
+        Pos = MAP_APPFONT( 110, 62 );
+        Size = MAP_APPFONT( 18, 18 );
+    };
+    FixedText FT_DEGREE
+    {
+        Pos = MAP_APPFONT ( 110, 44 ) ;
+        Size = MAP_APPFONT ( 20 , 12 ) ;
+        Text [ en-US ] = "Degree";
+    };
+    NumericField NF_DEGREE
+    {
+        Border = TRUE ;
+        Pos = MAP_APPFONT ( 132, 42 ) ;
+        Size = MAP_APPFONT ( 28 , 12 ) ;
+        TabStop = TRUE ;
+        Repeat = TRUE ;
+        Spin = TRUE ;
+        StrictFormat = TRUE ;
+        SpinSize = 1 ;
+        Minimum = 2 ;
+        Maximum = 100 ;
+    };
+    FixedText FT_PERIOD
+    {
+        Pos = MAP_APPFONT ( 110, 88 ) ;
+        Size = MAP_APPFONT ( 20 , 12 ) ;
+        Text [ en-US ] = "Period";
+    };
+    NumericField NF_PERIOD
+    {
+        Border = TRUE ;
+        Pos = MAP_APPFONT ( 132, 86 ) ;
+        Size = MAP_APPFONT ( 28 , 12 ) ;
+        TabStop = TRUE ;
+        Repeat = TRUE ;
+        Spin = TRUE ;
+        StrictFormat = TRUE ;
+        SpinSize = 1 ;
+        Minimum = 2 ;
+        Maximum = 100 ;
+    };
+    FixedLine FL_EQUATION
+    {
+        Pos = MAP_APPFONT( 6, 108 );
+        Size = MAP_APPFONT( 248 - 12, 8 );
+        Text[ en-US ] = "Options";
+    };
+    FixedText FT_EXTRAPOLATE_FORWARD
+    {
+        Pos = MAP_APPFONT ( 10, 120 ) ;
+        Size = MAP_APPFONT ( 70 , 12 ) ;
+        Text [ en-US ] = "Extrapolate ~forward";
+    };
+    NumericField NF_EXTRAPOLATE_FORWARD
+    {
+        Border = TRUE ;
+        Pos = MAP_APPFONT ( 80, 118 ) ;
+        Size = MAP_APPFONT ( 40 , 12 ) ;
+        TabStop = TRUE ;
+        Repeat = TRUE ;
+        Spin = TRUE ;
+        StrictFormat = TRUE ;
+        SpinSize = 50 ;
+        Minimum = 0 ;
+        Maximum = 10000 ;
+        DecimalDigits = 2 ;
+    };
+    FixedText FT_EXTRAPOLATE_BACKWARD
+    {
+        Pos = MAP_APPFONT ( 10, 134 ) ;
+        Size = MAP_APPFONT ( 70 , 12 ) ;
+        Text [ en-US ] = "Extrapolate ~backward";
+    };
+    NumericField NF_EXTRAPOLATE_BACKWARD
+    {
+        Border = TRUE ;
+        Pos = MAP_APPFONT ( 80, 132 ) ;
+        Size = MAP_APPFONT ( 40 , 12 ) ;
+        TabStop = TRUE ;
+        Repeat = TRUE ;
+        Spin = TRUE ;
+        StrictFormat = TRUE ;
+        SpinSize = 50 ;
+        Minimum = 0 ;
+        Maximum = 10000 ;
+        DecimalDigits = 2 ;
+    };
+    CheckBox CB_SET_INTERCEPT
+    {
+        HelpId = HID_SCH_TRENDLINE_SHOW_EQUATION;
+        Pos = MAP_APPFONT( 10, 148 );
+        Size = MAP_APPFONT( 60, 12 );
+        TabStop = TRUE;
+        Text[ en-US ] = "Force ~intercept";
+    };
+    NumericField NF_INTERCEPT_VALUE
+    {
+        Border = TRUE ;
+        Pos = MAP_APPFONT ( 80, 146 ) ;
+        Size = MAP_APPFONT ( 40 , 12 ) ;
+        TabStop = TRUE ;
+        Spin = TRUE ;
+        SpinSize = 1000 ;
+        DecimalDigits = 4 ;
+    };
+    CheckBox CB_SHOW_EQUATION
+    {
+        HelpId = HID_SCH_TRENDLINE_SHOW_EQUATION;
+        Pos = MAP_APPFONT( 10, 162 );
+        Size = MAP_APPFONT( 248 - 20, 10 );
+        TabStop = TRUE;
+        Text[ en-US ] = "Show ~equation";
+    };
+    CheckBox CB_SHOW_CORRELATION_COEFF
+    {
+        HelpId = HID_SCH_TRENDLINE_SHOW_R_SQUARED;
+        Pos = MAP_APPFONT( 10, 176 );
+        Size = MAP_APPFONT( 248 - 20, 10 );
+        TabStop = TRUE;
+        Text[ en-US ] = "Show ~coefficient of determination (R²)";
+    };
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-- 
cgit