sw/inc/strings.hrc | 1 + sw/source/ui/index/swuiidxmrk.cxx | 4 ++-- sw/source/uibase/inc/swuiidxmrk.hxx | 2 +- sw/uiconfig/swriter/ui/indexentry.ui | 4 ++-- vcl/qt5/QtInstanceBuilder.cxx | 1 + 5 files changed, 7 insertions(+), 5 deletions(-)
New commits: commit 436d40928063e86859bccac2171a555697941759 Author: Michael Weghorn <[email protected]> AuthorDate: Tue Feb 17 13:30:53 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Feb 17 18:36:00 2026 +0100 tdf#130857 sw: Don't use GtkFrame's internal label child directly Don't use the GtkFrame's internal label child directly, but use the GtkFrame (weld::Frame) instead: Instead of setting the label to invisible in the .ui file initially and then making it shown, instead always have it visible, but only set the title where the widget would previously set to visible. The motivation is that QtInstanceFrame uses a QGroupBox widget that doesn't use a separate widget for the frame title, but handles that itself. This addresses the issue mentioned in previous commit Change-Id: I566f96fd61acaf2b8220324fba9a2e5c0be8d911 Author: Michael Weghorn <[email protected]> Date: Tue Feb 17 12:54:34 2026 +0100 tdf#130857 qt weld: Support "Insert Index Entry" dialog [...] The dialog can be triggered like this: * start Writer * "Insert" -> "Table of Contents" and Index" -> "Index Entry..." Right now, the dialog has an unexpected "For Selected Entry" text inside of the "For Selected Entry" frame when native Qt widgets are used (but not for gtk3 or gen), but that will be addressed in a separate commit. Change-Id: I8c362070cde07ab67c4db42bdb9671e5fe94a8ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199545 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index eb7ea1afd81c..9bc2d7db19f9 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -755,6 +755,7 @@ #define STR_DELETE_FOOTNOTE NC_("STR_DELETE_FOOTNOTE", "Delete Footnote") #define STR_DELETE_ENDNOTE NC_("STR_DELETE_ENDNOTE", "Delete Endnote") #define STR_DELETE_ENTRY NC_("STR_DELETE_ENTRY", "~Delete") +#define STR_FOR_SELECTED_ENTRY NC_("STR_FOR_SELECTED_ENTRY", "For Selected Entry") #define STR_UPDATE_SEL NC_("STR_UPDATE_SEL", "Selection") #define STR_UPDATE_INDEX NC_("STR_UPDATE_INDEX", "Indexes") #define STR_UPDATE_LINK NC_("STR_UPDATE_LINK", "Links") diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index f88debc6416b..1af59012fdf0 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -175,7 +175,7 @@ SwIndexMarkPane::SwIndexMarkPane(std::shared_ptr<weld::Dialog> xDialog, weld::Bu , m_xNextSameBT(rBuilder.weld_button(u"last"_ustr)) , m_xPrevBT(rBuilder.weld_button(u"previous"_ustr)) , m_xNextBT(rBuilder.weld_button(u"next"_ustr)) - , m_xForSelectedEntry(rBuilder.weld_label(u"selectedentrytitle"_ustr)) + , m_xForSelectedEntryFrame(rBuilder.weld_frame(u"selectedentryframe"_ustr)) { m_xSyncED->show(); @@ -366,7 +366,7 @@ void SwIndexMarkPane::InitControls() //to include all equal entries may only be allowed in the body and even there //only when a simple selection exists const FrameTypeFlags nFrameType = m_pSh->GetFrameType(nullptr,true); - m_xForSelectedEntry->show(); + m_xForSelectedEntryFrame->set_label(SwResId(STR_FOR_SELECTED_ENTRY)); m_xApplyToAllCB->show(); m_xSearchCaseSensitiveCB->show(); m_xSearchCaseWordOnlyCB->show(); diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx index 7367e4891537..5406e2703efe 100644 --- a/sw/source/uibase/inc/swuiidxmrk.hxx +++ b/sw/source/uibase/inc/swuiidxmrk.hxx @@ -91,7 +91,7 @@ class SwIndexMarkPane std::unique_ptr<weld::Button> m_xNextSameBT; std::unique_ptr<weld::Button> m_xPrevBT; std::unique_ptr<weld::Button> m_xNextBT; - std::unique_ptr<weld::Label> m_xForSelectedEntry; + std::unique_ptr<weld::Frame> m_xForSelectedEntryFrame; void Apply(); void InitControls(); diff --git a/sw/uiconfig/swriter/ui/indexentry.ui b/sw/uiconfig/swriter/ui/indexentry.ui index 8c55d911e1e9..366bb0506fcc 100644 --- a/sw/uiconfig/swriter/ui/indexentry.ui +++ b/sw/uiconfig/swriter/ui/indexentry.ui @@ -574,10 +574,10 @@ </object> </child> <child type="label"> - <object class="GtkLabel" id="selectedentrytitle"> + <object class="GtkLabel"> + <property name="visible">True</property> <property name="can-focus">False</property> <property name="no-show-all">True</property> - <property name="label" translatable="yes" context="indexentry|selectedentrytitle">For Selected Entry</property> <attributes> <attribute name="weight" value="bold"/> </attributes> commit 6ee3653106f4199e6a64db6d6db63247027ad57a Author: Michael Weghorn <[email protected]> AuthorDate: Tue Feb 17 12:54:34 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Tue Feb 17 18:35:53 2026 +0100 tdf#130857 qt weld: Support "Insert Index Entry" 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..." Right now, the dialog has an unexpected "For Selected Entry" text inside of the "For Selected Entry" frame when native Qt widgets are used (but not for gtk3 or gen), but that will be addressed in a separate commit. Change-Id: I566f96fd61acaf2b8220324fba9a2e5c0be8d911 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199544 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 9072591b5334..244d4389a27a 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -207,6 +207,7 @@ constexpr auto SUPPORTED_UI_FILES = frozen::make_unordered_set<std::u16string_vi u"modules/swriter/ui/fielddialog.ui", u"modules/swriter/ui/footendnotedialog.ui", u"modules/swriter/ui/footnotepage.ui", + u"modules/swriter/ui/indexentry.ui", u"modules/swriter/ui/inforeadonlydialog.ui", u"modules/swriter/ui/insertbookmark.ui", u"modules/swriter/ui/insertbreak.ui",
