summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-10 11:57:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-11 09:55:21 +0200
commitb043fde5219312ddb05d046e21768dc73438e0c8 (patch)
tree76bbbe4e3e5204370090942b7e2f2659426c418c /sc
parent5a816c4241c98b97d464007f25657b946eb29005 (diff)
weld ScFTestDialog and ScTTestDialog
Change-Id: Id65a4a78f89ed45a21cd89b6e41e7dd5b4a79529 Reviewed-on: https://gerrit.libreoffice.org/70518 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/StatisticsDialogs/FTestDialog.cxx12
-rw-r--r--sc/source/ui/StatisticsDialogs/TTestDialog.cxx12
-rw-r--r--sc/source/ui/inc/FTestDialog.hxx6
-rw-r--r--sc/source/ui/inc/TTestDialog.hxx6
-rw-r--r--sc/source/ui/inc/reffact.hxx4
-rw-r--r--sc/source/ui/view/tabvwshc.cxx22
-rw-r--r--sc/uiconfig/scalc/ui/ttestdialog.ui148
7 files changed, 108 insertions, 102 deletions
diff --git a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
index 95c86b80570c..10e523e28173 100644
--- a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
@@ -18,20 +18,20 @@
ScFTestDialog::ScFTestDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
- vcl::Window* pParent, ScViewData* pViewData ) :
- ScStatisticsTwoVariableDialog(
+ weld::Window* pParent, ScViewData* pViewData ) :
+ ScStatisticsTwoVariableDialogController(
pSfxBindings, pChildWindow, pParent, pViewData,
- "TTestDialog", "modules/scalc/ui/ttestdialog.ui" )
+ "modules/scalc/ui/ttestdialog.ui", "TTestDialog" )
{
- SetText(ScResId(STR_FTEST));
+ m_xDialog->set_title(ScResId(STR_FTEST));
}
ScFTestDialog::~ScFTestDialog()
{}
-bool ScFTestDialog::Close()
+void ScFTestDialog::Close()
{
- return DoClose( ScFTestDialogWrapper::GetChildWindowId() );
+ DoClose( ScFTestDialogWrapper::GetChildWindowId() );
}
const char* ScFTestDialog::GetUndoNameId()
diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
index 1f4b44b802e1..a9c39a6cb374 100644
--- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
@@ -18,20 +18,20 @@
ScTTestDialog::ScTTestDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
- vcl::Window* pParent, ScViewData* pViewData ) :
- ScStatisticsTwoVariableDialog(
+ weld::Window* pParent, ScViewData* pViewData ) :
+ ScStatisticsTwoVariableDialogController(
pSfxBindings, pChildWindow, pParent, pViewData,
- "TTestDialog", "modules/scalc/ui/ttestdialog.ui" )
+ "modules/scalc/ui/ttestdialog.ui", "TTestDialog")
{
- SetText(ScResId(STR_TTEST));
+ m_xDialog->set_title(ScResId(STR_TTEST));
}
ScTTestDialog::~ScTTestDialog()
{}
-bool ScTTestDialog::Close()
+void ScTTestDialog::Close()
{
- return DoClose( ScTTestDialogWrapper::GetChildWindowId() );
+ DoClose( ScTTestDialogWrapper::GetChildWindowId() );
}
const char* ScTTestDialog::GetUndoNameId()
diff --git a/sc/source/ui/inc/FTestDialog.hxx b/sc/source/ui/inc/FTestDialog.hxx
index 04c7f40e2d89..f75bff68ed2d 100644
--- a/sc/source/ui/inc/FTestDialog.hxx
+++ b/sc/source/ui/inc/FTestDialog.hxx
@@ -13,16 +13,16 @@
#include "StatisticsTwoVariableDialog.hxx"
-class ScFTestDialog : public ScStatisticsTwoVariableDialog
+class ScFTestDialog : public ScStatisticsTwoVariableDialogController
{
public:
ScFTestDialog(
SfxBindings* pB, SfxChildWindow* pCW,
- vcl::Window* pParent, ScViewData* pViewData );
+ weld::Window* pParent, ScViewData* pViewData );
virtual ~ScFTestDialog() override;
- virtual bool Close() override;
+ virtual void Close() override;
protected:
virtual const char* GetUndoNameId() override;
diff --git a/sc/source/ui/inc/TTestDialog.hxx b/sc/source/ui/inc/TTestDialog.hxx
index 6c068a87a0e8..623be738884c 100644
--- a/sc/source/ui/inc/TTestDialog.hxx
+++ b/sc/source/ui/inc/TTestDialog.hxx
@@ -13,16 +13,16 @@
#include "StatisticsTwoVariableDialog.hxx"
-class ScTTestDialog : public ScStatisticsTwoVariableDialog
+class ScTTestDialog : public ScStatisticsTwoVariableDialogController
{
public:
ScTTestDialog(
SfxBindings* pB, SfxChildWindow* pCW,
- vcl::Window* pParent, ScViewData* pViewData );
+ weld::Window* pParent, ScViewData* pViewData );
virtual ~ScTTestDialog() 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 76fa455f9f81..c3e90eda63d7 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -114,14 +114,14 @@ private:
};
class ScTTestDialogWrapper :
- public ChildWindowWrapper<SID_TTEST_DIALOG>
+ public ChildControllerWrapper<SID_TTEST_DIALOG>
{
private:
ScTTestDialogWrapper() = delete;
};
class ScFTestDialogWrapper :
- public ChildWindowWrapper<SID_FTEST_DIALOG>
+ public ChildControllerWrapper<SID_FTEST_DIALOG>
{
private:
ScFTestDialogWrapper() = delete;
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index b8f378323b9e..f84644eba3bb 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -330,18 +330,6 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
}
break;
- case SID_TTEST_DIALOG:
- {
- pResult = VclPtr<ScTTestDialog>::Create( pB, pCW, pParent, &GetViewData() );
- }
- break;
-
- case SID_FTEST_DIALOG:
- {
- pResult = VclPtr<ScFTestDialog>::Create( pB, pCW, pParent, &GetViewData() );
- }
- break;
-
case SID_ZTEST_DIALOG:
{
pResult = VclPtr<ScZTestDialog>::Create( pB, pCW, pParent, &GetViewData() );
@@ -531,6 +519,16 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
xResult.reset(new ScRegressionDialog(pB, pCW, pParent, &GetViewData()));
}
break;
+ case SID_FTEST_DIALOG:
+ {
+ xResult.reset(new ScFTestDialog(pB, pCW, pParent, &GetViewData()));
+ }
+ break;
+ case SID_TTEST_DIALOG:
+ {
+ xResult.reset(new ScTTestDialog(pB, pCW, pParent, &GetViewData()));
+ }
+ break;
}
if (xResult)
diff --git a/sc/uiconfig/scalc/ui/ttestdialog.ui b/sc/uiconfig/scalc/ui/ttestdialog.ui
index 0f737524ace1..246f2b766895 100644
--- a/sc/uiconfig/scalc/ui/ttestdialog.ui
+++ b/sc/uiconfig/scalc/ui/ttestdialog.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="TTestDialog">
<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="ttestdialog|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="ttestdialog|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="ttestdialog|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>