From 081b753d4cb4f4a25073ca7de12a7bdaa9fc2be4 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 13 Feb 2019 18:32:31 +0100 Subject: sw btlr writing mode: add UI for this There was only horizontal and vertical previously, so keep things simple and talk about the BT and TB version of vertical, not mentioning the LR/RL aspect. Also rename the textdirection widget, so it's unique not only within the tab page, but inside the dialog, so we can have uitest coverage for this. Change-Id: Ie396898fde03aca6cd37a29f049099fa4b2c5fc0 Reviewed-on: https://gerrit.libreoffice.org/67789 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/qa/uitest/table/tableProperties.py | 12 ++++++------ sw/source/ui/table/tabledlg.cxx | 2 +- sw/uiconfig/swriter/ui/tabletextflowpage.ui | 7 ++++--- 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'sw') diff --git a/sw/qa/uitest/table/tableProperties.py b/sw/qa/uitest/table/tableProperties.py index 009a807aa4b0..882ae0976ab2 100644 --- a/sw/qa/uitest/table/tableProperties.py +++ b/sw/qa/uitest/table/tableProperties.py @@ -121,10 +121,10 @@ class tableProperties(UITestCase): keep.executeAction("CLICK", tuple()) headline = xDialog.getChild("headline") headline.executeAction("CLICK", tuple()) -# textdirection = xDialog.getChild("textdirection") #the name of the ui item is not unique -# props = {"TEXT": "Vertical"} -# actionProps = mkPropertyValues(props) -# textdirection.executeAction("SELECT", actionProps) + textdirection = xDialog.getChild("textorientation") + props = {"TEXT": "Vertical (bottom to top)"} + actionProps = mkPropertyValues(props) + textdirection.executeAction("SELECT", actionProps) vertorient = xDialog.getChild("vertorient") props2 = {"TEXT": "Bottom"} actionProps2 = mkPropertyValues(props2) @@ -147,8 +147,8 @@ class tableProperties(UITestCase): self.assertEqual(get_state_as_dict(keep)["Selected"], "true") headline = xDialog.getChild("headline") self.assertEqual(get_state_as_dict(headline)["Selected"], "true") -# textdirection = xDialog.getChild("textdirection") -# self.assertEqual(get_state_as_dict(textdirection)["SelectEntryText"], "Vertical") + textdirection = xDialog.getChild("textorientation") + self.assertEqual(get_state_as_dict(textdirection)["SelectEntryText"], "Vertical (bottom to top)") vertorient = xDialog.getChild("vertorient") self.assertEqual(get_state_as_dict(vertorient)["SelectEntryText"], "Bottom") xOKBtn = xDialog.getChild("ok") diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 3a4f5463b962..88cf8e2d0e11 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1226,7 +1226,7 @@ SwTextFlowPage::SwTextFlowPage(TabPageParent pParent, const SfxItemSet& rSet) , m_xHeadLineCB(m_xBuilder->weld_check_button("headline")) , m_xRepeatHeaderCombo(m_xBuilder->weld_widget("repeatheader")) , m_xRepeatHeaderNF(m_xBuilder->weld_spin_button("repeatheadernf")) - , m_xTextDirectionLB(m_xBuilder->weld_combo_box("textdirection")) + , m_xTextDirectionLB(m_xBuilder->weld_combo_box("textorientation")) , m_xVertOrientLB(m_xBuilder->weld_combo_box("vertorient")) { m_xPgBrkCB->connect_toggled(LINK(this, SwTextFlowPage, PageBreakHdl_Impl)); diff --git a/sw/uiconfig/swriter/ui/tabletextflowpage.ui b/sw/uiconfig/swriter/ui/tabletextflowpage.ui index 6ac2c41ab08e..ef46e8eafc96 100644 --- a/sw/uiconfig/swriter/ui/tabletextflowpage.ui +++ b/sw/uiconfig/swriter/ui/tabletextflowpage.ui @@ -283,7 +283,7 @@ False Text _orientation True - textdirection + textorientation 0 @@ -291,13 +291,14 @@ - + True False Horizontal - Vertical + Vertical (top to bottom) Use superordinate object settings + Vertical (bottom to top) -- cgit