diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-10 12:13:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-11 09:55:35 +0200 |
commit | c2d2f91a6cb684c435ff5a5b68f90be69328aab2 (patch) | |
tree | 757fa301d37b6ad431bdf22c19ecdc6f791b4248 | |
parent | b043fde5219312ddb05d046e21768dc73438e0c8 (diff) |
weld ScZTestDialog
Change-Id: I9cd624d0dd80d56e772c0241e20ec93e253d8d2b
Reviewed-on: https://gerrit.libreoffice.org/70539
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/ui/StatisticsDialogs/ZTestDialog.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/inc/ZTestDialog.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/reffact.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshc.cxx | 11 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/ztestdialog.ui | 148 | ||||
-rw-r--r-- | solenv/sanitizers/ui/modules/scalc.suppr | 3 |
6 files changed, 96 insertions, 86 deletions
diff --git a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx index 0a1e64526df0..f03f8a41a7bf 100644 --- a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx @@ -18,20 +18,20 @@ ScZTestDialog::ScZTestDialog( SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow, - vcl::Window* pParent, ScViewData* pViewData ) : - ScStatisticsTwoVariableDialog( + weld::Window* pParent, ScViewData* pViewData ) : + ScStatisticsTwoVariableDialogController( pSfxBindings, pChildWindow, pParent, pViewData, - "ZTestDialog", "modules/scalc/ui/ztestdialog.ui" ) + "modules/scalc/ui/ztestdialog.ui", "ZTestDialog") { - SetText(ScResId(STR_ZTEST)); + m_xDialog->set_title(ScResId(STR_ZTEST)); } ScZTestDialog::~ScZTestDialog() {} -bool ScZTestDialog::Close() +void ScZTestDialog::Close() { - return DoClose( ScZTestDialogWrapper::GetChildWindowId() ); + DoClose( ScZTestDialogWrapper::GetChildWindowId() ); } const char* ScZTestDialog::GetUndoNameId() diff --git a/sc/source/ui/inc/ZTestDialog.hxx b/sc/source/ui/inc/ZTestDialog.hxx index 6fd8496c814b..529dd3f9d850 100644 --- a/sc/source/ui/inc/ZTestDialog.hxx +++ b/sc/source/ui/inc/ZTestDialog.hxx @@ -13,16 +13,16 @@ #include "StatisticsTwoVariableDialog.hxx" -class ScZTestDialog : public ScStatisticsTwoVariableDialog +class ScZTestDialog : public ScStatisticsTwoVariableDialogController { public: ScZTestDialog( SfxBindings* pB, SfxChildWindow* pCW, - vcl::Window* pParent, ScViewData* pViewData ); + weld::Window* pParent, ScViewData* pViewData ); virtual ~ScZTestDialog() override; - virtual bool Close() override; + virtual void Close() override; protected: virtual const char* GetUndoNameId() override; diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx index c3e90eda63d7..b04e4860da6b 100644 --- a/sc/source/ui/inc/reffact.hxx +++ b/sc/source/ui/inc/reffact.hxx @@ -128,7 +128,7 @@ private: }; class ScZTestDialogWrapper : - public ChildWindowWrapper<SID_ZTEST_DIALOG> + public ChildControllerWrapper<SID_ZTEST_DIALOG> { private: ScZTestDialogWrapper() = delete; diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index f84644eba3bb..8b86b2986cb1 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -330,12 +330,6 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog( } break; - case SID_ZTEST_DIALOG: - { - pResult = VclPtr<ScZTestDialog>::Create( pB, pCW, pParent, &GetViewData() ); - } - break; - case SID_CHI_SQUARE_TEST_DIALOG: { pResult = VclPtr<ScChiSquareTestDialog>::Create( pB, pCW, pParent, &GetViewData() ); @@ -529,6 +523,11 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont xResult.reset(new ScTTestDialog(pB, pCW, pParent, &GetViewData())); } break; + case SID_ZTEST_DIALOG: + { + xResult.reset(new ScZTestDialog(pB, pCW, pParent, &GetViewData())); + } + break; } if (xResult) diff --git a/sc/uiconfig/scalc/ui/ztestdialog.ui b/sc/uiconfig/scalc/ui/ztestdialog.ui index 7bb7e4e0d28e..a23dd22ab90f 100644 --- a/sc/uiconfig/scalc/ui/ztestdialog.ui +++ b/sc/uiconfig/scalc/ui/ztestdialog.ui @@ -1,17 +1,80 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.22.1 --> <interface domain="sc"> <requires lib="gtk+" version="3.18"/> - <requires lib="LibreOffice" version="1.0"/> <object class="GtkDialog" id="ZTestDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> + <property name="default_width">0</property> + <property name="default_height">0</property> <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> <property name="orientation">vertical</property> <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</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="cancel"> + <property name="label">gtk-cancel</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">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">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">2</property> + <property name="secondary">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> <child> <object class="GtkFrame" id="frame-data"> <property name="visible">True</property> @@ -36,10 +99,10 @@ <object class="GtkLabel" id="variable1-range-label"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="ztestdialog|variable1-range-label">Variable 1 range:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">variable1-range-edit</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> @@ -47,11 +110,12 @@ </packing> </child> <child> - <object class="foruilo-RefEdit" id="variable1-range-edit"> + <object class="GtkEntry" id="variable1-range-edit"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="valign">center</property> <property name="hexpand">True</property> + <property name="activates_default">True</property> <property name="width_chars">30</property> </object> <packing> @@ -60,7 +124,7 @@ </packing> </child> <child> - <object class="foruilo-RefButton" id="variable1-range-button"> + <object class="GtkButton" id="variable1-range-button"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -74,10 +138,10 @@ <object class="GtkLabel" id="variable2-range-label"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="ztestdialog|variable2-range-label">Variable 2 range:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">variable2-range-edit</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> @@ -85,11 +149,12 @@ </packing> </child> <child> - <object class="foruilo-RefEdit" id="variable2-range-edit"> + <object class="GtkEntry" id="variable2-range-edit"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="valign">center</property> <property name="hexpand">True</property> + <property name="activates_default">True</property> <property name="width_chars">30</property> </object> <packing> @@ -98,7 +163,7 @@ </packing> </child> <child> - <object class="foruilo-RefButton" id="variable2-range-button"> + <object class="GtkButton" id="variable2-range-button"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -112,10 +177,10 @@ <object class="GtkLabel" id="output-range-label"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="ztestdialog|output-range-label">Results to:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">output-range-edit</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> @@ -123,11 +188,12 @@ </packing> </child> <child> - <object class="foruilo-RefEdit" id="output-range-edit"> + <object class="GtkEntry" id="output-range-edit"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="valign">center</property> <property name="hexpand">True</property> + <property name="activates_default">True</property> <property name="width_chars">30</property> </object> <packing> @@ -136,7 +202,7 @@ </packing> </child> <child> - <object class="foruilo-RefButton" id="output-range-button"> + <object class="GtkButton" id="output-range-button"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -167,65 +233,6 @@ <property name="position">0</property> </packing> </child> - <child internal-child="action_area"> - <object class="GtkButtonBox" id="dialog-action_area1"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="ok"> - <property name="label">gtk-ok</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="cancel"> - <property name="label">gtk-cancel</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">1</property> - </packing> - </child> - <child> - <object class="GtkButton" id="help"> - <property name="label">gtk-help</property> - <property name="visible">True</property> - <property name="can_focus">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">2</property> - <property name="secondary">True</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">end</property> - <property name="position">0</property> - </packing> - </child> <child> <object class="GtkFrame" id="frame2"> <property name="visible">True</property> @@ -303,6 +310,7 @@ </child> <action-widgets> <action-widget response="-5">ok</action-widget> + <action-widget response="-6">cancel</action-widget> <action-widget response="-11">help</action-widget> </action-widgets> </object> diff --git a/solenv/sanitizers/ui/modules/scalc.suppr b/solenv/sanitizers/ui/modules/scalc.suppr index 354af808bb10..de86539a129f 100644 --- a/solenv/sanitizers/ui/modules/scalc.suppr +++ b/solenv/sanitizers/ui/modules/scalc.suppr @@ -253,3 +253,6 @@ sc/uiconfig/scalc/ui/xmlsourcedialog.ui://GtkLabel[@id='sourcefile'] orphan-labe sc/uiconfig/scalc/ui/xmlsourcedialog.ui://vcllo-SvTreeListBox[@id='tree:border'] no-labelled-by sc/uiconfig/scalc/ui/xmlsourcedialog.ui://GtkLabel[@id='label5'] orphan-label sc/uiconfig/scalc/ui/xmlsourcedialog.ui://foruilo-RefEdit[@id='edit'] no-labelled-by +sc/uiconfig/scalc/ui/ztestdialog.ui://GtkButton[@id='variable1-range-button'] button-no-label +sc/uiconfig/scalc/ui/ztestdialog.ui://GtkButton[@id='variable2-range-button'] button-no-label +sc/uiconfig/scalc/ui/ztestdialog.ui://GtkButton[@id='output-range-button'] button-no-label |