sw/source/ui/config/optpage.cxx | 59 +++++ sw/source/uibase/inc/optpage.hxx | 12 + sw/uiconfig/swriter/ui/optredlinepage.ui | 310 +++++++++++++++---------------- sw/uiconfig/swriter/ui/opttablepage.ui | 229 ++++++++++++++++++++-- 4 files changed, 421 insertions(+), 189 deletions(-)
New commits: commit 164596c00b4361b5b378609f026a1b11ac653970 Author: Balazs Varga <[email protected]> AuthorDate: Tue Nov 14 12:13:21 2023 +0100 Commit: Balazs Varga <[email protected]> CommitDate: Tue Nov 14 19:46:41 2023 +0100 resave with newer glade version Change-Id: I2679c9f59b351d9e3db9121d42d9e8c2948ac641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159413 Tested-by: Jenkins Reviewed-by: Balazs Varga <[email protected]> diff --git a/sw/uiconfig/swriter/ui/optredlinepage.ui b/sw/uiconfig/swriter/ui/optredlinepage.ui index f01c85075a5f..255bf2d6e851 100644 --- a/sw/uiconfig/swriter/ui/optredlinepage.ui +++ b/sw/uiconfig/swriter/ui/optredlinepage.ui @@ -1,64 +1,64 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.38.2 --> <interface domain="sw"> <requires lib="gtk+" version="3.20"/> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=4 --> <object class="GtkGrid" id="OptRedLinePage"> <property name="visible">True</property> - <property name="can_focus">False</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="row_spacing">12</property> + <property name="border-width">6</property> + <property name="row-spacing">12</property> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=3 n-rows=2 --> <object class="GtkGrid" id="grid3"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="hexpand">True</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="insert_label"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|insert_label">_Attributes:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">insert</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">insert</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="insertcolor_label"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|insertcolor_label">Co_lor:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">insertcolor</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">insertcolor</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkComboBoxText" id="insert"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <items> <item translatable="yes" context="optredlinepage|insert">[None]</item> @@ -80,19 +80,18 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkMenuButton" id="insertcolor"> - <property name="label" translatable="no"></property> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="receives_default">False</property> + <property name="can-focus">False</property> + <property name="receives-default">False</property> <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child> <placeholder/> </child> @@ -104,26 +103,26 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="insertedpreview"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> </object> </child> @@ -131,8 +130,8 @@ </child> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> + <property name="left-attach">2</property> + <property name="top-attach">0</property> <property name="height">2</property> </packing> </child> @@ -141,7 +140,7 @@ <child type="label"> <object class="GtkLabel" id="label2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|label2">Insertions</property> <property name="xalign">0</property> <attributes> @@ -151,59 +150,59 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkFrame" id="frame3"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=3 n-rows=2 --> <object class="GtkGrid" id="grid4"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="hexpand">True</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="deleted_label"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|deleted_label">Attri_butes:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">deleted</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">deleted</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="deletedcolor_label"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|deletedcolor_label">Col_or:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">deletedcolor</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">deletedcolor</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkComboBoxText" id="deleted"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <child internal-child="accessible"> <object class="AtkObject" id="deleted-atkobject"> @@ -212,19 +211,18 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkMenuButton" id="deletedcolor"> - <property name="label" translatable="no"></property> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="receives_default">False</property> + <property name="can-focus">False</property> + <property name="receives-default">False</property> <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child> <placeholder/> </child> @@ -236,26 +234,26 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="deletedpreview"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> </object> </child> @@ -263,8 +261,8 @@ </child> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> + <property name="left-attach">2</property> + <property name="top-attach">0</property> <property name="height">2</property> </packing> </child> @@ -273,7 +271,7 @@ <child type="label"> <object class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|label3">Deletions</property> <property name="xalign">0</property> <attributes> @@ -283,59 +281,59 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkFrame" id="frame4"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=3 n-rows=2 --> <object class="GtkGrid" id="grid5"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="hexpand">True</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="changed_label"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|changed_label">Attrib_utes:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">changed</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">changed</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="changedcolor_label"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|changedcolor_label">Colo_r:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">changedcolor</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">changedcolor</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkComboBoxText" id="changed"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <child internal-child="accessible"> <object class="AtkObject" id="changed-atkobject"> @@ -344,19 +342,18 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkMenuButton" id="changedcolor"> - <property name="label" translatable="no"></property> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="receives_default">False</property> + <property name="can-focus">False</property> + <property name="receives-default">False</property> <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child> <placeholder/> </child> @@ -368,26 +365,26 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="changedpreview"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> </object> </child> @@ -395,8 +392,8 @@ </child> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> + <property name="left-attach">2</property> + <property name="top-attach">0</property> <property name="height">2</property> </packing> </child> @@ -405,7 +402,7 @@ <child type="label"> <object class="GtkLabel" id="label4"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|label4">Changed Attributes</property> <property name="xalign">0</property> <attributes> @@ -415,36 +412,35 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkFrame" id="frame2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=3 n-rows=2 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="hexpand">True</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkMenuButton" id="markcolor"> - <property name="label" translatable="no"></property> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="receives_default">False</property> + <property name="can-focus">False</property> + <property name="receives-default">False</property> <property name="hexpand">True</property> <property name="xalign">0</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <child> <placeholder/> </child> @@ -456,54 +452,54 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkLabel" id="markpos_label"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|markpos_label">Mar_k:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">markpos</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">markpos</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="markcolor_label"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|markcolor_label">_Color:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">markcolor</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">markcolor</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="markpreview"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> </object> </child> @@ -511,15 +507,15 @@ </child> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> + <property name="left-attach">2</property> + <property name="top-attach">0</property> <property name="height">2</property> </packing> </child> <child> <object class="GtkComboBoxText" id="markpos"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">center</property> <items> <item translatable="yes" context="optredlinepage|markpos">[None]</item> @@ -535,8 +531,8 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -544,7 +540,7 @@ <child type="label"> <object class="GtkLabel" id="label5"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="optredlinepage|label5">Lines Changed</property> <attributes> <attribute name="weight" value="bold"/> @@ -553,8 +549,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="left-attach">0</property> + <property name="top-attach">3</property> </packing> </child> <child internal-child="accessible"> commit c265b9b4bb419dcb7e4c2d8a2529b469373cce91 Author: Balazs Varga <[email protected]> AuthorDate: Tue Nov 14 11:24:18 2023 +0100 Commit: Balazs Varga <[email protected]> CommitDate: Tue Nov 14 19:46:27 2023 +0100 tdf#158131 - UI: Part 27 - Unify lockdown behavior of Options dialog for Writer - Table Page. Change-Id: Ic2fbec7dd5520a48bb1b6bf85a2277268cf36611 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159405 Tested-by: Jenkins Reviewed-by: Balazs Varga <[email protected]> diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 6688ae783581..7b37e90a953c 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1259,19 +1259,31 @@ SwTableOptionsTabPage::SwTableOptionsTabPage(weld::Container* pPage, weld::Dialo , m_pWrtShell(nullptr) , m_bHTMLMode(false) , m_xHeaderCB(m_xBuilder->weld_check_button("header")) + , m_xHeaderImg(m_xBuilder->weld_widget("lockheader")) , m_xRepeatHeaderCB(m_xBuilder->weld_check_button("repeatheader")) + , m_xRepeatHeaderImg(m_xBuilder->weld_widget("lockrepeatheader")) , m_xDontSplitCB(m_xBuilder->weld_check_button("dontsplit")) + , m_xDontSplitImg(m_xBuilder->weld_widget("lockdontsplit")) , m_xBorderCB(m_xBuilder->weld_check_button("border")) + , m_xBorderImg(m_xBuilder->weld_widget("lockborder")) , m_xNumFormattingCB(m_xBuilder->weld_check_button("numformatting")) + , m_xNumFormattingImg(m_xBuilder->weld_widget("locknumformatting")) , m_xNumFormatFormattingCB(m_xBuilder->weld_check_button("numfmtformatting")) + , m_xNumFormatFormattingImg(m_xBuilder->weld_widget("locknumfmtformatting")) , m_xNumAlignmentCB(m_xBuilder->weld_check_button("numalignment")) + , m_xNumAlignmentImg(m_xBuilder->weld_widget("locknumalignment")) , m_xRowMoveMF(m_xBuilder->weld_metric_spin_button("rowmove", FieldUnit::CM)) + , m_xRowMoveImg(m_xBuilder->weld_widget("lockrowmove")) , m_xColMoveMF(m_xBuilder->weld_metric_spin_button("colmove", FieldUnit::CM)) + , m_xColMoveImg(m_xBuilder->weld_widget("lockcolmove")) , m_xRowInsertMF(m_xBuilder->weld_metric_spin_button("rowinsert", FieldUnit::CM)) + , m_xRowInsertImg(m_xBuilder->weld_widget("lockrowinsert")) , m_xColInsertMF(m_xBuilder->weld_metric_spin_button("colinsert", FieldUnit::CM)) + , m_xColInsertImg(m_xBuilder->weld_widget("lockcolinsert")) , m_xFixRB(m_xBuilder->weld_radio_button("fix")) , m_xFixPropRB(m_xBuilder->weld_radio_button("fixprop")) , m_xVarRB(m_xBuilder->weld_radio_button("var")) + , m_xBehaviorOfImg(m_xBuilder->weld_widget("lockbehaviorof")) { Link<weld::Toggleable&,void> aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl)); m_xNumFormattingCB->connect_toggled(aLnk); @@ -1423,9 +1435,20 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) } m_xRowMoveMF->set_value(m_xRowMoveMF->normalize(pModOpt->GetTableHMove()), FieldUnit::TWIP); + m_xRowMoveMF->set_sensitive(!officecfg::Office::Writer::Table::Shift::Row::isReadOnly()); + m_xRowMoveImg->set_visible(officecfg::Office::Writer::Table::Shift::Row::isReadOnly()); + m_xColMoveMF->set_value(m_xColMoveMF->normalize(pModOpt->GetTableVMove()), FieldUnit::TWIP); + m_xColMoveMF->set_sensitive(!officecfg::Office::Writer::Table::Shift::Column::isReadOnly()); + m_xColMoveImg->set_visible(officecfg::Office::Writer::Table::Shift::Column::isReadOnly()); + m_xRowInsertMF->set_value(m_xRowInsertMF->normalize(pModOpt->GetTableHInsert()), FieldUnit::TWIP); + m_xRowInsertMF->set_sensitive(!officecfg::Office::Writer::Table::Insert::Row::isReadOnly()); + m_xRowInsertImg->set_visible(officecfg::Office::Writer::Table::Insert::Row::isReadOnly()); + m_xColInsertMF->set_value(m_xColInsertMF->normalize(pModOpt->GetTableVInsert()), FieldUnit::TWIP); + m_xColInsertMF->set_sensitive(!officecfg::Office::Writer::Table::Insert::Column::isReadOnly()); + m_xColInsertImg->set_visible(officecfg::Office::Writer::Table::Insert::Column::isReadOnly()); switch(pModOpt->GetTableMode()) { @@ -1445,17 +1468,44 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) m_xDontSplitCB->hide(); } + if (officecfg::Office::Writer::Table::Change::Effect::isReadOnly()) + { + m_xFixRB->set_sensitive(false); + m_xFixPropRB->set_sensitive(false); + m_xVarRB->set_sensitive(false); + m_xBehaviorOfImg->set_visible(true); + } + SwInsertTableOptions aInsOpts = pModOpt->GetInsTableFlags(m_bHTMLMode); const SwInsertTableFlags nInsTableFlags = aInsOpts.mnInsMode; m_xHeaderCB->set_active(bool(nInsTableFlags & SwInsertTableFlags::Headline)); + m_xHeaderCB->set_sensitive(!officecfg::Office::Writer::Insert::Table::Header::isReadOnly()); + m_xHeaderImg->set_visible(officecfg::Office::Writer::Insert::Table::Header::isReadOnly()); + m_xRepeatHeaderCB->set_active((!m_bHTMLMode) && (aInsOpts.mnRowsToRepeat > 0)); + m_xRepeatHeaderCB->set_sensitive(!officecfg::Office::Writer::Insert::Table::RepeatHeader::isReadOnly()); + m_xRepeatHeaderImg->set_visible(officecfg::Office::Writer::Insert::Table::RepeatHeader::isReadOnly()); + m_xDontSplitCB->set_active(!(nInsTableFlags & SwInsertTableFlags::SplitLayout)); + m_xDontSplitCB->set_sensitive(!officecfg::Office::Writer::Insert::Table::Split::isReadOnly()); + m_xDontSplitImg->set_visible(officecfg::Office::Writer::Insert::Table::Split::isReadOnly()); + m_xBorderCB->set_active(bool(nInsTableFlags & SwInsertTableFlags::DefaultBorder)); + m_xBorderCB->set_sensitive(!officecfg::Office::Writer::Insert::Table::Border::isReadOnly()); + m_xBorderImg->set_visible(officecfg::Office::Writer::Insert::Table::Border::isReadOnly()); m_xNumFormattingCB->set_active(pModOpt->IsInsTableFormatNum(m_bHTMLMode)); + m_xNumFormattingCB->set_sensitive(!officecfg::Office::Writer::Table::Input::NumberRecognition::isReadOnly()); + m_xNumFormattingImg->set_visible(officecfg::Office::Writer::Table::Input::NumberRecognition::isReadOnly()); + m_xNumFormatFormattingCB->set_active(pModOpt->IsInsTableChangeNumFormat(m_bHTMLMode)); + m_xNumFormatFormattingCB->set_sensitive(!officecfg::Office::Writer::Table::Input::NumberFormatRecognition::isReadOnly()); + m_xNumFormatFormattingImg->set_visible(officecfg::Office::Writer::Table::Input::NumberFormatRecognition::isReadOnly()); + m_xNumAlignmentCB->set_active(pModOpt->IsInsTableAlignNum(m_bHTMLMode)); + m_xNumAlignmentCB->set_sensitive(!officecfg::Office::Writer::Table::Input::Alignment::isReadOnly()); + m_xNumAlignmentImg->set_visible(officecfg::Office::Writer::Table::Input::Alignment::isReadOnly()); m_xHeaderCB->save_state(); m_xRepeatHeaderCB->save_state(); @@ -1474,9 +1524,12 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) IMPL_LINK_NOARG(SwTableOptionsTabPage, CheckBoxHdl, weld::Toggleable&, void) { - m_xNumFormatFormattingCB->set_sensitive(m_xNumFormattingCB->get_active()); - m_xNumAlignmentCB->set_sensitive(m_xNumFormattingCB->get_active()); - m_xRepeatHeaderCB->set_sensitive(m_xHeaderCB->get_active()); + m_xNumFormatFormattingCB->set_sensitive(m_xNumFormattingCB->get_active() && + !officecfg::Office::Writer::Table::Input::NumberFormatRecognition::isReadOnly()); + m_xNumAlignmentCB->set_sensitive(m_xNumFormattingCB->get_active() && + !officecfg::Office::Writer::Table::Input::Alignment::isReadOnly()); + m_xRepeatHeaderCB->set_sensitive(m_xHeaderCB->get_active() && + !officecfg::Office::Writer::Insert::Table::RepeatHeader::isReadOnly()); } void SwTableOptionsTabPage::PageCreated( const SfxAllItemSet& aSet) diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index dd8bd93c269b..6020b98eb988 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -226,23 +226,35 @@ class SwTableOptionsTabPage final : public SfxTabPage bool m_bHTMLMode; std::unique_ptr<weld::CheckButton> m_xHeaderCB; + std::unique_ptr<weld::Widget> m_xHeaderImg; std::unique_ptr<weld::CheckButton> m_xRepeatHeaderCB; + std::unique_ptr<weld::Widget> m_xRepeatHeaderImg; std::unique_ptr<weld::CheckButton> m_xDontSplitCB; + std::unique_ptr<weld::Widget> m_xDontSplitImg; std::unique_ptr<weld::CheckButton> m_xBorderCB; + std::unique_ptr<weld::Widget> m_xBorderImg; std::unique_ptr<weld::CheckButton> m_xNumFormattingCB; + std::unique_ptr<weld::Widget> m_xNumFormattingImg; std::unique_ptr<weld::CheckButton> m_xNumFormatFormattingCB; + std::unique_ptr<weld::Widget> m_xNumFormatFormattingImg; std::unique_ptr<weld::CheckButton> m_xNumAlignmentCB; + std::unique_ptr<weld::Widget> m_xNumAlignmentImg; std::unique_ptr<weld::MetricSpinButton> m_xRowMoveMF; + std::unique_ptr<weld::Widget> m_xRowMoveImg; std::unique_ptr<weld::MetricSpinButton> m_xColMoveMF; + std::unique_ptr<weld::Widget> m_xColMoveImg; std::unique_ptr<weld::MetricSpinButton> m_xRowInsertMF; + std::unique_ptr<weld::Widget> m_xRowInsertImg; std::unique_ptr<weld::MetricSpinButton> m_xColInsertMF; + std::unique_ptr<weld::Widget> m_xColInsertImg; std::unique_ptr<weld::RadioButton> m_xFixRB; std::unique_ptr<weld::RadioButton> m_xFixPropRB; std::unique_ptr<weld::RadioButton> m_xVarRB; + std::unique_ptr<weld::Widget> m_xBehaviorOfImg; DECL_LINK(CheckBoxHdl, weld::Toggleable&, void); diff --git a/sw/uiconfig/swriter/ui/opttablepage.ui b/sw/uiconfig/swriter/ui/opttablepage.ui index b87c655c439a..809f6300363d 100644 --- a/sw/uiconfig/swriter/ui/opttablepage.ui +++ b/sw/uiconfig/swriter/ui/opttablepage.ui @@ -46,7 +46,7 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=4 --> + <!-- n-columns=2 n-rows=4 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -70,7 +70,7 @@ </child> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">0</property> </packing> </child> @@ -90,7 +90,7 @@ </child> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">1</property> </packing> </child> @@ -109,7 +109,7 @@ </child> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">2</property> </packing> </child> @@ -127,6 +127,58 @@ </object> </child> </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">3</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockheader"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockrepeatheader"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockdontsplit"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockborder"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> <packing> <property name="left-attach">0</property> <property name="top-attach">3</property> @@ -159,7 +211,7 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=3 --> + <!-- n-columns=2 n-rows=3 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -183,7 +235,7 @@ </child> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">0</property> </packing> </child> @@ -203,7 +255,7 @@ </child> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">1</property> </packing> </child> @@ -222,6 +274,45 @@ </object> </child> </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkImage" id="locknumformatting"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkImage" id="locknumfmtformatting"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkImage" id="locknumalignment"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> <packing> <property name="left-attach">0</property> <property name="top-attach">2</property> @@ -273,7 +364,7 @@ <property name="row-spacing">12</property> <property name="column-spacing">12</property> <child> - <!-- n-columns=2 n-rows=4 --> + <!-- n-columns=3 n-rows=4 --> <object class="GtkGrid" id="grid5"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -287,7 +378,7 @@ <property name="xalign">0</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">0</property> <property name="width">2</property> </packing> @@ -309,7 +400,7 @@ </child> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">1</property> </packing> </child> @@ -330,7 +421,7 @@ </child> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">2</property> </packing> </child> @@ -351,7 +442,7 @@ </child> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">3</property> </packing> </child> @@ -367,11 +458,11 @@ <property name="max-width-chars">50</property> <property name="xalign">0</property> <attributes> - <attribute name="scale" value="0.9"/> + <attribute name="scale" value="0.90000000000000002"/> </attributes> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">2</property> <property name="top-attach">1</property> </packing> </child> @@ -386,11 +477,11 @@ <property name="max-width-chars">50</property> <property name="xalign">0</property> <attributes> - <attribute name="scale" value="0.9"/> + <attribute name="scale" value="0.90000000000000002"/> </attributes> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">2</property> <property name="top-attach">2</property> </packing> </child> @@ -405,14 +496,36 @@ <property name="max-width-chars">50</property> <property name="xalign">0</property> <attributes> - <attribute name="scale" value="0.9"/> + <attribute name="scale" value="0.90000000000000002"/> </attributes> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">2</property> <property name="top-attach">3</property> </packing> </child> + <child> + <object class="GtkImage" id="lockbehaviorof"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="left-attach">0</property> @@ -427,7 +540,7 @@ <property name="spacing">12</property> <property name="homogeneous">True</property> <child> - <!-- n-columns=2 n-rows=3 --> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="grid4"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -444,7 +557,7 @@ <property name="xalign">0</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">0</property> <property name="width">2</property> </packing> @@ -464,7 +577,7 @@ </child> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">2</property> <property name="top-attach">1</property> </packing> </child> @@ -483,7 +596,7 @@ </child> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">2</property> <property name="top-attach">2</property> </packing> </child> @@ -498,7 +611,7 @@ <property name="xalign">0</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">1</property> </packing> </child> @@ -512,11 +625,40 @@ <property name="mnemonic-widget">colmove</property> <property name="xalign">0</property> </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockrowmove"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockcolmove"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> <packing> <property name="left-attach">0</property> <property name="top-attach">2</property> </packing> </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="expand">False</property> @@ -525,7 +667,7 @@ </packing> </child> <child> - <!-- n-columns=2 n-rows=3 --> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="grid6"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -549,7 +691,7 @@ </child> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">2</property> <property name="top-attach">1</property> </packing> </child> @@ -568,7 +710,7 @@ </child> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">2</property> <property name="top-attach">2</property> </packing> </child> @@ -583,7 +725,7 @@ <property name="xalign">0</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">1</property> </packing> </child> @@ -598,7 +740,7 @@ <property name="xalign">0</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">2</property> </packing> </child> @@ -610,11 +752,40 @@ <property name="xalign">0</property> </object> <packing> - <property name="left-attach">0</property> + <property name="left-attach">1</property> <property name="top-attach">0</property> <property name="width">2</property> </packing> </child> + <child> + <object class="GtkImage" id="lockrowinsert"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkImage" id="lockcolinsert"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="expand">False</property>
