[Libreoffice-commits] core.git: sc/source sc/uiconfig

Kohei Yoshida kohei.yoshida at collabora.com
Wed May 21 19:02:00 PDT 2014


 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx              |   19 ---------
 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx |   19 ---------
 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx |   19 ---------
 sc/source/ui/inc/SamplingDialog.hxx                            |    5 --
 sc/source/ui/inc/StatisticsInputOutputDialog.hxx               |    4 --
 sc/source/ui/inc/StatisticsTwoVariableDialog.hxx               |    5 --
 sc/uiconfig/scalc/ui/analysisofvariancedialog.ui               |   20 +---------
 sc/uiconfig/scalc/ui/correlationdialog.ui                      |   20 +---------
 sc/uiconfig/scalc/ui/covariancedialog.ui                       |   20 +---------
 sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui            |   20 +---------
 sc/uiconfig/scalc/ui/exponentialsmoothingdialog.ui             |   20 +---------
 sc/uiconfig/scalc/ui/movingaveragedialog.ui                    |   20 +---------
 sc/uiconfig/scalc/ui/samplingdialog.ui                         |   20 +---------
 sc/uiconfig/scalc/ui/ttestdialog.ui                            |   20 +---------
 14 files changed, 17 insertions(+), 214 deletions(-)

New commits:
commit f79fa791ce3d5b18b1b159546d2f6fb594a364d4
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed May 21 22:01:04 2014 -0400

    Modify these stats dialogs to have OK and Cancel pair.
    
    Change-Id: I5707aea9965e0d288d4a0e742f5d3cccf08107eb

diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index 24eb99d..4c2529b 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -57,8 +57,6 @@ ScSamplingDialog::ScSamplingDialog(
     get(mpPeriodicMethodRadio, "periodic-method-radio");
 
     get(mpButtonOk,     "ok");
-    get(mpButtonApply,  "apply");
-    get(mpButtonClose,  "close");
 
     Init();
     GetRangeFromSelection();
@@ -67,10 +65,7 @@ ScSamplingDialog::ScSamplingDialog(
 void ScSamplingDialog::Init()
 {
     mpButtonOk->SetClickHdl( LINK( this, ScSamplingDialog, OkClicked ) );
-    mpButtonClose->SetClickHdl( LINK( this, ScSamplingDialog, CloseClicked ) );
-    mpButtonApply->SetClickHdl( LINK( this, ScSamplingDialog, ApplyClicked ) );
     mpButtonOk->Enable(false);
-    mpButtonApply->Enable(false);
 
     Link aLink = LINK( this, ScSamplingDialog, GetFocusHandler );
     mpInputRangeEdit->SetGetFocusHdl( aLink );
@@ -159,7 +154,6 @@ void ScSamplingDialog::SetReference( const ScRange& rReferenceRange, ScDocument*
 
             // Enable OK, Cancel if output range is set
             mpButtonOk->Enable(!mpOutputRangeEdit->GetText().isEmpty());
-            mpButtonApply->Enable(!mpOutputRangeEdit->GetText().isEmpty());
         }
     }
 }
@@ -279,20 +273,7 @@ void ScSamplingDialog::PerformSampling()
 
 IMPL_LINK( ScSamplingDialog, OkClicked, PushButton*, /*pButton*/ )
 {
-    ApplyClicked(NULL);
-    CloseClicked(NULL);
-    return 0;
-}
-
-
-IMPL_LINK( ScSamplingDialog, ApplyClicked, PushButton*, /*pButton*/ )
-{
     PerformSampling();
-    return 0;
-}
-
-IMPL_LINK( ScSamplingDialog, CloseClicked, PushButton*, /*pButton*/ )
-{
     Close();
     return 0;
 }
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index 5d2518b..d8e835a 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -78,8 +78,6 @@ ScStatisticsInputOutputDialog::ScStatisticsInputOutputDialog(
     mpOutputRangeButton->SetReferences(this, mpOutputRangeEdit);
 
     get(mpButtonOk,     "ok");
-    get(mpButtonApply,  "apply");
-    get(mpButtonClose,  "close");
 
     get(mpGroupByColumnsRadio,   "groupedby-columns-radio");
     get(mpGroupByRowsRadio,      "groupedby-rows-radio");
@@ -94,10 +92,7 @@ ScStatisticsInputOutputDialog::~ScStatisticsInputOutputDialog()
 void ScStatisticsInputOutputDialog::Init()
 {
     mpButtonOk->SetClickHdl( LINK( this, ScStatisticsInputOutputDialog, OkClicked ) );
-    mpButtonClose->SetClickHdl( LINK( this, ScStatisticsInputOutputDialog, CloseClicked ) );
-    mpButtonApply->SetClickHdl( LINK( this, ScStatisticsInputOutputDialog, ApplyClicked ) );
     mpButtonOk->Enable(false);
-    mpButtonApply->Enable(false);
 
     Link aLink = LINK( this, ScStatisticsInputOutputDialog, GetFocusHandler );
     mpInputRangeEdit->SetGetFocusHdl( aLink );
@@ -167,27 +162,13 @@ void ScStatisticsInputOutputDialog::SetReference( const ScRange& rReferenceRange
 
             // Enable OK, Cancel if output range is set
             mpButtonOk->Enable(!mpOutputRangeEdit->GetText().isEmpty());
-            mpButtonApply->Enable(!mpOutputRangeEdit->GetText().isEmpty());
         }
     }
 }
 
 IMPL_LINK( ScStatisticsInputOutputDialog, OkClicked, PushButton*, /*pButton*/ )
 {
-    ApplyClicked(NULL);
-    CloseClicked(NULL);
-    return 0;
-}
-
-
-IMPL_LINK( ScStatisticsInputOutputDialog, ApplyClicked, PushButton*, /*pButton*/ )
-{
     CalculateInputAndWriteToOutput();
-    return 0;
-}
-
-IMPL_LINK( ScStatisticsInputOutputDialog, CloseClicked, PushButton*, /*pButton*/ )
-{
     Close();
     return 0;
 }
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index 5d9d5b0..a55da6d 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -56,8 +56,6 @@ ScStatisticsTwoVariableDialog::ScStatisticsTwoVariableDialog(
     mpOutputRangeButton->SetReferences(this, mpOutputRangeEdit);
 
     get(mpButtonOk,     "ok");
-    get(mpButtonApply,  "apply");
-    get(mpButtonClose,  "close");
 
     get(mpGroupByColumnsRadio,   "groupedby-columns-radio");
     get(mpGroupByRowsRadio,      "groupedby-rows-radio");
@@ -72,10 +70,7 @@ ScStatisticsTwoVariableDialog::~ScStatisticsTwoVariableDialog()
 void ScStatisticsTwoVariableDialog::Init()
 {
     mpButtonOk->SetClickHdl( LINK( this, ScStatisticsTwoVariableDialog, OkClicked ) );
-    mpButtonClose->SetClickHdl( LINK( this, ScStatisticsTwoVariableDialog, CloseClicked ) );
-    mpButtonApply->SetClickHdl( LINK( this, ScStatisticsTwoVariableDialog, ApplyClicked ) );
     mpButtonOk->Enable(false);
-    mpButtonApply->Enable(false);
 
     Link aLink = LINK( this, ScStatisticsTwoVariableDialog, GetFocusHandler );
     mpVariable1RangeEdit->SetGetFocusHdl( aLink );
@@ -175,27 +170,13 @@ void ScStatisticsTwoVariableDialog::SetReference( const ScRange& rReferenceRange
 
             // Enable OK, Cancel if output range is set
             mpButtonOk->Enable(!mpOutputRangeEdit->GetText().isEmpty());
-            mpButtonApply->Enable(!mpOutputRangeEdit->GetText().isEmpty());
         }
     }
 }
 
 IMPL_LINK( ScStatisticsTwoVariableDialog, OkClicked, PushButton*, /*pButton*/ )
 {
-    ApplyClicked(NULL);
-    CloseClicked(NULL);
-    return 0;
-}
-
-
-IMPL_LINK( ScStatisticsTwoVariableDialog, ApplyClicked, PushButton*, /*pButton*/ )
-{
     CalculateInputAndWriteToOutput();
-    return 0;
-}
-
-IMPL_LINK( ScStatisticsTwoVariableDialog, CloseClicked, PushButton*, /*pButton*/ )
-{
     Close();
     return 0;
 }
diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx
index 554f33f..9cebb6c 100644
--- a/sc/source/ui/inc/SamplingDialog.hxx
+++ b/sc/source/ui/inc/SamplingDialog.hxx
@@ -48,10 +48,7 @@ private:
     RadioButton*        mpRandomMethodRadio;
     RadioButton*        mpPeriodicMethodRadio;
 
-    PushButton*         mpButtonApply;
     OKButton*           mpButtonOk;
-    CloseButton*        mpButtonClose;
-
 
     formula::RefEdit*   mpActiveEdit;
 
@@ -75,8 +72,6 @@ private:
     ScRange PerformPeriodicSampling(ScDocShell* pDocShell);
 
     DECL_LINK( OkClicked,        PushButton* );
-    DECL_LINK( CloseClicked,     PushButton* );
-    DECL_LINK( ApplyClicked,     PushButton* );
     DECL_LINK( GetFocusHandler,  Control* );
     DECL_LINK( LoseFocusHandler, void* );
     DECL_LINK( SamplingSizeValueModified, void* );
diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
index 6825ba6..d54ac00 100644
--- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
+++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
@@ -69,9 +69,7 @@ protected:
 
 private:
     // Widgets
-    PushButton*         mpButtonApply;
     OKButton*           mpButtonOk;
-    CloseButton*        mpButtonClose;
 
     formula::RefEdit*   mpActiveEdit;
     ScAddress           mCurrentAddress;
@@ -82,8 +80,6 @@ private:
 
     DECL_LINK( GroupByChanged,   void* );
     DECL_LINK( OkClicked,        PushButton* );
-    DECL_LINK( CloseClicked,     PushButton* );
-    DECL_LINK( ApplyClicked,     PushButton* );
     DECL_LINK( GetFocusHandler,  Control* );
     DECL_LINK( LoseFocusHandler, void* );
 };
diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
index 5d57e69..87c1d6b 100644
--- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
+++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
@@ -69,9 +69,8 @@ protected:
 
 private:
     // Widgets
-    PushButton*         mpButtonApply;
     OKButton*           mpButtonOk;
-    CloseButton*        mpButtonClose;
+
     RadioButton*        mpGroupByColumnsRadio;
     RadioButton*        mpGroupByRowsRadio;
 
@@ -84,8 +83,6 @@ private:
 
     DECL_LINK( GroupByChanged,   void* );
     DECL_LINK( OkClicked,        PushButton* );
-    DECL_LINK( CloseClicked,     PushButton* );
-    DECL_LINK( ApplyClicked,     PushButton* );
     DECL_LINK( GetFocusHandler,  Control* );
     DECL_LINK( LoseFocusHandler, void* );
 };
diff --git a/sc/uiconfig/scalc/ui/analysisofvariancedialog.ui b/sc/uiconfig/scalc/ui/analysisofvariancedialog.ui
index f673f92..3fcf8ea 100644
--- a/sc/uiconfig/scalc/ui/analysisofvariancedialog.ui
+++ b/sc/uiconfig/scalc/ui/analysisofvariancedialog.ui
@@ -31,22 +31,6 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="apply">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -63,8 +47,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="close">
-                <property name="label">gtk-close</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
diff --git a/sc/uiconfig/scalc/ui/correlationdialog.ui b/sc/uiconfig/scalc/ui/correlationdialog.ui
index 1e9639b..b066e3f 100644
--- a/sc/uiconfig/scalc/ui/correlationdialog.ui
+++ b/sc/uiconfig/scalc/ui/correlationdialog.ui
@@ -18,22 +18,6 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="apply">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -50,8 +34,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="close">
-                <property name="label">gtk-close</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
diff --git a/sc/uiconfig/scalc/ui/covariancedialog.ui b/sc/uiconfig/scalc/ui/covariancedialog.ui
index 5647d5f..03cff50 100644
--- a/sc/uiconfig/scalc/ui/covariancedialog.ui
+++ b/sc/uiconfig/scalc/ui/covariancedialog.ui
@@ -18,22 +18,6 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="apply">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -50,8 +34,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="close">
-                <property name="label">gtk-close</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
diff --git a/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui b/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
index 189244c..ec0fc69 100644
--- a/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
+++ b/sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui
@@ -18,22 +18,6 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="apply">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -50,8 +34,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="close">
-                <property name="label">gtk-close</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
diff --git a/sc/uiconfig/scalc/ui/exponentialsmoothingdialog.ui b/sc/uiconfig/scalc/ui/exponentialsmoothingdialog.ui
index b74732d..598d7bd 100644
--- a/sc/uiconfig/scalc/ui/exponentialsmoothingdialog.ui
+++ b/sc/uiconfig/scalc/ui/exponentialsmoothingdialog.ui
@@ -24,22 +24,6 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="apply">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -56,8 +40,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="close">
-                <property name="label">gtk-close</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
diff --git a/sc/uiconfig/scalc/ui/movingaveragedialog.ui b/sc/uiconfig/scalc/ui/movingaveragedialog.ui
index 3f75dbc..b72bc6c7 100644
--- a/sc/uiconfig/scalc/ui/movingaveragedialog.ui
+++ b/sc/uiconfig/scalc/ui/movingaveragedialog.ui
@@ -25,22 +25,6 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="apply">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -57,8 +41,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="close">
-                <property name="label">gtk-close</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
diff --git a/sc/uiconfig/scalc/ui/samplingdialog.ui b/sc/uiconfig/scalc/ui/samplingdialog.ui
index 25862cc..ca1d661 100644
--- a/sc/uiconfig/scalc/ui/samplingdialog.ui
+++ b/sc/uiconfig/scalc/ui/samplingdialog.ui
@@ -29,22 +29,6 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="apply">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -61,8 +45,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="close">
-                <property name="label">gtk-close</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
diff --git a/sc/uiconfig/scalc/ui/ttestdialog.ui b/sc/uiconfig/scalc/ui/ttestdialog.ui
index 7251735..4fd3dec 100644
--- a/sc/uiconfig/scalc/ui/ttestdialog.ui
+++ b/sc/uiconfig/scalc/ui/ttestdialog.ui
@@ -18,22 +18,6 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="apply">
-                <property name="label">gtk-apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -50,8 +34,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="close">
-                <property name="label">gtk-close</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>


More information about the Libreoffice-commits mailing list