diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-03-13 10:38:10 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-03-23 07:01:26 +0000 |
commit | 83bde658dd538b8cb66df9bf0ce1e1c959052f59 (patch) | |
tree | ea5802c35c415b321d33674af0d9e59507e6a924 /sc | |
parent | 584c9914fc4da76839ecdb3efed36381bee21954 (diff) |
jsdialog: enable data validation dialog
Change-Id: Ide679ada03dff5e62432d77b8c804d667bf2435b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148781
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149219
Diffstat (limited to 'sc')
-rw-r--r-- | sc/UIConfig_scalc.mk | 2 | ||||
-rw-r--r-- | sc/qa/uitest/validity/tdf137945.py | 2 | ||||
-rw-r--r-- | sc/qa/uitest/validity/validity.py | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/validate.cxx | 8 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/erroralerttabpage-mobile.ui | 152 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/validationhelptabpage-mobile.ui | 110 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/validationhelptabpage.ui | 6 |
7 files changed, 9 insertions, 275 deletions
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index d83aa96dbaa1..214a300a04d9 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -125,7 +125,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/dropmenu \ sc/uiconfig/scalc/ui/doubledialog \ sc/uiconfig/scalc/ui/erroralerttabpage \ - sc/uiconfig/scalc/ui/erroralerttabpage-mobile \ sc/uiconfig/scalc/ui/externaldata \ sc/uiconfig/scalc/ui/exponentialsmoothingdialog \ sc/uiconfig/scalc/ui/filldlg \ @@ -263,7 +262,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/validationdialog \ sc/uiconfig/scalc/ui/validationcriteriapage \ sc/uiconfig/scalc/ui/validationhelptabpage \ - sc/uiconfig/scalc/ui/validationhelptabpage-mobile \ sc/uiconfig/scalc/ui/warnautocorrect \ sc/uiconfig/scalc/ui/xmlsourcedialog \ sc/uiconfig/scalc/ui/zoombox \ diff --git a/sc/qa/uitest/validity/tdf137945.py b/sc/qa/uitest/validity/tdf137945.py index abe7b26057f6..13370c91462b 100644 --- a/sc/qa/uitest/validity/tdf137945.py +++ b/sc/qa/uitest/validity/tdf137945.py @@ -18,7 +18,7 @@ class Tdf137945(UITestCase): with self.ui_test.execute_dialog_through_command(".uno:Validation") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "1") - xInput = xDialog.getChild("inputhelp") + xInput = xDialog.getChild("inputhelp_text") xTitle = xDialog.getChild("title") self.assertEqual("test", get_state_as_dict(xTitle)['Text']) diff --git a/sc/qa/uitest/validity/validity.py b/sc/qa/uitest/validity/validity.py index 25e691a42544..3112b7afb91e 100644 --- a/sc/qa/uitest/validity/validity.py +++ b/sc/qa/uitest/validity/validity.py @@ -61,7 +61,7 @@ class validity(UITestCase): select_pos(xTabs, "1") xtsbhelp = xDialog.getChild("tsbhelp") xtitle = xDialog.getChild("title") - xinputhelp = xDialog.getChild("inputhelp") + xinputhelp = xDialog.getChild("inputhelp_text") xtsbhelp.executeAction("CLICK", tuple()) xtitle.executeAction("TYPE", mkPropertyValues({"TEXT":"A"})) @@ -71,7 +71,7 @@ class validity(UITestCase): xTabs = xDialog.getChild("tabcontrol") xtsbhelp = xDialog.getChild("tsbhelp") xtitle = xDialog.getChild("title") - xinputhelp = xDialog.getChild("inputhelp") + xinputhelp = xDialog.getChild("inputhelp_text") select_pos(xTabs, "1") self.assertEqual(get_state_as_dict(xtsbhelp)["Selected"], "true") self.assertEqual(get_state_as_dict(xtitle)["Text"], "A") diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 9f88e92ceb45..f202d8ab7926 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -691,11 +691,10 @@ IMPL_LINK_NOARG(ScTPValidationValue, CheckHdl, weld::Toggleable&, void) // Input Help Page ScTPValidationHelp::ScTPValidationHelp(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rArgSet) - : SfxTabPage(pPage, pController, IS_MOBILE ? OUString("modules/scalc/ui/validationhelptabpage-mobile.ui") - : OUString("modules/scalc/ui/validationhelptabpage.ui"), "ValidationHelpTabPage", &rArgSet) + : SfxTabPage(pPage, pController, "modules/scalc/ui/validationhelptabpage.ui", "ValidationHelpTabPage", &rArgSet) , m_xTsbHelp(m_xBuilder->weld_check_button("tsbhelp")) , m_xEdtTitle(m_xBuilder->weld_entry("title")) - , m_xEdInputHelp(m_xBuilder->weld_text_view("inputhelp")) + , m_xEdInputHelp(m_xBuilder->weld_text_view("inputhelp_text")) { m_xEdInputHelp->set_size_request(m_xEdInputHelp->get_approximate_digit_width() * 40, m_xEdInputHelp->get_height_rows(13)); } @@ -743,8 +742,7 @@ ScTPValidationError::ScTPValidationError(weld::Container* pPage, weld::DialogCon const SfxItemSet& rArgSet) : SfxTabPage ( pPage, pController, - IS_MOBILE ? OUString("modules/scalc/ui/erroralerttabpage-mobile.ui") - : OUString("modules/scalc/ui/erroralerttabpage.ui"), "ErrorAlertTabPage", + "modules/scalc/ui/erroralerttabpage.ui", "ErrorAlertTabPage", &rArgSet ) , m_xTsbShow(m_xBuilder->weld_check_button("tsbshow")) , m_xLbAction(m_xBuilder->weld_combo_box("actionCB")) diff --git a/sc/uiconfig/scalc/ui/erroralerttabpage-mobile.ui b/sc/uiconfig/scalc/ui/erroralerttabpage-mobile.ui deleted file mode 100644 index 74846ac19a62..000000000000 --- a/sc/uiconfig/scalc/ui/erroralerttabpage-mobile.ui +++ /dev/null @@ -1,152 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.4 --> -<interface domain="sc"> - <requires lib="gtk+" version="3.20"/> - <object class="GtkBox" id="ErrorAlertTabPage"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="border_width">6</property> - <property name="orientation">vertical</property> - <property name="spacing">12</property> - <child> - <object class="GtkCheckButton" id="tsbshow"> - <property name="label" translatable="yes" context="erroralerttabpage-mobile|tsbshow">Show error _message when invalid values are entered</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="hexpand">True</property> - <property name="use_underline">True</property> - <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <!-- n-columns=1 n-rows=1 --> - <object class="GtkGrid" id="grid1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkLabel" id="action_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="erroralerttabpage-mobile|action_label">_Action:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">actionCB</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="title_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="erroralerttabpage-mobile|title_label">_Title:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">erroralert_title</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="vexpand">True</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTextView" id="errorMsg"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="vexpand">True</property> - </object> - </child> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> - <property name="width">2</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="erroralert_title"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="truncate-multiline">True</property> - <property name="activates_default">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> - <property name="width">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="errormsg_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="erroralerttabpage-mobile|errormsg_label">_Error message:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">errorMsg</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkButton" id="browseBtn"> - <property name="label" translatable="yes" context="erroralerttabpage-mobile|browseBtn">_Browse...</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkComboBoxText" id="actionCB"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <items> - <item translatable="yes" context="erroralerttabpage-mobile|actionCB">Stop</item> - <item translatable="yes" context="erroralerttabpage-mobile|actionCB">Warning</item> - <item translatable="yes" context="erroralerttabpage-mobile|actionCB">Information</item> - </items> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> -</interface> diff --git a/sc/uiconfig/scalc/ui/validationhelptabpage-mobile.ui b/sc/uiconfig/scalc/ui/validationhelptabpage-mobile.ui deleted file mode 100644 index b1d9c6cea887..000000000000 --- a/sc/uiconfig/scalc/ui/validationhelptabpage-mobile.ui +++ /dev/null @@ -1,110 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.4 --> -<interface domain="sc"> - <requires lib="gtk+" version="3.20"/> - <object class="GtkBox" id="ValidationHelpTabPage"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="border_width">6</property> - <property name="orientation">vertical</property> - <property name="spacing">12</property> - <child> - <object class="GtkCheckButton" id="tsbhelp"> - <property name="label" translatable="yes" context="validationhelptabpage-mobile|tsbhelp">_Show input help when cell is selected</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="hexpand">True</property> - <property name="use_underline">True</property> - <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <!-- n-columns=1 n-rows=1 --> - <object class="GtkGrid" id="grid1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkEntry" id="title"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="truncate-multiline">True</property> - <property name="activates_default">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="title_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="validationhelptabpage-mobile|title_label">_Title:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">title</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="inputhelp_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="validationhelptabpage-mobile|inputhelp_label">_Input help:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">inputhelp</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkTextView" id="inputhelp"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - </object> - </child> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> -</interface> diff --git a/sc/uiconfig/scalc/ui/validationhelptabpage.ui b/sc/uiconfig/scalc/ui/validationhelptabpage.ui index 313c07333f5d..15ea8a0877c4 100644 --- a/sc/uiconfig/scalc/ui/validationhelptabpage.ui +++ b/sc/uiconfig/scalc/ui/validationhelptabpage.ui @@ -89,7 +89,7 @@ <property name="can_focus">False</property> <property name="label" translatable="yes" context="validationhelptabpage|inputhelp_label">_Input help:</property> <property name="use_underline">True</property> - <property name="mnemonic_widget">inputhelp</property> + <property name="mnemonic_widget">inputhelp_text</property> <property name="xalign">0</property> <property name="yalign">0</property> </object> @@ -106,14 +106,14 @@ <property name="vexpand">True</property> <property name="shadow_type">in</property> <child> - <object class="GtkTextView" id="inputhelp"> + <object class="GtkTextView" id="inputhelp_text"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <child internal-child="accessible"> <object class="AtkObject" id="inputhelp-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="validationhelptabpage|extended_tip|inputhelp">Enter the message that you want to display when the cell or cell range is selected.</property> + <property name="AtkObject::accessible-description" translatable="yes" context="validationhelptabpage|extended_tip|inputhelp_text">Enter the message that you want to display when the cell or cell range is selected.</property> </object> </child> </object> |