sw/uiconfig/swriter/ui/indexentry.ui | 117 ++++++++++++++++------------------- vcl/qt5/QtInstanceBuilder.cxx | 1 2 files changed, 56 insertions(+), 62 deletions(-)
New commits: commit 3a4b929aeba8d5a9849d468c3d8dc314923c6104 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Feb 17 12:45:56 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Feb 17 18:35:45 2026 +0100 tdf#130857 sw: Drop deprecated GtkAlignment in indexentry.ui GtkAlignment was deprecated in GTK 3.14 [1]. Drop it. Instead, the margin could be set for the child widget here, but (at least with gtk3) the content of the "For Selected Entry" frame is already overindented as compared to dialog content above that frame. Therefore, just remove it without changing the child widget properties. To trigger the dialog: * start Writer * "Insert" -> "Table of Contents" and Index" -> "Index Entry..." This fixes a crash/assertion seen with the gtk4 VCL plugin where GtkAlignment isn't supported any more: warn:vcl.gtk:3362900:3362900:vcl/unx/gtk4/convert3to4.cxx:1614: GtkInstanceBuilder: error when calling gtk_builder_add_from_string: .:447:1 Invalid object type 'GtkAlignment' soffice.bin: /home/michi/development/git/libreoffice/vcl/unx/gtk4/convert3to4.cxx:1617: void builder_add_from_gtk3_file(GtkBuilder *, const OUString &): Assertion `rc && "could not load UI file"' failed. It also fixes an assertion seen with the qt6 VCL plugin and SAL_VCL_QT_USE_WELDED_WIDGETS=1 in a WIP branch enabling support for native Qt widgets for this dialog. (`git show --ignore-space-change` can help to see the "actual change" more easily.) [1] https://docs.gtk.org/gtk3/class.Alignment.html Change-Id: I633a4a42cd3573ef8080e3e52bc4e5d8d35a6d67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199543 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/sw/uiconfig/swriter/ui/indexentry.ui b/sw/uiconfig/swriter/ui/indexentry.ui index 9aad2aa444d8..8c55d911e1e9 100644 --- a/sw/uiconfig/swriter/ui/indexentry.ui +++ b/sw/uiconfig/swriter/ui/indexentry.ui @@ -510,73 +510,66 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <object class="GtkAlignment"> + <!-- n-columns=1 n-rows=3 --> + <object class="GtkGrid" id="selectedentrygrid"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="left-padding">12</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">6</property> <child> - <!-- n-columns=1 n-rows=3 --> - <object class="GtkGrid" id="selectedentrygrid"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="margin-start">12</property> - <property name="margin-top">6</property> - <property name="row-spacing">6</property> - <property name="column-spacing">6</property> - <child> - <object class="GtkCheckButton" id="applytoallcb"> - <property name="label" translatable="yes" context="indexentry|applytoallcb">Apply to all other occurrences</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="no-show-all">True</property> - <property name="tooltip-text" translatable="yes" context="indexentry|applytoallcb|tooltip_text">Add an index entry to any other occurrences of the text selected into “Entry”.</property> - <property name="halign">start</property> - <property name="use-underline">True</property> - <property name="draw-indicator">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="applytoallcb-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="indexentry|extended_tip|applytoallcb">Add an index entry to any other occurrences of the text selected into “Entry”. For a modified entry, the match is conducted on the original selection, but the modified entry is inserted, and will appear in the index.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="searchcasewordonlycb"> - <property name="label" translatable="yes" context="indexentry|searchcasewordonlycb">Whole words only</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="no-show-all">True</property> - <property name="halign">start</property> - <property name="margin-start">18</property> - <property name="use-underline">True</property> - <property name="draw-indicator">True</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="searchcasesensitivecb"> - <property name="label" translatable="yes" context="indexentry|searchcasesensitivecb">Match case</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="no-show-all">True</property> - <property name="halign">start</property> - <property name="margin-start">18</property> - <property name="use-underline">True</property> - <property name="draw-indicator">True</property> + <object class="GtkCheckButton" id="applytoallcb"> + <property name="label" translatable="yes" context="indexentry|applytoallcb">Apply to all other occurrences</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="no-show-all">True</property> + <property name="tooltip-text" translatable="yes" context="indexentry|applytoallcb|tooltip_text">Add an index entry to any other occurrences of the text selected into “Entry”.</property> + <property name="halign">start</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="applytoallcb-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="indexentry|extended_tip|applytoallcb">Add an index entry to any other occurrences of the text selected into “Entry”. For a modified entry, the match is conducted on the original selection, but the modified entry is inserted, and will appear in the index.</property> </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">2</property> - </packing> </child> </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="searchcasewordonlycb"> + <property name="label" translatable="yes" context="indexentry|searchcasewordonlycb">Whole words only</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="no-show-all">True</property> + <property name="halign">start</property> + <property name="margin-start">18</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="searchcasesensitivecb"> + <property name="label" translatable="yes" context="indexentry|searchcasesensitivecb">Match case</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="no-show-all">True</property> + <property name="halign">start</property> + <property name="margin-start">18</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> </child> </object> </child> @@ -724,8 +717,8 @@ <action-widgets> <action-widget response="-7">close</action-widget> <action-widget response="101">delete</action-widget> - <action-widget response="102">insert</action-widget> <action-widget response="103">reset</action-widget> + <action-widget response="102">insert</action-widget> <action-widget response="-11">help</action-widget> </action-widgets> <child internal-child="accessible"> commit 114ebca590311da66b4556e384842334f95b32ea Author: Michael Weghorn <[email protected]> AuthorDate: Tue Feb 17 11:59:30 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Feb 17 18:35:36 2026 +0100 tdf#130857 qt weld: Support "New User-defined Index" dialog This means that native Qt widgets are used for that dialog now when using the qt5 or qt6 VCL plugin and starting LO with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. The dialog can be triggered like this: * start Writer * "Insert" -> "Table of Contents" and Index" -> "Index Entry..." * press the "New User-defined Index" button Change-Id: I5450dd3d8289322eed53eed9cfc382058ff87fc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199542 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 8ade7427be00..9072591b5334 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -214,6 +214,7 @@ constexpr auto SUPPORTED_UI_FILES = frozen::make_unordered_set<std::u16string_vi u"modules/swriter/ui/inserttable.ui", u"modules/swriter/ui/labeldialog.ui", u"modules/swriter/ui/linenumbering.ui", + u"modules/swriter/ui/newuserindexdialog.ui", u"modules/swriter/ui/numberingnamedialog.ui", u"modules/swriter/ui/outlinenumbering.ui", u"modules/swriter/ui/pagenumberdlg.ui",
