sw/source/ui/index/swuiidxmrk.cxx | 60 ++---- sw/uiconfig/swriter/ui/tablecolumnpage.ui | 268 +++++++++++++++--------------- 2 files changed, 158 insertions(+), 170 deletions(-)
New commits: commit 1a66faa674e4ef953cfdb17f9be610e6f567adcc Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Dec 16 23:11:09 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Dec 17 22:55:57 2024 +0100 sw: Resave tablecolumnpage.ui with glade 3.40 Change-Id: I671a272f60dfd12325f760681cb3c6f988467c03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178635 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sw/uiconfig/swriter/ui/tablecolumnpage.ui b/sw/uiconfig/swriter/ui/tablecolumnpage.ui index d9dca74f260d..3122ad2cdb37 100644 --- a/sw/uiconfig/swriter/ui/tablecolumnpage.ui +++ b/sw/uiconfig/swriter/ui/tablecolumnpage.ui @@ -1,75 +1,75 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.40.0 --> <interface domain="sw"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustment1"> <property name="upper">56</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment2"> <property name="lower">0.01</property> <property name="upper">56</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment3"> <property name="lower">0.01</property> <property name="upper">56</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment4"> <property name="lower">0.01</property> <property name="upper">56</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment5"> <property name="lower">0.01</property> <property name="upper">56</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment6"> <property name="lower">0.01</property> <property name="upper">56</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment7"> <property name="lower">0.01</property> <property name="upper">56</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkImage" id="image7"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-previous</property> <property name="icon_size">1</property> </object> <object class="GtkImage" id="image8"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="icon-name">go-next</property> <property name="icon_size">1</property> </object> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=4 --> <object class="GtkGrid" id="TableColumnPage"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="border_width">6</property> - <property name="row_spacing">6</property> + <property name="border-width">6</property> + <property name="row-spacing">6</property> <child> <object class="GtkCheckButton" id="adaptwidth"> <property name="label" translatable="yes" context="tablecolumnpage|adaptwidth">Adapt table _width</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="adaptwidth-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="tablecolumnpage|extended_tip|adaptwidth">Reduces or increases table width with modified column width.</property> @@ -77,18 +77,18 @@ </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="GtkCheckButton" id="adaptcolumns"> <property name="label" translatable="yes" context="tablecolumnpage|adaptcolumns">Ad_just columns proportionally</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> <child internal-child="accessible"> <object class="AtkObject" id="adaptcolumns-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="tablecolumnpage|extended_tip|adaptcolumns">If possible, change in column width will be equal for each column.</property> @@ -96,49 +96,49 @@ </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> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=3 n-rows=1 --> <object class="GtkGrid" id="grid14"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> + <property name="column-spacing">12</property> <child> <object class="GtkLabel" id="spaceft"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="tablecolumnpage|spaceft">Remaining space:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">space</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">space</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="GtkSpinButton" id="spacefmt"> - <property name="can_focus">True</property> - <property name="no_show_all">True</property> - <property name="activates_default">True</property> - <property name="adjustment">adjustment1</property> + <property name="can-focus">True</property> + <property name="no-show-all">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> + <property name="adjustment">adjustment1</property> <property name="digits">2</property> </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> </packing> </child> <child> <object class="GtkLabel" id="space"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="use_underline">True</property> + <property name="use-underline">True</property> <property name="selectable">True</property> <property name="xalign">0</property> <child internal-child="accessible"> @@ -149,43 +149,43 @@ </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> <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="frame7"> <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=12 n-rows=2 --> <object class="GtkGrid" id="grid17"> <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="GtkSpinButton" id="width2"> <property name="sensitive">False</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">center</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment3</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="width2-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="tablecolumnpage|width2-atkobject">Column 2 Width</property> @@ -194,21 +194,21 @@ </child> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">1</property> + <property name="left-attach">2</property> + <property name="top-attach">1</property> <property name="width">2</property> </packing> </child> <child> <object class="GtkSpinButton" id="width3"> <property name="sensitive">False</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">center</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment4</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="width3-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="tablecolumnpage|width3-atkobject">Column 3 Width</property> @@ -217,21 +217,21 @@ </child> </object> <packing> - <property name="left_attach">4</property> - <property name="top_attach">1</property> + <property name="left-attach">4</property> + <property name="top-attach">1</property> <property name="width">2</property> </packing> </child> <child> <object class="GtkSpinButton" id="width4"> <property name="sensitive">False</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">center</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment5</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="width4-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="tablecolumnpage|width4-atkobject">Column 4 Width</property> @@ -240,21 +240,21 @@ </child> </object> <packing> - <property name="left_attach">6</property> - <property name="top_attach">1</property> + <property name="left-attach">6</property> + <property name="top-attach">1</property> <property name="width">2</property> </packing> </child> <child> <object class="GtkSpinButton" id="width5"> <property name="sensitive">False</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">center</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment6</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="width5-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="tablecolumnpage|width5-atkobject">Column 5 Width</property> @@ -263,21 +263,21 @@ </child> </object> <packing> - <property name="left_attach">8</property> - <property name="top_attach">1</property> + <property name="left-attach">8</property> + <property name="top-attach">1</property> <property name="width">2</property> </packing> </child> <child> <object class="GtkSpinButton" id="width6"> <property name="sensitive">False</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">center</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment7</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="width6-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="tablecolumnpage|width6-atkobject">Column 6 Width</property> @@ -286,109 +286,109 @@ </child> </object> <packing> - <property name="left_attach">10</property> - <property name="top_attach">1</property> + <property name="left-attach">10</property> + <property name="top-attach">1</property> <property name="width">2</property> </packing> </child> <child> <object class="GtkLabel" id="6"> <property name="sensitive">False</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">_6</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">width6</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">width6</property> </object> <packing> - <property name="left_attach">10</property> - <property name="top_attach">0</property> + <property name="left-attach">10</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="1"> <property name="sensitive">False</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">_1</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">width1</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">width1</property> </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="GtkLabel" id="2"> <property name="sensitive">False</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">_2</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">width2</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">width2</property> </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="width">2</property> </packing> </child> <child> <object class="GtkLabel" id="3"> <property name="sensitive">False</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">_3</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">width3</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">width3</property> </object> <packing> - <property name="left_attach">4</property> - <property name="top_attach">0</property> + <property name="left-attach">4</property> + <property name="top-attach">0</property> <property name="width">2</property> </packing> </child> <child> <object class="GtkLabel" id="5"> <property name="sensitive">False</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">_5</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">width5</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">width5</property> </object> <packing> - <property name="left_attach">8</property> - <property name="top_attach">0</property> + <property name="left-attach">8</property> + <property name="top-attach">0</property> <property name="width">2</property> </packing> </child> <child> <object class="GtkLabel" id="4"> <property name="sensitive">False</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">_4</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">width4</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">width4</property> </object> <packing> - <property name="left_attach">6</property> - <property name="top_attach">0</property> + <property name="left-attach">6</property> + <property name="top-attach">0</property> <property name="width">2</property> </packing> </child> <child> <object class="GtkSpinButton" id="width1"> <property name="sensitive">False</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">center</property> <property name="hexpand">True</property> - <property name="activates_default">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">adjustment2</property> <property name="digits">2</property> - <property name="truncate-multiline">True</property> <child internal-child="accessible"> <object class="AtkObject" id="width1-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="tablecolumnpage|width1-atkobject">Column 1 Width</property> @@ -397,8 +397,8 @@ </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> <property name="width">2</property> </packing> </child> @@ -406,11 +406,11 @@ <object class="GtkButton" id="back"> <property name="visible">True</property> <property name="sensitive">False</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="halign">start</property> <property name="image">image7</property> - <property name="always_show_image">True</property> + <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="back-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="tablecolumnpage|extended_tip|back">Displays the table columns found to the left of the current column.</property> @@ -418,19 +418,19 @@ </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="GtkButton" id="next"> <property name="visible">True</property> <property name="sensitive">False</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="halign">end</property> <property name="image">image8</property> - <property name="always_show_image">True</property> + <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="next-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="tablecolumnpage|extended_tip|next">Displays the table columns found to the right of the current column.</property> @@ -438,8 +438,8 @@ </child> </object> <packing> - <property name="left_attach">11</property> - <property name="top_attach">0</property> + <property name="left-attach">11</property> + <property name="top-attach">0</property> </packing> </child> </object> @@ -447,7 +447,7 @@ <child type="label"> <object class="GtkLabel" id="label26"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="tablecolumnpage|label26">Column Width</property> <attributes> <attribute name="weight" value="bold"/> @@ -456,8 +456,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> </object> commit 3625655191374af9dfdc34caae36f85596b4f785 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Dec 16 23:07:02 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Dec 17 22:55:46 2024 +0100 Port SwCreateAuthEntryDlg_Impl to new weld::Grid API See previous commit Change-Id: I67f5ea16b5108e8359820850f0815e34db439ef1 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Mon Dec 16 11:02:00 2024 +0100 weld: Add weld::Grid to handle grid child positions for more background. Deduplicate the code a bit by introducing a `pTargetGrid` local var that points either to `m_xLeft` or `m_xRight`. This dialog can be triggered in Writer via "Insert" -> "Table of Contents and Index" -> "Bibliography Entry", then clicking the "Edit" button. Change-Id: Ib75c5f1225d9590849f1eaed083857dbe30ce551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178634 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index f8b1a2351aed..cc9b7bc1068e 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1085,14 +1085,14 @@ class SwCreateAuthEntryDlg_Impl : public weld::GenericDialogController bool m_bNewEntryMode; bool m_bNameAllowed; - std::vector<std::unique_ptr<weld::Container>> m_aOrigContainers; + std::vector<std::unique_ptr<weld::Grid>> m_aOrigContainers; std::vector<std::unique_ptr<weld::Label>> m_aFixedTexts; std::unique_ptr<weld::Box> m_pBoxes[AUTH_FIELD_END]; std::unique_ptr<weld::Entry> m_pEdits[AUTH_FIELD_END]; std::unique_ptr<weld::Button> m_xOKBT; std::unique_ptr<weld::Container> m_xBox; - std::unique_ptr<weld::Container> m_xLeft; - std::unique_ptr<weld::Container> m_xRight; + std::unique_ptr<weld::Grid> m_xLeft; + std::unique_ptr<weld::Grid> m_xRight; std::unique_ptr<weld::ComboBox> m_xTypeListBox; std::unique_ptr<weld::ComboBox> m_xIdentifierBox; std::unique_ptr<weld::Button> m_xLocalBrowseButton; @@ -1595,8 +1595,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, , m_bNameAllowed(true) , m_xOKBT(m_xBuilder->weld_button(u"ok"_ustr)) , m_xBox(m_xBuilder->weld_container(u"box"_ustr)) - , m_xLeft(m_xBuilder->weld_container(u"leftgrid"_ustr)) - , m_xRight(m_xBuilder->weld_container(u"rightgrid"_ustr)) + , m_xLeft(m_xBuilder->weld_grid(u"leftgrid"_ustr)) + , m_xRight(m_xBuilder->weld_grid(u"rightgrid"_ustr)) , m_pTargetURLField(nullptr) { bool bLeft = true; @@ -1607,23 +1607,20 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, m_aBuilders.emplace_back(Application::CreateBuilder(m_xBox.get(), u"modules/swriter/ui/bibliofragment.ui"_ustr)); const TextInfo aCurInfo = aTextInfoArr[nIndex]; - m_aOrigContainers.emplace_back(m_aBuilders.back()->weld_container(u"biblioentry"_ustr)); + m_aOrigContainers.emplace_back(m_aBuilders.back()->weld_grid(u"biblioentry"_ustr)); m_aFixedTexts.emplace_back(m_aBuilders.back()->weld_label(u"label"_ustr)); - if (bLeft) - m_aOrigContainers.back()->move(m_aFixedTexts.back().get(), m_xLeft.get()); - else - m_aOrigContainers.back()->move(m_aFixedTexts.back().get(), m_xRight.get()); - m_aFixedTexts.back()->set_grid_left_attach(0); - m_aFixedTexts.back()->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); + + weld::Grid* pTargetGrid = bLeft ? m_xLeft.get() : m_xRight.get(); + m_aOrigContainers.back()->move(m_aFixedTexts.back().get(), pTargetGrid); + pTargetGrid->set_child_left_attach(*m_aFixedTexts.back(), 0); + pTargetGrid->set_child_top_attach(*m_aFixedTexts.back(), bLeft ? nLeftRow : nRightRow); + m_aFixedTexts.back()->set_label(SwResId(STR_AUTH_FIELD_ARY[aCurInfo.nToxField])); m_aFixedTexts.back()->show(); if( AUTH_FIELD_AUTHORITY_TYPE == aCurInfo.nToxField ) { m_xTypeListBox = m_aBuilders.back()->weld_combo_box(u"listbox"_ustr); - if (bLeft) - m_aOrigContainers.back()->move(m_xTypeListBox.get(), m_xLeft.get()); - else - m_aOrigContainers.back()->move(m_xTypeListBox.get(), m_xRight.get()); + m_aOrigContainers.back()->move(m_xTypeListBox.get(), pTargetGrid); for (int j = 0; j < AUTH_TYPE_END; j++) { @@ -1634,8 +1631,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, { m_xTypeListBox->set_active(pFields[aCurInfo.nToxField].toInt32()); } - m_xTypeListBox->set_grid_left_attach(1); - m_xTypeListBox->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); + pTargetGrid->set_child_left_attach(*m_xTypeListBox, 1); + pTargetGrid->set_child_top_attach(*m_xTypeListBox, bLeft ? nLeftRow : nRightRow); m_xTypeListBox->set_hexpand(true); m_xTypeListBox->show(); m_xTypeListBox->connect_changed(LINK(this, SwCreateAuthEntryDlg_Impl, EnableHdl)); @@ -1645,10 +1642,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, else if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField && !m_bNewEntryMode) { m_xIdentifierBox = m_aBuilders.back()->weld_combo_box(u"combobox"_ustr); - if (bLeft) - m_aOrigContainers.back()->move(m_xIdentifierBox.get(), m_xLeft.get()); - else - m_aOrigContainers.back()->move(m_xIdentifierBox.get(), m_xRight.get()); + m_aOrigContainers.back()->move(m_xIdentifierBox.get(), pTargetGrid); m_xIdentifierBox->connect_changed(LINK(this, SwCreateAuthEntryDlg_Impl, IdentifierHdl)); @@ -1663,8 +1657,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, m_xIdentifierBox->append_text(a); } m_xIdentifierBox->set_entry_text(pFields[aCurInfo.nToxField]); - m_xIdentifierBox->set_grid_left_attach(1); - m_xIdentifierBox->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); + pTargetGrid->set_child_left_attach(*m_xIdentifierBox, 1); + pTargetGrid->set_child_top_attach(*m_xIdentifierBox, bLeft ? nLeftRow : nRightRow); m_xIdentifierBox->set_hexpand(true); m_xIdentifierBox->show(); m_xIdentifierBox->set_help_id(aCurInfo.pHelpId); @@ -1673,10 +1667,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, else if (AUTH_FIELD_TARGET_TYPE == aCurInfo.nToxField) { m_xTargetTypeListBox = m_aBuilders.back()->weld_combo_box(u"listbox-target-type"_ustr); - if (bLeft) - m_aOrigContainers.back()->move(m_xTargetTypeListBox.get(), m_xLeft.get()); - else - m_aOrigContainers.back()->move(m_xTargetTypeListBox.get(), m_xRight.get()); + m_aOrigContainers.back()->move(m_xTargetTypeListBox.get(), pTargetGrid); if(!pFields[aCurInfo.nToxField].isEmpty()) { @@ -1687,8 +1678,8 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, // For new documents, set value to "BibliographyTableRow" m_xTargetTypeListBox->set_active(SwAuthorityField::TargetType::BibliographyTableRow); } - m_xTargetTypeListBox->set_grid_left_attach(1); - m_xTargetTypeListBox->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); + pTargetGrid->set_child_left_attach(*m_xTargetTypeListBox, 1); + pTargetGrid->set_child_top_attach(*m_xTargetTypeListBox, bLeft ? nLeftRow : nRightRow); m_xTargetTypeListBox->set_hexpand(true); m_xTargetTypeListBox->show(); m_xTargetTypeListBox->connect_changed(LINK(this, SwCreateAuthEntryDlg_Impl, TargetTypeHdl)); @@ -1708,13 +1699,10 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(weld::Window* pParent, m_xTargetTypeListBox->get_active() == SwAuthorityField::TargetType::UseTargetURL); } - if (bLeft) - m_aOrigContainers.back()->move(m_pBoxes[nIndex].get(), m_xLeft.get()); - else - m_aOrigContainers.back()->move(m_pBoxes[nIndex].get(), m_xRight.get()); + m_aOrigContainers.back()->move(m_pBoxes[nIndex].get(), pTargetGrid); - m_pBoxes[nIndex]->set_grid_left_attach(1); - m_pBoxes[nIndex]->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); + pTargetGrid->set_child_left_attach(*m_pBoxes[nIndex], 1); + pTargetGrid->set_child_top_attach(*m_pBoxes[nIndex], bLeft ? nLeftRow : nRightRow); m_pBoxes[nIndex]->set_hexpand(true); if (aCurInfo.nToxField == AUTH_FIELD_LOCAL_URL) {