sw/source/ui/index/cnttab.cxx | 8 ++++---- sw/source/uibase/inc/swuicnttab.hxx | 2 +- sw/uiconfig/swriter/ui/tocentriespage.ui | 2 +- vcl/inc/qt5/QtInstanceDialog.hxx | 3 ++- vcl/qt5/QtInstanceBuilder.cxx | 1 + vcl/qt5/QtInstanceDialog.cxx | 12 ++++++++++-- 6 files changed, 19 insertions(+), 9 deletions(-)
New commits: commit ccb3362a71f88213615bd39bd819ab8ec20d86cc Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Aug 8 10:38:29 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Aug 9 01:01:35 2025 +0200 tdf#130857 sw: Set frame's label directly, not via label child In order to set the title/label for the frame, do it directly using the weld::Frame, not a weld::Label object for its label. The native Qt implementation for weld::Frame uses a QGroupBox and doesn't use a separate label child, so this commit prepares for adding support for that dialog for that one at some point. The dialog can be triggered from Writer using "Insert" -> "Table of Contents and Index..." -> "Table of Contents, Index or Bibliography..."; the "Entries" page is the relevant one. Change-Id: I8c13ad44383a3bacf11db0f75a5c241c9fb4a299 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189170 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 4a9430bfdb19..591858fa88f5 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1930,7 +1930,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(weld::Container* pPage, weld::DialogControl , m_sNoCharStyle(SwResId(STR_NO_CHAR_STYLE)) , m_pCurrentForm(nullptr) , m_bInLevelHdl(false) - , m_xLevelFT(m_xBuilder->weld_label(u"levelft"_ustr)) + , m_xLevelFrame(m_xBuilder->weld_frame(u"levelframe"_ustr)) , m_xLevelLB(m_xBuilder->weld_tree_view(u"level"_ustr)) , m_xAllLevelsPB(m_xBuilder->weld_button(u"all"_ustr)) , m_xEntryNoPB(m_xBuilder->weld_button(u"chapterno"_ustr)) @@ -1979,7 +1979,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(weld::Container* pPage, weld::DialogControl { const OUString sNoCharSortKey(SwResId(STR_NOSORTKEY)); - m_sLevelStr = m_xLevelFT->get_label(); + m_sLevelStr = m_xLevelFrame->get_label(); m_xAuthFieldsLB->make_sorted(); m_xTokenWIN->SetTabPage(this); @@ -2264,10 +2264,10 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/) } } SortKeyHdl(m_xSortDocPosRB->get_active() ? *m_xSortDocPosRB : *m_xSortContentRB); - m_xLevelFT->set_label(m_sAuthTypeStr); + m_xLevelFrame->set_label(m_sAuthTypeStr); } else - m_xLevelFT->set_label(m_sLevelStr); + m_xLevelFrame->set_label(m_sLevelStr); // tdf#135266 - remember last used entry level depending on the index type m_xLevelLB->select(bToxIsIndex ? pTOXDlg->GetWrtShell().GetViewOptions()->GetIdxEntryLvl() diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 06c8e192fffc..ace46b75a0f5 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -317,7 +317,7 @@ class SwTOXEntryTabPage final : public SfxTabPage CurTOXType m_aLastTOXType; bool m_bInLevelHdl; - std::unique_ptr<weld::Label> m_xLevelFT; + std::unique_ptr<weld::Frame> m_xLevelFrame; std::unique_ptr<weld::TreeView> m_xLevelLB; std::unique_ptr<weld::Button> m_xAllLevelsPB; std::unique_ptr<weld::Button> m_xEntryNoPB; diff --git a/sw/uiconfig/swriter/ui/tocentriespage.ui b/sw/uiconfig/swriter/ui/tocentriespage.ui index b59598fa2258..33f9ff9b5042 100644 --- a/sw/uiconfig/swriter/ui/tocentriespage.ui +++ b/sw/uiconfig/swriter/ui/tocentriespage.ui @@ -67,7 +67,7 @@ <property name="vexpand">True</property> <property name="column-spacing">12</property> <child> - <object class="GtkFrame" id="frame3"> + <object class="GtkFrame" id="levelframe"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="vexpand">True</property> commit bbd7f64b6808bb5554ad12106125342b611d01d1 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Aug 8 10:30:07 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Aug 9 01:01:28 2025 +0200 tdf#130857 qt weld: Implement QtInstanceDialog::add_button Untested so far. Change-Id: Ieeccacb4f63ffc9f450a59e78e05a92169547ac9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189169 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/inc/qt5/QtInstanceDialog.hxx b/vcl/inc/qt5/QtInstanceDialog.hxx index 4e7076d0da42..8c20a9911b63 100644 --- a/vcl/inc/qt5/QtInstanceDialog.hxx +++ b/vcl/inc/qt5/QtInstanceDialog.hxx @@ -48,7 +48,8 @@ public: virtual void response(int nResponse) override; - virtual void add_button(const OUString&, int, const OUString& rHelpId = {}) override; + virtual void add_button(const OUString& rText, int nResponse, + const OUString& rHelpId = {}) override; virtual void set_modal(bool bModal) override; diff --git a/vcl/qt5/QtInstanceDialog.cxx b/vcl/qt5/QtInstanceDialog.cxx index 05e3147a1d46..3c55731a7767 100644 --- a/vcl/qt5/QtInstanceDialog.cxx +++ b/vcl/qt5/QtInstanceDialog.cxx @@ -112,9 +112,17 @@ void QtInstanceDialog::response(int nResponse) rQtInstance.RunInMainThread([&] { m_pDialog->done(nResponse); }); } -void QtInstanceDialog::add_button(const OUString&, int, const OUString&) +void QtInstanceDialog::add_button(const OUString& rText, int nResponse, const OUString& rHelpId) { - assert(false && "Not implemented yet"); + SolarMutexGuard g; + + GetQtInstance().RunInMainThread([&] { + QDialogButtonBox* pButtonBox = findButtonBox(m_pDialog); + assert(pButtonBox && "Dialog has no button box"); + QPushButton* pButton = pButtonBox->addButton(toQString(rText), QDialogButtonBox::NoRole); + pButton->setProperty(QtInstanceDialog::PROPERTY_VCL_RESPONSE_CODE, nResponse); + setHelpId(*pButton, rHelpId); + }); } void QtInstanceDialog::set_modal(bool bModal) commit e52571b1cba9adb8a1de1256bbabfcae692ce01a Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Aug 8 10:13:12 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Aug 9 01:01:20 2025 +0200 tdf#130857 qt weld: Support dialog to rename gallery theme 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. To trigger the dialog: * start Writer * open the "Gallery" sidebar deck * right-click on one of the themes (e.g. "Icons") to open the context menu * select the "Rename" context menu entry Change-Id: I97798442e2d362287b03a32af9cc13357042ee7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189168 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 05f3a5aa44d6..15d6c28186c9 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -72,6 +72,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"cui/ui/editdictionarydialog.ui"_ustr, u"cui/ui/fontfeaturesdialog.ui"_ustr, u"cui/ui/fontfragment.ui"_ustr, + u"cui/ui/gallerytitledialog.ui"_ustr, u"cui/ui/graphictestdlg.ui"_ustr, u"cui/ui/imageviewer.ui"_ustr, u"cui/ui/insertrowcolumn.ui"_ustr,