summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2022-05-20 10:35:08 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2022-06-07 11:11:19 +0200
commit196d9e16b7017db2225531cd240e7b6e8f7c1d66 (patch)
tree9c4faeffda5759bae13523e6e053dec30fc6ce0c /sc
parent410a64b472ae9de0bb06ddd8f4b55fd16686c860 (diff)
Resolves tdf#146928 - Redesign charnamedialog
Dialog was changed in d73602dc51aa8829fc88e5e67e2b0c4da6b8f715 to fit vertical size on small screens by placing Western/CJK/CTL into a notebook. But for CJK and CTL it's required to have Western fonts visible in parallel. * dual solution for western with nocjk and cjk dropped western scales to the dialog width if no CJK nor CTL is enabled * CJK and CTL placed in a notebook, Western as well for proper alignment * font names are presented in lists but size and style per simple dropdowns * info text sized at 80% * variables renamed to keep track of controls (old names kept in l10n descriotion) * UITests adjusted for variable names and tab positioning Change-Id: I45b40e9bc37565f6364f1dfc1b5d837270fe4644 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134666 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/uitest/calc_tests/formatCells.py50
-rw-r--r--sc/qa/uitest/calc_tests3/clearCells.py2
-rw-r--r--sc/qa/uitest/calc_tests8/tdf126248.py4
3 files changed, 31 insertions, 25 deletions
diff --git a/sc/qa/uitest/calc_tests/formatCells.py b/sc/qa/uitest/calc_tests/formatCells.py
index 4c3b892ddc3d..98bb1c6c40be 100644
--- a/sc/qa/uitest/calc_tests/formatCells.py
+++ b/sc/qa/uitest/calc_tests/formatCells.py
@@ -75,25 +75,27 @@ class formatCell(UITestCase):
with self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") as xDialog:
xTabs = xDialog.getChild("tabcontrol")
select_pos(xTabs, "1") #tab Font
- xSizeFont = xDialog.getChild("westsizelb-cjk")
- xSizeFontEast = xDialog.getChild("eastsizelb")
- xSizeFontCTL = xDialog.getChild("ctlsizelb")
- xLangFont = xDialog.getChild("westlanglb-cjk")
- xLangFontEast = xDialog.getChild("eastlanglb")
- xLangFontCTL = xDialog.getChild("ctllanglb")
+ # xNoteBook = xDialog.getChild("nbWestern") //western notbook is always active
+ xSizeFont = xDialog.getChild("cbWestSize")
xSizeFont.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
xSizeFont.executeAction("TYPE", mkPropertyValues({"TEXT":"18"})) #set font size 18
+ xLangFont = xDialog.getChild("cbWestLanguage")
+ select_pos(xLangFont, "0")
+
+ xNoteBook = xDialog.getChild("nbCJKCTL")
+ select_pos(xNoteBook, "0")
+ xSizeFontEast = xDialog.getChild("cbCJKSize")
xSizeFontEast.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
xSizeFontEast.executeAction("TYPE", mkPropertyValues({"TEXT":"18"})) #set font size 18
+ xLangFontEast = xDialog.getChild("cbCJKLanguage")
+ select_pos(xLangFontEast, "0")
+
+ select_pos(xNoteBook, "1")
+ xSizeFontCTL = xDialog.getChild("cbCTLSize")
xSizeFontCTL.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
xSizeFontCTL.executeAction("TYPE", mkPropertyValues({"TEXT":"18"})) #set font size 18
- xNoteBook = xDialog.getChild("notebook")
- select_pos(xNoteBook, "0")
- select_pos(xLangFont, "0")
- select_pos(xNoteBook, "1")
- select_pos(xLangFontEast, "0")
- select_pos(xNoteBook, "2")
+ xLangFontCTL = xDialog.getChild("cbCTLLanguage")
select_pos(xLangFontCTL, "0")
#Verify - select cell A1
@@ -102,19 +104,23 @@ class formatCell(UITestCase):
with self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog", close_button="cancel") as xDialog:
xTabs = xDialog.getChild("tabcontrol")
select_pos(xTabs, "1") #tab Font
- xSizeFont = xDialog.getChild("westsizelb-cjk")
- xSizeFontEast = xDialog.getChild("eastsizelb")
- xSizeFontCTL = xDialog.getChild("ctlsizelb")
- xLangFont = xDialog.getChild("westlanglb-cjk")
- xLangFontEast = xDialog.getChild("eastlanglb")
- xLangFontCTL = xDialog.getChild("ctllanglb")
-
+ xSizeFont = xDialog.getChild("cbWestSize")
self.assertEqual(get_state_as_dict(xSizeFont)["Text"], "18 pt")
+ xLangFont = xDialog.getChild("cbWestLanguage")
+ self.assertEqual(get_state_as_dict(xLangFont)["Text"], "[None]")
+
+ xNoteBook = xDialog.getChild("nbCJKCTL")
+ select_pos(xNoteBook, "0")
+ xSizeFontEast = xDialog.getChild("cbCJKSize")
self.assertEqual(get_state_as_dict(xSizeFontEast)["Text"], "18 pt")
+ xLangFontEast = xDialog.getChild("cbCJKLanguage")
+ self.assertEqual(get_state_as_dict(xLangFontEast)["Text"], "[None]")
+
+ select_pos(xNoteBook, "1")
+ xSizeFontCTL = xDialog.getChild("cbCTLSize")
self.assertEqual(get_state_as_dict(xSizeFontCTL)["Text"], "18 pt") #check font size
- self.assertEqual(get_state_as_dict(xLangFont)["Text"], "[None]")
- self.assertEqual(get_state_as_dict(xLangFontEast)["SelectEntryText"], "[None]")
- self.assertEqual(get_state_as_dict(xLangFontCTL)["SelectEntryText"], "[None]")
+ xLangFontCTL = xDialog.getChild("cbCTLLanguage")
+ self.assertEqual(get_state_as_dict(xLangFontCTL)["Text"], "[None]")
diff --git a/sc/qa/uitest/calc_tests3/clearCells.py b/sc/qa/uitest/calc_tests3/clearCells.py
index 45f161259f97..a94f2c174f38 100644
--- a/sc/qa/uitest/calc_tests3/clearCells.py
+++ b/sc/qa/uitest/calc_tests3/clearCells.py
@@ -216,7 +216,7 @@ class clearCells(UITestCase):
xTabs = xDialog.getChild("tabcontrol")
select_pos(xTabs, "1") #tab Font
- xstylelb = xDialog.getChild("weststylelb-cjk")
+ xstylelb = xDialog.getChild("cbWestStyle")
self.assertEqual(get_state_as_dict(xstylelb)["Text"], "Regular")
def test_clear_cells_all(self):
diff --git a/sc/qa/uitest/calc_tests8/tdf126248.py b/sc/qa/uitest/calc_tests8/tdf126248.py
index 2879172ab01b..dce58b03bbba 100644
--- a/sc/qa/uitest/calc_tests8/tdf126248.py
+++ b/sc/qa/uitest/calc_tests8/tdf126248.py
@@ -59,8 +59,8 @@ class tdf126248(UITestCase):
select_pos(xTabs, "1")
# Get current font names from the Format Cell dialog
- westFontName = get_state_as_dict(xDialog.getChild("westfontnamelb-cjk"))['Text']
- eastFontName = get_state_as_dict(xDialog.getChild("eastfontnamelb"))['Text']
+ westFontName = get_state_as_dict(xDialog.getChild("edWestFontName"))['Text']
+ eastFontName = get_state_as_dict(xDialog.getChild("edCJKFontName"))['Text']
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")