Kaydet (Commit) 081b753d authored tarafından Miklos Vajna's avatar Miklos Vajna

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/67789Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
üst dc32f930
......@@ -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")
......
......@@ -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));
......
......@@ -283,7 +283,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="tabletextflowpage|label40">Text _orientation</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">textdirection</property>
<property name="mnemonic_widget">textorientation</property>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -291,13 +291,14 @@
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="textdirection">
<object class="GtkComboBoxText" id="textorientation">
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
<item id="0" translatable="yes" context="tabletextflowpage|liststore1">Horizontal</item>
<item id="2" translatable="yes" context="tabletextflowpage|liststore1">Vertical</item>
<item id="2" translatable="yes" context="tabletextflowpage|liststore1">Vertical (top to bottom)</item>
<item id="4" translatable="yes" context="tabletextflowpage|liststore1">Use superordinate object settings</item>
<item id="5" translatable="yes" context="tabletextflowpage|liststore1">Vertical (bottom to top)</item>
</items>
</object>
<packing>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment