From c2d2f91a6cb684c435ff5a5b68f90be69328aab2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 10 Apr 2019 12:13:21 +0100 Subject: weld ScZTestDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9cd624d0dd80d56e772c0241e20ec93e253d8d2b Reviewed-on: https://gerrit.libreoffice.org/70539 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sc/source/ui/StatisticsDialogs/ZTestDialog.cxx | 12 +- sc/source/ui/inc/ZTestDialog.hxx | 6 +- sc/source/ui/inc/reffact.hxx | 2 +- sc/source/ui/view/tabvwshc.cxx | 11 +- sc/uiconfig/scalc/ui/ztestdialog.ui | 148 +++++++++++++------------ 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 + public ChildControllerWrapper { 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 ScTabViewShell::CreateRefDialog( } break; - case SID_ZTEST_DIALOG: - { - pResult = VclPtr::Create( pB, pCW, pParent, &GetViewData() ); - } - break; - case SID_CHI_SQUARE_TEST_DIALOG: { pResult = VclPtr::Create( pB, pCW, pParent, &GetViewData() ); @@ -529,6 +523,11 @@ std::unique_ptr 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 @@ - + - False 6 + 0 + 0 dialog + + + False vertical 12 + + + False + end + + + gtk-ok + True + True + True + True + True + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + True + True + True + + + False + True + 1 + + + + + gtk-help + True + True + True + True + + + False + True + 2 + True + + + + + False + True + end + 0 + + True @@ -36,10 +99,10 @@ True False - 0 Variable 1 range: True variable1-range-edit + 0 0 @@ -47,11 +110,12 @@ - + True True center True + True 30 @@ -60,7 +124,7 @@ - + True True True @@ -74,10 +138,10 @@ True False - 0 Variable 2 range: True variable2-range-edit + 0 0 @@ -85,11 +149,12 @@ - + True True center True + True 30 @@ -98,7 +163,7 @@ - + True True True @@ -112,10 +177,10 @@ True False - 0 Results to: True output-range-edit + 0 0 @@ -123,11 +188,12 @@ - + True True center True + True 30 @@ -136,7 +202,7 @@ - + True True True @@ -167,65 +233,6 @@ 0 - - - False - end - - - gtk-ok - True - True - True - True - True - True - - - False - True - 0 - - - - - gtk-cancel - True - True - True - True - True - True - - - False - True - 1 - - - - - gtk-help - True - True - True - True - - - False - True - 2 - True - - - - - False - True - end - 0 - - True @@ -303,6 +310,7 @@ ok + cancel help 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 -- cgit