include/vcl/weld.hxx                     |    2 +-
 sc/source/ui/dbgui/sortkeydlg.cxx        |    4 ++--
 sc/source/ui/dbgui/tpsort.cxx            |    2 +-
 sc/source/ui/dbgui/validate.cxx          |    2 +-
 sc/source/ui/inc/sortkeydlg.hxx          |    8 ++++----
 sc/source/ui/inc/tpsort.hxx              |    2 +-
 sc/source/ui/inc/validate.hxx            |    2 +-
 vcl/inc/qt5/QtInstanceScrolledWindow.hxx |    4 ----
 vcl/qt5/QtInstanceScrolledWindow.cxx     |   13 -------------
 9 files changed, 11 insertions(+), 28 deletions(-)

New commits:
commit 5463f1a8a7f7c8235f28c71a476075a75a097c6e
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Aug 1 10:00:14 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sat Aug 2 09:15:08 2025 +0200

    tdf#130857 weld: No longer let ScrolledWindow subclass Container
    
    While for GTK 3, GtkScrolledwindow subclasses GtkContainer
    (via GtkBin), the Qt implementation of weld::Container,
    QtInstanceContainer, depends on a widget that has a
    layout set.
    The whole concept doesn't fit too well for the QScrollArea
    widget that QtInstanceScrolledWindow uses, which is based
    on the idea of providing scrolling capabilities for a single
    child widget.
    
    As far as I can see, there is no particular reason for
    weld::ScrolledWindow to subclass weld::Container and
    none of the ScrolledWindow instances used in the code
    seems to use the weld::Container API, so drop that
    inheritance for weld::ScrolledWindow.
    
    The GTK and VCL implementations remain unchanged.
    
    Change-Id: I7ce5d6296b9c40cee8ec8eb6dcfb9b1fb81d4ca3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188759
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index d0e3d08ef708..3c409babd20d 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -440,7 +440,7 @@ public:
     virtual int get_position() const = 0;
 };
 
-class VCL_DLLPUBLIC ScrolledWindow : virtual public Container
+class VCL_DLLPUBLIC ScrolledWindow : virtual public Widget
 {
     friend class ::LOKTrigger;
 
diff --git a/vcl/inc/qt5/QtInstanceScrolledWindow.hxx 
b/vcl/inc/qt5/QtInstanceScrolledWindow.hxx
index 0239d1329f91..3c8ce14613b0 100644
--- a/vcl/inc/qt5/QtInstanceScrolledWindow.hxx
+++ b/vcl/inc/qt5/QtInstanceScrolledWindow.hxx
@@ -23,10 +23,6 @@ public:
     QtInstanceScrolledWindow(QScrollArea* pScrollArea);
 
 public:
-    virtual void move(weld::Widget* pWidget, weld::Container* pNewParent) 
override;
-    virtual css::uno::Reference<css::awt::XWindow> CreateChildFrame() override;
-    virtual void child_grab_focus() override;
-
     virtual void hadjustment_configure(int nValue, int nUpper, int 
nStepIncrement,
                                        int nPageIncrement, int nPageSize) 
override;
     virtual int hadjustment_get_value() const override;
diff --git a/vcl/qt5/QtInstanceScrolledWindow.cxx 
b/vcl/qt5/QtInstanceScrolledWindow.cxx
index 3578ddc67dd1..a00904319a39 100644
--- a/vcl/qt5/QtInstanceScrolledWindow.cxx
+++ b/vcl/qt5/QtInstanceScrolledWindow.cxx
@@ -19,19 +19,6 @@ 
QtInstanceScrolledWindow::QtInstanceScrolledWindow(QScrollArea* pScrollArea)
     assert(m_pScrollArea);
 }
 
