vcl/qt5/QtInstanceBuilder.cxx  |    1 +
 vcl/qt5/QtInstanceTreeView.cxx |   15 ++++++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit ef1541a3279cb725cf5c077aee77aca950ba4a65
Author:     Michael Weghorn <[email protected]>
AuthorDate: Fri Jan 23 14:24:36 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Jan 23 22:05:34 2026 +0100

    tdf#130857 qt weld: QtInstanceTreeView::get_row_area
    
    This will e.g. be used to position the context menu
    in the form navigator dialog when opened via the
    keyboard, once support for native Qt widgets is
    declared for that dialog.
    
    Once that is the case (which is still WIP), the code
    path can be triggered like this
    
    * start Writer
    * "Form" -> "Form Navigator"
    * select the "Forms" entry and press the
      context menu key (or Shift+F10)
    
    Change-Id: I5f912d375a87bf9c27f48d69af054f359c184a07
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197953
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx
index 9cd29b5e866d..3404efe44750 100644
--- a/vcl/qt5/QtInstanceTreeView.cxx
+++ b/vcl/qt5/QtInstanceTreeView.cxx
@@ -814,10 +814,19 @@ std::unique_ptr<weld::TreeIter> 
QtInstanceTreeView::get_dest_row_at_pos(const Po
 
 void QtInstanceTreeView::unset_drag_dest_row() { assert(false && "Not 
implemented yet"); }
 
-tools::Rectangle QtInstanceTreeView::get_row_area(const weld::TreeIter&) const
+tools::Rectangle QtInstanceTreeView::get_row_area(const weld::TreeIter& rIter) 
const
 {
-    assert(false && "Not implemented yet");
-    return tools::Rectangle();
+    SolarMutexGuard g;
+
+    tools::Rectangle aRowArea;
+    GetQtInstance().RunInMainThread([&] {
+        const QRect aFirstColRect = m_pTreeView->visualRect(modelIndex(rIter));
+        const QRect aLastColRect
+            = m_pTreeView->visualRect(modelIndex(rIter, 
m_pModel->columnCount() - 1));
+        aRowArea = toRectangle(aFirstColRect.united(aLastColRect));
+    });
+
+    return aRowArea;
 }
 
 weld::TreeView* QtInstanceTreeView::get_drag_source() const
commit 897af75cd62f23e26cb286aa70e58fefd0263852
Author:     Michael Weghorn <[email protected]>
AuthorDate: Fri Jan 23 14:10:51 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Jan 23 22:05:25 2026 +0100

    tdf#130857 qt weld: Support Form Navigator context menu
    
    This the context menu in the
    form navigator, which can be triggered as follows:
    
    * start Writer
    * "Form" -> "Form Navigator"
    * right-click on the "Forms" entry
    
    This only enables use of native Qt widgets for that
    menu with SAL_VCL_QT_USE_WELDED_WIDGETS=1 if the parent
    is also a native Qt widget.
    
    That is not the case yet and supporting the parent
    dialog will need some more work, but once that is the
    case, the menu will also "just work" (as seen in
    a WIP branch for implementing support for the parent
    dialog).
    
    Change-Id: I5846671a291a916fa64f97e1005480e8115d7cec
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197952
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx
index a0df2c03b33e..8b03f87bbe11 100644
--- a/vcl/qt5/QtInstanceBuilder.cxx
+++ b/vcl/qt5/QtInstanceBuilder.cxx
@@ -270,6 +270,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& 
rUIFile, const weld::W
         u"cui/ui/additionsfragment.ui"_ustr,
         u"cui/ui/appearance.ui"_ustr,
         u"cui/ui/cellalignment.ui"_ustr,
+        u"svx/ui/formnavimenu.ui"_ustr,
         u"cui/ui/graphictestentry.ui"_ustr,
         u"cui/ui/lineendstabpage.ui"_ustr,
         u"cui/ui/linetabpage.ui"_ustr,

Reply via email to