-void QtInstanceScrolledWindow::move(weld::Widget*, weld::Container*)
-{
-    assert(false && "Not implemented yet");
-}
-
-css::uno::Reference<css::awt::XWindow> 
QtInstanceScrolledWindow::CreateChildFrame()
-{
-    assert(false && "Not implemented yet");
-    return nullptr;
-}
-
-void QtInstanceScrolledWindow::child_grab_focus() { assert(false && "Not 
implemented yet"); }
-
 void QtInstanceScrolledWindow::hadjustment_configure(int nValue, int nUpper, 
int nStepIncrement,
                                                      int nPageIncrement, int 
nPageSize)
 {
commit a395526590313b9350b3d2163b0fedf382622805
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Aug 1 09:45:37 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sat Aug 2 09:15:00 2025 +0200

    tdf#130857 sc: Use more specific weld::Grid member
    
    ... instead of the more generic weld::Container for
    this widget defined as "GtkGrid" object in the .ui file
    (sc/uiconfig/scalc/ui/validationcriteriapage.ui).
    
    This change is done as part of checking that none
    of the widgets on which the weld::Container methods
    are called is a weld::ScrolledWindow, which will soon
    no longer subclass weld::Container.
    
    Change-Id: I81381f4c1cc578da9491de12da022cd40df8fcfb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188758
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index bacbe29e3af3..e4ed040b0a90 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -377,7 +377,7 @@ ScTPValidationValue::ScTPValidationValue(weld::Container* 
pPage, weld::DialogCon
     , m_xEdMax(new formula::RefEdit(m_xBuilder->weld_entry(u"max"_ustr)))
     , m_xFtHint(m_xBuilder->weld_label(u"hintft"_ustr))
     , m_xBtnRef(new 
formula::RefButton(m_xBuilder->weld_button(u"validref"_ustr)))
-    , m_xRefGrid(m_xBuilder->weld_container(u"refgrid"_ustr))
+    , m_xRefGrid(m_xBuilder->weld_grid(u"refgrid"_ustr))
     , m_pRefEditParent(m_xRefGrid.get())
     , m_pBtnRefParent(m_xRefGrid.get())
 {
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 5fdbdc7568ce..fa4af2061f73 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -128,7 +128,7 @@ private:
     std::unique_ptr<formula::RefEdit> m_xEdMax;
     std::unique_ptr<weld::Label> m_xFtHint;       /// Hint text for cell range 
validity.
     std::unique_ptr<formula::RefButton> m_xBtnRef;
-    std::unique_ptr<weld::Container> m_xRefGrid;
+    std::unique_ptr<weld::Grid> m_xRefGrid;
 
     weld::Container* m_pRefEditParent;
     weld::Container* m_pBtnRefParent;
commit 56ff8082fd3f61520d3e0435e4733be7a54bbb71
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Aug 1 09:42:21 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sat Aug 2 09:14:53 2025 +0200

    tdf#130857 sc: Use more specific weld::Box member in ScSortKeyItem
    
    ... instead of the more generic weld::Container for
    this widget defined as "GtkBox" object in the .ui file
    (sc/uiconfig/scalc/ui/sortcriteriapage.ui).
    
    This change is done as part of checking that none
    of the widgets on which the weld::Container methods
    are called is a weld::ScrolledWindow, which will soon
    no longer subclass weld::Container.
    
    Change-Id: Id668b08ec739818ca77f917695f4c0f4ea253e1b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188757
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx 
b/sc/source/ui/dbgui/sortkeydlg.cxx
index c4c4e72d6b22..02051d847ffa 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -15,7 +15,7 @@
 #include <scresid.hxx>
 #include <strings.hrc>
 
-ScSortKeyItem::ScSortKeyItem(weld::Container* pParent)
+ScSortKeyItem::ScSortKeyItem(weld::Box* pParent)
     : m_xBuilder(Application::CreateBuilder(pParent, 
u"modules/scalc/ui/sortkey.ui"_ustr))
     , m_xFrame(m_xBuilder->weld_frame(u"SortKeyFrame"_ustr))
     , m_xLbSort(m_xBuilder->weld_combo_box(u"sortlb"_ustr))
@@ -47,7 +47,7 @@ void ScSortKeyItem::EnableField()
     m_xFrame->set_sensitive(true);
 }
 
-ScSortKeyWindow::ScSortKeyWindow(weld::Container* pBox)
+ScSortKeyWindow::ScSortKeyWindow(weld::Box* pBox)
     : m_pBox(pBox)
 {
 }
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 44b3e020e726..df4c2aaddbcf 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -91,7 +91,7 @@ ScTabPageSortFields::ScTabPageSortFields(weld::Container* 
pPage, weld::DialogCon
     , m_xBtnTopDown(m_xBuilder->weld_radio_button(u"rbTopDown"_ustr))
     , m_xBtnLeftRight(m_xBuilder->weld_radio_button(u"rbLeftRight"_ustr))
     , 
m_xScrolledWindow(m_xBuilder->weld_scrolled_window(u"SortCriteriaPage"_ustr))
-    , m_xBox(m_xBuilder->weld_container(u"SortKeyWindow"_ustr))
+    , m_xBox(m_xBuilder->weld_box(u"SortKeyWindow"_ustr))
     , m_aSortWin(m_xBox.get())
 {
     // tdf#147722 set some nominal small default height so the height adapts
diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx
index 2c702e6100cb..6d110fa9dfd7 100644
--- a/sc/source/ui/inc/sortkeydlg.hxx
+++ b/sc/source/ui/inc/sortkeydlg.hxx
@@ -23,9 +23,9 @@ struct ScSortKeyItem
     std::unique_ptr<weld::RadioButton> m_xBtnUp;
     std::unique_ptr<weld::RadioButton> m_xBtnDown;
     std::unique_ptr<weld::Label> m_xLabel;
-    weld::Container* m_pParent;
+    weld::Box* m_pParent;
 
-    ScSortKeyItem(weld::Container* pParent);
+    ScSortKeyItem(weld::Box* pParent);
     ~ScSortKeyItem();
 
     void DisableField();
@@ -40,10 +40,10 @@ public:
     ScSortKeyItems m_aSortKeyItems;
 
 private:
-    weld::Container* m_pBox;
+    weld::Box* m_pBox;
 
 public:
-    ScSortKeyWindow(weld::Container* pBox);
+    ScSortKeyWindow(weld::Box* pBox);
     ~ScSortKeyWindow();
 
     void AddSortKey(sal_uInt16 nItem);
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 1c9d27926b1c..b8c630aa9315 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -76,7 +76,7 @@ private:
     std::unique_ptr<weld::RadioButton> m_xBtnTopDown;
     std::unique_ptr<weld::RadioButton> m_xBtnLeftRight;
     std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
-    std::unique_ptr<weld::Container> m_xBox;
+    std::unique_ptr<weld::Box> m_xBox;
     ScSortKeyWindow m_aSortWin;
 
     void AddSortKey( sal_uInt16 nItem );

Reply via email to