basctl/source/basicide/baside2.hxx                                    |    1 
 basctl/source/basicide/brkdlg.hxx                                     |    2 
 basctl/source/basicide/macrodlg.hxx                                   |    1 
 basctl/source/basicide/moduldlg.hxx                                   |    1 
 basctl/source/inc/ColorSchemeDialog.hxx                               |    1 
 basctl/source/inc/bastype2.hxx                                        |    1 
 basctl/source/inc/managelang.hxx                                      |    1 
 basctl/source/inc/objectbrowser.hxx                                   |    1 
 chart2/source/controller/dialogs/tp_ChartType.cxx                     |    1 
 chart2/source/controller/dialogs/tp_DataSource.cxx                    |    1 
 chart2/source/inc/res_BarGeometry.hxx                                 |    1 
 cui/inc/dlgname.hxx                                                   |    1 
 cui/inc/widgettestdlg.hxx                                             |    1 
 cui/source/customize/macropg_impl.hxx                                 |    1 
 cui/source/inc/DiagramDialog.hxx                                      |    1 
 cui/source/inc/MacroManagerDialog.hxx                                 |    1 
 cui/source/inc/SpellDialog.hxx                                        |    1 
 cui/source/inc/SvxMenuConfigPage.hxx                                  |    1 
 cui/source/inc/SvxNotebookbarConfigPage.hxx                           |    1 
 cui/source/inc/SvxToolbarConfigPage.hxx                               |    1 
 cui/source/inc/cfg.hxx                                                |    1 
 cui/source/inc/cfgutil.hxx                                            |    1 
 cui/source/inc/chardlg.hxx                                            |    1 
 cui/source/inc/cuigaldlg.hxx                                          |    1 
 cui/source/inc/hangulhanjadlg.hxx                                     |    1 
 cui/source/inc/headertablistbox.hxx                                   |    1 
 cui/source/inc/hlmarkwn.hxx                                           |    1 
 cui/source/inc/insdlg.hxx                                             |    1 
 cui/source/inc/macroass.hxx                                           |    1 
 cui/source/inc/macropg.hxx                                            |    1 
 cui/source/inc/multipat.hxx                                           |    1 
 cui/source/inc/numfmt.hxx                                             |    1 
 cui/source/inc/numpages.hxx                                           |    1 
 cui/source/inc/optdict.hxx                                            |    1 
 cui/source/inc/optlingu.hxx                                           |    1 
 cui/source/inc/optpath.hxx                                            |    1 
 cui/source/inc/pastedlg.hxx                                           |    1 
 cui/source/inc/scriptdlg.hxx                                          |    1 
 cui/source/inc/showcols.hxx                                           |    1 
 cui/source/inc/srchxtra.hxx                                           |    1 
 cui/source/inc/tabstpge.hxx                                           |    2 
 cui/source/inc/thesdlg.hxx                                            |    1 
 cui/source/inc/toolbartabpage.hxx                                     |    2 
 cui/source/inc/treeopt.hxx                                            |    1 
 cui/source/options/certpath.hxx                                       |    1 
 cui/source/options/connpooloptions.hxx                                |    1 
 cui/source/options/dbregister.cxx                                     |    1 
 cui/source/options/fontsubs.hxx                                       |    1 
 cui/source/options/optaboutconfig.hxx                                 |    1 
 cui/source/options/optaccessibility.hxx                               |    1 
 cui/source/options/optchart.hxx                                       |    1 
 cui/source/options/optfltr.hxx                                        |    1 
 cui/source/options/tsaurls.hxx                                        |    1 
 cui/source/options/webconninfo.hxx                                    |    1 
 cui/source/tabpages/autocdlg.cxx                                      |    1 
 cui/source/tabpages/chardlg.cxx                                       |    1 
 dbaccess/source/ui/app/AppController.cxx                              |    1 
 dbaccess/source/ui/app/AppDetailPageHelper.hxx                        |    1 
 dbaccess/source/ui/app/AppView.hxx                                    |    1 
 dbaccess/source/ui/dlg/dbfindex.hxx                                   |    1 
 dbaccess/source/ui/dlg/dsselect.hxx                                   |    1 
 dbaccess/source/ui/dlg/sqlmessage.cxx                                 |    1 
 dbaccess/source/ui/dlg/tablespage.hxx                                 |    1 
 dbaccess/source/ui/inc/CollectionView.hxx                             |    1 
 dbaccess/source/ui/inc/TableWindowListBox.hxx                         |    1 
 dbaccess/source/ui/inc/WTypeSelect.hxx                                |    2 
 dbaccess/source/ui/inc/adtabdlg.hxx                                   |    1 
 dbaccess/source/ui/inc/dbtreelistbox.hxx                              |    1 
 dbaccess/source/ui/inc/indexdialog.hxx                                |    1 
 dbaccess/source/ui/inc/paramdialog.hxx                                |    1 
 dbaccess/source/ui/inc/tabletree.hxx                                  |    2 
 desktop/source/deployment/gui/dp_gui_dependencydialog.hxx             |    1 
 desktop/source/deployment/gui/dp_gui_updatedialog.hxx                 |    1 
 extensions/source/abpilot/tableselectionpage.hxx                      |    1 
 extensions/source/bibliography/datman.cxx                             |    1 
 extensions/source/dbpilots/commonpagesdbp.hxx                         |    1 
 extensions/source/dbpilots/controlwizard.hxx                          |    1 
 extensions/source/propctrlr/listselectiondlg.hxx                      |    1 
 extensions/source/propctrlr/selectlabeldialog.hxx                     |    1 
 extensions/source/propctrlr/taborder.hxx                              |    1 
 extensions/source/scanner/sanedlg.hxx                                 |    1 
 filter/source/pdf/impdialog.hxx                                       |    1 
 filter/source/xsltdialog/xmlfiltersettingsdialog.hxx                  |    1 
 formula/source/ui/dlg/funcpage.hxx                                    |    1 
 formula/source/ui/dlg/structpg.hxx                                    |    1 
 fpicker/source/office/PlacesListBox.hxx                               |    1 
 fpicker/source/office/fileview.hxx                                    |    1 
 fpicker/source/office/foldertree.hxx                                  |    1 
 include/sfx2/devtools/DocumentModelTreeHandler.hxx                    |    1 
 include/sfx2/devtools/ObjectInspectorTreeHandler.hxx                  |    1 
 include/sfx2/devtools/ObjectInspectorWidgets.hxx                      |    1 
 include/sfx2/listview.hxx                                             |    1 
 include/sfx2/newstyle.hxx                                             |    2 
 include/sfx2/templatedlg.hxx                                          |    1 
 include/svx/ClassificationDialog.hxx                                  |    1 
 include/svx/ctredlin.hxx                                              |    1 
 include/svx/sidebar/InspectorTextPanel.hxx                            |    1 
 include/svx/txencbox.hxx                                              |    1 
 include/vcl/jsdialog/executor.hxx                                     |    1 
 include/vcl/weld/EntryTreeView.hxx                                    |  176 ++
 include/vcl/weld/IconView.hxx                                         |    8 
 include/vcl/weld/ItemView.hxx                                         |   27 
 include/vcl/weld/TreeView.hxx                                         |  633 
++++++++
 include/vcl/weld/weld.hxx                                             |  777 
----------
 include/vcl/weld/weldutils.hxx                                        |    1 
 reportdesign/source/ui/dlg/Navigator.cxx                              |    1 
 reportdesign/source/ui/inc/AddField.hxx                               |    1 
 sc/source/core/tool/orcusxml.cxx                                      |    1 
 sc/source/filter/orcus/xmlcontext.cxx                                 |    1 
 sc/source/ui/dbgui/dbnamdlg.cxx                                       |    1 
 sc/source/ui/inc/FilterListBox.hxx                                    |    1 
 sc/source/ui/inc/PivotLayoutTreeListBase.hxx                          |    1 
 sc/source/ui/inc/checklistmenu.hxx                                    |    1 
 sc/source/ui/inc/condformatmgr.hxx                                    |    1 
 sc/source/ui/inc/content.hxx                                          |    1 
 sc/source/ui/inc/dialogs/SelectSheetViewDialog.hxx                    |    1 
 sc/source/ui/inc/dpgroupdlg.hxx                                       |    1 
 sc/source/ui/inc/duplicaterecordsdlg.hxx                              |    1 
 sc/source/ui/inc/gototabdlg.hxx                                       |    1 
 sc/source/ui/inc/instbdlg.hxx                                         |    1 
 sc/source/ui/inc/lbseldlg.hxx                                         |    1 
 sc/source/ui/inc/linkarea.hxx                                         |    1 
 sc/source/ui/inc/mvtabdlg.hxx                                         |    1 
 sc/source/ui/inc/namemgrtable.hxx                                     |    1 
 sc/source/ui/inc/protectiondlg.hxx                                    |    1 
 sc/source/ui/inc/pvfundlg.hxx                                         |    1 
 sc/source/ui/inc/scuiautofmt.hxx                                      |    1 
 sc/source/ui/inc/scuiimoptdlg.hxx                                     |    1 
 sc/source/ui/inc/searchresults.hxx                                    |    1 
 sc/source/ui/inc/sharedocdlg.hxx                                      |    1 
 sc/source/ui/inc/shtabdlg.hxx                                         |    1 
 sc/source/ui/inc/solveroptions.hxx                                    |    1 
 sc/source/ui/inc/tpsubt.hxx                                           |    1 
 sc/source/ui/inc/xmlsourcedlg.hxx                                     |    2 
 sc/source/ui/sidebar/CellLineStyleControl.hxx                         |    1 
 sd/source/ui/dlg/PhotoAlbumDialog.hxx                                 |    1 
 sd/source/ui/inc/BulletAndPositionDlg.hxx                             |    1 
 sd/source/ui/inc/CustomAnimationList.hxx                              |    1 
 sd/source/ui/inc/SelectLayerDlg.hxx                                   |    1 
 sd/source/ui/inc/custsdlg.hxx                                         |    1 
 sd/source/ui/inc/inspagob.hxx                                         |    1 
 sd/source/ui/inc/sdtreelb.hxx                                         |    1 
 sfx2/inc/DevelopmentToolDockingWindow.hxx                             |    1 
 sfx2/inc/autoredactdialog.hxx                                         |    1 
 sfx2/inc/commandpopup/CommandPopup.hxx                                |    1 
 sfx2/inc/saveastemplatedlg.hxx                                        |    1 
 sfx2/source/appl/newhelp.hxx                                          |    1 
 sfx2/source/doc/new.cxx                                               |    1 
 sfx2/source/inc/StyleList.hxx                                         |    1 
 sfx2/source/inc/versdlg.hxx                                           |    1 
 starmath/inc/dialog.hxx                                               |    1 
 svx/source/inc/datanavi.hxx                                           |    1 
 svx/source/inc/docrecovery.hxx                                        |    1 
 svx/source/inc/fmexch.hxx                                             |    1 
 svx/source/inc/galbrws1.hxx                                           |    1 
 svx/source/inc/tabwin.hxx                                             |    1 
 svx/source/tbxctrls/lboxctrl.cxx                                      |    1 
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx |    1 
 sw/source/core/inc/DropDownFormFieldButton.hxx                        |    2 
 sw/source/core/inc/dropdowncontentcontrolbutton.hxx                   |    2 
 sw/source/ui/dbui/customizeaddresslistdialog.hxx                      |    1 
 sw/source/ui/dbui/mmaddressblockpage.hxx                              |    1 
 sw/source/ui/dbui/selectdbtabledialog.hxx                             |    1 
 sw/source/ui/fldui/fldpage.hxx                                        |    1 
 sw/source/ui/fldui/fldref.hxx                                         |    1 
 sw/source/ui/inc/bookmark.hxx                                         |    1 
 sw/source/ui/inc/mmresultdialogs.hxx                                  |    1 
 sw/source/ui/inc/regionsw.hxx                                         |    2 
 sw/source/uibase/inc/DropDownFieldDialog.hxx                          |    1 
 sw/source/uibase/inc/DropDownFormFieldDialog.hxx                      |    1 
 sw/source/uibase/inc/QuickFindPanel.hxx                               |    1 
 sw/source/uibase/inc/contentcontroldlg.hxx                            |    1 
 sw/source/uibase/inc/conttree.hxx                                     |    1 
 sw/source/uibase/inc/convert.hxx                                      |    1 
 sw/source/uibase/inc/dbinsdlg.hxx                                     |    1 
 sw/source/uibase/inc/dbtree.hxx                                       |    1 
 sw/source/uibase/inc/glosbib.hxx                                      |    1 
 sw/source/uibase/inc/glossary.hxx                                     |    1 
 sw/source/uibase/inc/instable.hxx                                     |    1 
 sw/source/uibase/inc/multmrk.hxx                                      |    1 
 sw/source/uibase/inc/num.hxx                                          |    1 
 sw/source/uibase/inc/numfmtlb.hxx                                     |    1 
 sw/source/uibase/inc/optcomp.hxx                                      |    1 
 sw/source/uibase/inc/optload.hxx                                      |    1 
 sw/source/uibase/inc/selglos.hxx                                      |    1 
 sw/source/uibase/inc/swuiccoll.hxx                                    |    1 
 sw/source/uibase/inc/swuicnttab.hxx                                   |    1 
 sw/source/uibase/inc/tautofmt.hxx                                     |    1 
 sw/source/uibase/sidebar/PageSizeControl.hxx                          |    1 
 sw/source/uibase/utlui/gloslst.cxx                                    |    1 
 uui/source/fltdlg.hxx                                                 |    1 
 vcl/inc/qt5/QtInstanceBuilder.hxx                                     |    2 
 vcl/inc/qt5/QtInstanceEntryTreeView.hxx                               |    2 
 vcl/inc/qt5/QtInstanceTreeView.hxx                                    |    2 
 vcl/inc/salvtables.hxx                                                |    2 
 vcl/unx/generic/print/prtsetup.hxx                                    |    1 
 vcl/unx/gtk3/gtkinst.cxx                                              |    1 
 xmlsecurity/inc/certificatechooser.hxx                                |    1 
 xmlsecurity/inc/certificateviewer.hxx                                 |    1 
 xmlsecurity/inc/digitalsignaturesdialog.hxx                           |    1 
 xmlsecurity/inc/macrosecurity.hxx                                     |    1 
 201 files changed, 1050 insertions(+), 781 deletions(-)

New commits:
commit 94aee0cd3d6cfc2bdc8375f9e1938a92c15eae1f
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed Dec 17 12:14:41 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Wed Dec 17 18:20:48 2025 +0100

    weld: Introduce weld::ItemView as IconView/TreeView base
    
    Both, weld::TreeView and weld::IconView display
    items of some kind, and have quite some API in common.
    
    Introduce weld::ItemView as new abstract base class
    for both of them, in order to deduplicate code
    and help the weld::IconView and weld::TreeView API
    stay consistent (as they won't change independently
    any more once they have been moved to the base class).
    
    Initially, move three methods related to iters
    to the base class. More will follow in upcoming
    commits.
    
    Change-Id: Id8d243712bedf8dd42c2d9d909dc43e335689e34
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195785
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/include/vcl/weld/IconView.hxx b/include/vcl/weld/IconView.hxx
index fb4f31fee8b1..73c8eecfc15e 100644
--- a/include/vcl/weld/IconView.hxx
+++ b/include/vcl/weld/IconView.hxx
@@ -10,13 +10,13 @@
 #pragma once
 
 #include <vcl/dllapi.h>
-#include <vcl/weld/weld.hxx>
+#include <vcl/weld/ItemView.hxx>
 
 namespace weld
 {
 typedef std::tuple<OUString&, const TreeIter&> encoded_image_query;
 
-class VCL_DLLPUBLIC IconView : virtual public Widget
+class VCL_DLLPUBLIC IconView : virtual public ItemView
 {
     friend class ::LOKTrigger;
 
@@ -167,10 +167,6 @@ public:
     virtual tools::Rectangle get_rect(int pos) const = 0;
 
     //via iter
-    virtual std::unique_ptr<TreeIter> make_iterator(const TreeIter* pOrig = 
nullptr) const = 0;
-    virtual bool get_selected(TreeIter* pIter) const = 0;
-    virtual bool get_cursor(TreeIter* pIter) const = 0;
-
     void set_cursor(const TreeIter& rIter)
     {
         disable_notify_events();
diff --git a/include/vcl/weld/ItemView.hxx b/include/vcl/weld/ItemView.hxx
new file mode 100644
index 000000000000..4d0445f108ac
--- /dev/null
+++ b/include/vcl/weld/ItemView.hxx
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <vcl/dllapi.h>
+#include <vcl/weld/weld.hxx>
+
+namespace weld
+{
+/* Abstract base class for TreeView and IconView. */
+class VCL_DLLPUBLIC ItemView : virtual public Widget
+{
+public:
+    virtual std::unique_ptr<TreeIter> make_iterator(const TreeIter* pOrig = 
nullptr) const = 0;
+    virtual bool get_selected(TreeIter* pIter) const = 0;
+    virtual bool get_cursor(TreeIter* pIter) const = 0;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/include/vcl/weld/TreeView.hxx b/include/vcl/weld/TreeView.hxx
index 03486618a120..441af2149b0f 100644
--- a/include/vcl/weld/TreeView.hxx
+++ b/include/vcl/weld/TreeView.hxx
@@ -10,7 +10,7 @@
 #pragma once
 
 #include <vcl/dllapi.h>
-#include <vcl/weld/weld.hxx>
+#include <vcl/weld/ItemView.hxx>
 
 namespace weld
 {
@@ -25,7 +25,7 @@ enum class ColumnToggleType
    button column when enable_toggle_buttons is used). Column index -1 is
    reserved to access those columns.
 */
-class VCL_DLLPUBLIC TreeView : virtual public Widget
+class VCL_DLLPUBLIC TreeView : virtual public ItemView
 {
     friend class ::LOKTrigger;
 
@@ -327,10 +327,7 @@ public:
     void remove_id(const OUString& rText) { remove(find_id(rText)); }
 
     //via iter
-    virtual std::unique_ptr<TreeIter> make_iterator(const TreeIter* pOrig = 
nullptr) const = 0;
     virtual void copy_iterator(const TreeIter& rSource, TreeIter& rDest) const 
= 0;
-    virtual bool get_selected(TreeIter* pIter) const = 0;
-    virtual bool get_cursor(TreeIter* pIter) const = 0;
 
     void set_cursor(const TreeIter& rIter)
     {
commit 4e630100fdddce0c7834d518ffd5506eb940ba74
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed Dec 17 11:30:15 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Wed Dec 17 18:20:41 2025 +0100

    weld: Move weld::TreeView to its own header
    
    Move the class out of weld.hxx into its own header, in
    order to make it easier to keep an overview and to avoid
    having to recompile ~all UI code when the class is
    modified.
    
    Change-Id: Ifbd413fc8dcfe5e453a0fef8a04f3c396af4c836
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195781
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index afc31015c11f..f56cc044ec46 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -29,6 +29,7 @@
 #include <basic/sbstar.hxx>
 #include <vcl/InterimItemWindow.hxx>
 #include <vcl/idle.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <svtools/colorcfg.hxx>
diff --git a/basctl/source/basicide/brkdlg.hxx 
b/basctl/source/basicide/brkdlg.hxx
index ecf184991df5..a2c1ecf37a7b 100644
--- a/basctl/source/basicide/brkdlg.hxx
+++ b/basctl/source/basicide/brkdlg.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <vcl/weld/EntryTreeView.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include "breakpoint.hxx"
 
diff --git a/basctl/source/basicide/macrodlg.hxx 
b/basctl/source/basicide/macrodlg.hxx
index 8f87ad83384f..f1c7a5ffbbc2 100644
--- a/basctl/source/basicide/macrodlg.hxx
+++ b/basctl/source/basicide/macrodlg.hxx
@@ -23,6 +23,7 @@
 #include <bastype2.hxx>
 #include <sfx2/basedlgs.hxx>
 #include <com/sun/star/frame/XFrame.hpp>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 namespace basctl
diff --git a/basctl/source/basicide/moduldlg.hxx 
b/basctl/source/basicide/moduldlg.hxx
index a4117a6d3d93..f92d6e87256d 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -24,6 +24,7 @@
 #include <string_view>
 
 #include <bastype2.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <com/sun/star/task/XInteractionHandler.hpp>
 
diff --git a/basctl/source/inc/ColorSchemeDialog.hxx 
b/basctl/source/inc/ColorSchemeDialog.hxx
index fd8b153afab2..8fd6cb10e945 100644
--- a/basctl/source/inc/ColorSchemeDialog.hxx
+++ b/basctl/source/inc/ColorSchemeDialog.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 namespace basctl
diff --git a/basctl/source/inc/bastype2.hxx b/basctl/source/inc/bastype2.hxx
index fafbb46670bb..15317e8af216 100644
--- a/basctl/source/inc/bastype2.hxx
+++ b/basctl/source/inc/bastype2.hxx
@@ -25,6 +25,7 @@
 
 #include "doceventnotifier.hxx"
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <basctl/sbxitem.hxx>
 #include <o3tl/typed_flags_set.hxx>
diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx
index cff2fdb7ec78..f1ef48df58be 100644
--- a/basctl/source/inc/managelang.hxx
+++ b/basctl/source/inc/managelang.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <utility>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class SvxLanguageBox;
diff --git a/basctl/source/inc/objectbrowser.hxx 
b/basctl/source/inc/objectbrowser.hxx
index 47356bf1e409..ce9d4da2fb12 100644
--- a/basctl/source/inc/objectbrowser.hxx
+++ b/basctl/source/inc/objectbrowser.hxx
@@ -20,6 +20,7 @@
 #include <sfx2/objsh.hxx>
 #include <sfx2/sfxsids.hrc>
 #include <sfx2/viewfrm.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <map>
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx 
b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 553ec44f4876..3e87bb55fa09 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -30,6 +30,7 @@
 #include <svtools/valueset.hxx>
 
 #include <utility>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <vcl/outdev.hxx>
 #include <comphelper/diagnose_ex.hxx>
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx 
b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 4cc12689ebc9..9d9b45d882a5 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -34,6 +34,7 @@
 #include <o3tl/safeint.hxx>
 #include <TabPageNotifiable.hxx>
 #include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <vcl/weld/TreeView.hxx>
 
 #include <comphelper/diagnose_ex.hxx>
 
diff --git a/chart2/source/inc/res_BarGeometry.hxx 
b/chart2/source/inc/res_BarGeometry.hxx
index ae988d5dca35..efd50a6e2e2d 100644
--- a/chart2/source/inc/res_BarGeometry.hxx
+++ b/chart2/source/inc/res_BarGeometry.hxx
@@ -18,6 +18,7 @@
  */
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 namespace chart
diff --git a/cui/inc/dlgname.hxx b/cui/inc/dlgname.hxx
index 2490b20e252e..35dfebb9ccc5 100644
--- a/cui/inc/dlgname.hxx
+++ b/cui/inc/dlgname.hxx
@@ -19,6 +19,7 @@
 #pragma once
 
 #include <vcl/formatter.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 /// Dialog for editing a name
diff --git a/cui/inc/widgettestdlg.hxx b/cui/inc/widgettestdlg.hxx
index dabd85e4bac4..b42e6c84f429 100644
--- a/cui/inc/widgettestdlg.hxx
+++ b/cui/inc/widgettestdlg.hxx
@@ -10,6 +10,7 @@
 #pragma once
 
 #include <tools/link.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class WidgetTestDialog final : public weld::GenericDialogController
diff --git a/cui/source/customize/macropg_impl.hxx 
b/cui/source/customize/macropg_impl.hxx
index 1a69a19fb684..2f2bf5be615d 100644
--- a/cui/source/customize/macropg_impl.hxx
+++ b/cui/source/customize/macropg_impl.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <svl/itemset.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class SvxMacroTabPage_Impl
diff --git a/cui/source/inc/DiagramDialog.hxx b/cui/source/inc/DiagramDialog.hxx
index 832132d3a625..b121be472ddd 100644
--- a/cui/source/inc/DiagramDialog.hxx
+++ b/cui/source/inc/DiagramDialog.hxx
@@ -10,6 +10,7 @@
 #pragma once
 
 #include <tools/link.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class SdrObjGroup;
diff --git a/cui/source/inc/MacroManagerDialog.hxx 
b/cui/source/inc/MacroManagerDialog.hxx
index f7f131c14fec..56942e1237b0 100644
--- a/cui/source/inc/MacroManagerDialog.hxx
+++ b/cui/source/inc/MacroManagerDialog.hxx
@@ -15,6 +15,7 @@
 #include <basctl/scriptdocument.hxx>
 #include <svx/passwd.hxx>
 #include <svl/lstner.hxx>
+#include <vcl/weld/TreeView.hxx>
 
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index c7f8c0ce722a..2b7b1850cd60 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -29,6 +29,7 @@
 #include <vcl/customweld.hxx>
 #include <svx/weldeditview.hxx>
 #include <editeng/SpellPortions.hxx>
+#include <vcl/weld/TreeView.hxx>
 
 #include <set>
 
diff --git a/cui/source/inc/SvxMenuConfigPage.hxx 
b/cui/source/inc/SvxMenuConfigPage.hxx
index 53ba42a09412..044ab4187931 100644
--- a/cui/source/inc/SvxMenuConfigPage.hxx
+++ b/cui/source/inc/SvxMenuConfigPage.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include "cfg.hxx" //for SvxConfigPage and SaveInData
diff --git a/cui/source/inc/SvxNotebookbarConfigPage.hxx 
b/cui/source/inc/SvxNotebookbarConfigPage.hxx
index 9ee894275ecc..8b45916a6bb5 100644
--- a/cui/source/inc/SvxNotebookbarConfigPage.hxx
+++ b/cui/source/inc/SvxNotebookbarConfigPage.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <libxml/parser.h>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <memory>
diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx 
b/cui/source/inc/SvxToolbarConfigPage.hxx
index 9a343dfc1275..60180cedb2ee 100644
--- a/cui/source/inc/SvxToolbarConfigPage.hxx
+++ b/cui/source/inc/SvxToolbarConfigPage.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <memory>
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index bc13ad14ab68..3020492df683 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <vcl/timer.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <vcl/weld/weldutils.hxx>
 #include <svtools/valueset.hxx>
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index d6e4fa53496a..e8e1e3c53732 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -30,6 +30,7 @@
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/script/browse/XBrowseNode.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <config_features.h>
 
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 60becd04a69d..adede23d5029 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -23,6 +23,7 @@
 #include <svx/fntctrl.hxx>
 #include <svx/colorbox.hxx>
 #include <svx/langbox.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <memory>
 
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 1dcf6504459e..31b2c01d1fac 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -30,6 +30,7 @@
 #include <com/sun/star/media/XPlayer.hpp>
 #include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
 #include <svtools/dialogclosedlistener.hxx>
+#include <vcl/weld/TreeView.hxx>
 
 #include <string_view>
 #include <vector>
diff --git a/cui/source/inc/hangulhanjadlg.hxx 
b/cui/source/inc/hangulhanjadlg.hxx
index 89ae29f3da5d..7f89c8ed5978 100644
--- a/cui/source/inc/hangulhanjadlg.hxx
+++ b/cui/source/inc/hangulhanjadlg.hxx
@@ -20,6 +20,7 @@
 
 #include <vcl/customweld.hxx>
 #include <vcl/event.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <editeng/hangulhanja.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
diff --git a/cui/source/inc/headertablistbox.hxx 
b/cui/source/inc/headertablistbox.hxx
index cde84ec335b0..969813691c9f 100644
--- a/cui/source/inc/headertablistbox.hxx
+++ b/cui/source/inc/headertablistbox.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class MacroEventListBox final
diff --git a/cui/source/inc/hlmarkwn.hxx b/cui/source/inc/hlmarkwn.hxx
index f17ef695b4a6..853260331b24 100644
--- a/cui/source/inc/hlmarkwn.hxx
+++ b/cui/source/inc/hlmarkwn.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <com/sun/star/container/XNameAccess.hpp>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class SvxHyperlinkTabPageBase;
diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx
index acae74b07880..21cd354d7d5f 100644
--- a/cui/source/inc/insdlg.hxx
+++ b/cui/source/inc/insdlg.hxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/embed/XStorage.hpp>
 
 #include <svtools/insdlg.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <comphelper/embeddedobjectcontainer.hxx>
 
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx
index 0594b7e35b34..66d03d84c3ce 100644
--- a/cui/source/inc/macroass.hxx
+++ b/cui/source/inc/macroass.hxx
@@ -23,6 +23,7 @@
 #include <sfx2/basedlgs.hxx>
 #include <sfx2/tabdlg.hxx>
 #include <svl/macitem.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <com/sun/star/frame/XFrame.hpp>
 #include <memory>
diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx
index 738fbe71740c..e1d975613c6a 100644
--- a/cui/source/inc/macropg.hxx
+++ b/cui/source/inc/macropg.hxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/util/XModifiable.hpp>
 #include <com/sun/star/uno/Reference.hxx>
 #include <rtl/ustring.hxx>
+#include <vcl/weld/TreeView.hxx>
 
 #include <unordered_map>
 
diff --git a/cui/source/inc/multipat.hxx b/cui/source/inc/multipat.hxx
index 3165b41768cb..21f2463cc848 100644
--- a/cui/source/inc/multipat.hxx
+++ b/cui/source/inc/multipat.hxx
@@ -18,6 +18,7 @@
  */
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class SvxMultiPathDialog : public weld::GenericDialogController
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index f1fd8aa5fd55..47f7c1787de5 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -24,6 +24,7 @@
 #include <svx/langbox.hxx>
 #include <tools/color.hxx>
 #include <vcl/customweld.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class SvxNumberFormatShell;
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 2c82a6eece90..13ddd3f2451e 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -27,6 +27,7 @@
 #include <svtools/ctrlbox.hxx>
 #include <svx/numberingpreview.hxx>
 #include <vcl/customweld.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/timer.hxx>
 #include <svx/dlgutil.hxx>
 
diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx
index f29f2d79f338..f6d50f72206d 100644
--- a/cui/source/inc/optdict.hxx
+++ b/cui/source/inc/optdict.hxx
@@ -18,6 +18,7 @@
  */
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index fcc008deb356..2789c583501b 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/configuration/XReadWriteAccess.hpp>
+#include <vcl/weld/TreeView.hxx>
 
 namespace com::sun::star{
     namespace linguistic2{
diff --git a/cui/source/inc/optpath.hxx b/cui/source/inc/optpath.hxx
index afb1a1467901..99ac65937050 100644
--- a/cui/source/inc/optpath.hxx
+++ b/cui/source/inc/optpath.hxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
 #include <svtools/dialogclosedlistener.hxx>
 #include <unotools/pathoptions.hxx>
+#include <vcl/weld/TreeView.hxx>
 
 // forward ---------------------------------------------------------------
 struct OptPath_Impl;
diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx
index 4255a809b327..41b7ac1c413c 100644
--- a/cui/source/inc/pastedlg.hxx
+++ b/cui/source/inc/pastedlg.hxx
@@ -23,6 +23,7 @@
 #include <sot/formats.hxx>
 #include <tools/globname.hxx>
 #include <vcl/transfer.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class TransferableDataHelper;
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index 168c1ab3228e..7432c1225a58 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -21,6 +21,7 @@
 
 #include <memory>
 #include <sfx2/basedlgs.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/cui/source/inc/showcols.hxx b/cui/source/inc/showcols.hxx
index ce6f02dbce28..defe2c8e71f9 100644
--- a/cui/source/inc/showcols.hxx
+++ b/cui/source/inc/showcols.hxx
@@ -21,6 +21,7 @@
 
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/container/XIndexContainer.hpp>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 //  FmShowColsDialog
diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx
index f003538cd6e8..080b8d25d7e1 100644
--- a/cui/source/inc/srchxtra.hxx
+++ b/cui/source/inc/srchxtra.hxx
@@ -21,6 +21,7 @@
 #include <sfx2/tabdlg.hxx>
 #include <svtools/ctrltool.hxx>
 #include <svx/srchdlg.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class SvxSearchFormatDialog : public SfxTabDialogController
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index 6ebea5063e3a..f7924a996e03 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -20,6 +20,7 @@
 
 #include <vcl/customweld.hxx>
 #include <vcl/weld/EntryTreeView.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <sfx2/tabdlg.hxx>
 
diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx
index 05865d68d92f..40f260c990b4 100644
--- a/cui/source/inc/thesdlg.hxx
+++ b/cui/source/inc/thesdlg.hxx
@@ -21,6 +21,7 @@
 #include <com/sun/star/linguistic2/XThesaurus.hpp>
 
 #include <vcl/idle.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <sfx2/basedlgs.hxx>
 
 #include <memory>
diff --git a/cui/source/inc/toolbartabpage.hxx 
b/cui/source/inc/toolbartabpage.hxx
index 5283d6766e3e..4aea5ba5c1c6 100644
--- a/cui/source/inc/toolbartabpage.hxx
+++ b/cui/source/inc/toolbartabpage.hxx
@@ -13,6 +13,8 @@
 #include <com/sun/star/frame/XLayoutManager.hpp>
 
 #include <sfx2/tabdlg.hxx>
+#include <vcl/weld/TreeView.hxx>
+
 class ToolbarTabPage : public SfxTabPage
 {
 private:
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 5b4b2dd5a679..5a5b55fea0ac 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -28,6 +28,7 @@
 #include <utility>
 #include <i18nutil/searchopt.hxx>
 #include <vcl/timer.hxx>
+#include <vcl/weld/TreeView.hxx>
 
 class SfxModule;
 class SfxShell;
diff --git a/cui/source/options/certpath.hxx b/cui/source/options/certpath.hxx
index 0e25fd78946e..563caedee43f 100644
--- a/cui/source/options/certpath.hxx
+++ b/cui/source/options/certpath.hxx
@@ -9,6 +9,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class CertPathDialog : public weld::GenericDialogController
diff --git a/cui/source/options/connpooloptions.hxx 
b/cui/source/options/connpooloptions.hxx
index 55e345b34adf..4d5867e8656c 100644
--- a/cui/source/options/connpooloptions.hxx
+++ b/cui/source/options/connpooloptions.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <sfx2/tabdlg.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <com/sun/star/configuration/XReadWriteAccess.hpp>
 
 #include "connpoolsettings.hxx"
diff --git a/cui/source/options/dbregister.cxx 
b/cui/source/options/dbregister.cxx
index 06fc4f41a5f8..106575cc356b 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -31,6 +31,7 @@
 #include <bitmaps.hlst>
 #include <utility>
 #include <vcl/svapp.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <svl/itemset.hxx>
 #include "doclinkdialog.hxx"
diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx
index 856deedfeaa6..7cea1ac07bdf 100644
--- a/cui/source/options/fontsubs.hxx
+++ b/cui/source/options/fontsubs.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <sfx2/tabdlg.hxx>
+#include <vcl/weld/TreeView.hxx>
 
 // class SvxFontSubstTabPage 
----------------------------------------------------
 class SvxFontSubstTabPage : public SfxTabPage
diff --git a/cui/source/options/optaboutconfig.hxx 
b/cui/source/options/optaboutconfig.hxx
index 47b5f505fddf..2ca47dda1470 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -13,6 +13,7 @@
 
 #include <dlgname.hxx>
 #include <i18nutil/searchopt.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <vector>
diff --git a/cui/source/options/optaccessibility.hxx 
b/cui/source/options/optaccessibility.hxx
index eeb84ab6d6ee..cac51636737b 100644
--- a/cui/source/options/optaccessibility.hxx
+++ b/cui/source/options/optaccessibility.hxx
@@ -20,6 +20,7 @@
 
 #include <sfx2/tabdlg.hxx>
 #include <sfx2/AccessibilityIssue.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <map>
 
 class SvxAccessibilityOptionsTabPage : public SfxTabPage
diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx
index dca98b9f7fbf..cd3b75d5f68e 100644
--- a/cui/source/options/optchart.hxx
+++ b/cui/source/options/optchart.hxx
@@ -24,6 +24,7 @@
 #include <svx/xtable.hxx>
 #include <svx/PaletteManager.hxx>
 #include <vcl/customweld.hxx>
+#include <vcl/weld/TreeView.hxx>
 
 #include "cfgchart.hxx"
 
diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx
index 51a51ec04456..47f5a701048e 100644
--- a/cui/source/options/optfltr.hxx
+++ b/cui/source/options/optfltr.hxx
@@ -19,6 +19,7 @@
 #pragma once
 
 #include <sfx2/tabdlg.hxx>
+#include <vcl/weld/TreeView.hxx>
 
 class OfaMSFilterTabPage : public SfxTabPage
 {
diff --git a/cui/source/options/tsaurls.hxx b/cui/source/options/tsaurls.hxx
index bdfddbfce9df..f1d763a4920a 100644
--- a/cui/source/options/tsaurls.hxx
+++ b/cui/source/options/tsaurls.hxx
@@ -9,6 +9,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <set>
diff --git a/cui/source/options/webconninfo.hxx 
b/cui/source/options/webconninfo.hxx
index 6cff97fa0620..00dde27c29aa 100644
--- a/cui/source/options/webconninfo.hxx
+++ b/cui/source/options/webconninfo.hxx
@@ -17,6 +17,7 @@
  */
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 namespace svx
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 5d611d90506b..132f2c903305 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -26,6 +26,7 @@
 #include <vcl/keycodes.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/transfer.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/objsh.hxx>
 #include <sfx2/viewsh.hxx>
diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index 715031fe4e71..b812ecb14876 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -70,6 +70,7 @@
 #include <comphelper/interaction.hxx>
 
 #include <vcl/svapp.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <unotools/closeveto.hxx>
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx 
b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index a0318ded9f87..f98f93f6a3f9 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -28,6 +28,7 @@
 #include <vcl/graph.hxx>
 #include <vcl/GraphicObject.hxx>
 #include <vcl/customweld.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <AppElementType.hxx>
 #include <ChildWindow.hxx>
diff --git a/dbaccess/source/ui/app/AppView.hxx 
b/dbaccess/source/ui/app/AppView.hxx
index 56930548f440..1ce62188ea7c 100644
--- a/dbaccess/source/ui/app/AppView.hxx
+++ b/dbaccess/source/ui/app/AppView.hxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/sdbc/XConnection.hpp>
 #include <unotools/eventlisteneradapter.hxx>
 #include <vcl/InterimItemWindow.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <IClipBoardTest.hxx>
 #include <AppElementType.hxx>
diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx 
b/dbaccess/source/ui/dlg/dbfindex.hxx
index 6aeeffa3c0a0..5faf8653bed6 100644
--- a/dbaccess/source/ui/dlg/dbfindex.hxx
+++ b/dbaccess/source/ui/dlg/dbfindex.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <utility>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <deque>
 
diff --git a/dbaccess/source/ui/dlg/dsselect.hxx 
b/dbaccess/source/ui/dlg/dsselect.hxx
index 1c10687b0ef3..515da030efe8 100644
--- a/dbaccess/source/ui/dlg/dsselect.hxx
+++ b/dbaccess/source/ui/dlg/dsselect.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <rtl/ustring.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <memory>
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx 
b/dbaccess/source/ui/dlg/sqlmessage.cxx
index c3a9b4da7c89..423740380007 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -25,6 +25,7 @@
 #include <utility>
 #include <vcl/stdtext.hxx>
 #include <vcl/svapp.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <osl/diagnose.h>
 #include <connectivity/dbexception.hxx>
diff --git a/dbaccess/source/ui/dlg/tablespage.hxx 
b/dbaccess/source/ui/dlg/tablespage.hxx
index 483518b2ad40..e72f0b66aba5 100644
--- a/dbaccess/source/ui/dlg/tablespage.hxx
+++ b/dbaccess/source/ui/dlg/tablespage.hxx
@@ -22,6 +22,7 @@
 #include "adminpages.hxx"
 #include <tabletree.hxx>
 #include <com/sun/star/sdbc/XConnection.hpp>
+#include <vcl/weld/TreeView.hxx>
 
 namespace dbaui
 {
diff --git a/dbaccess/source/ui/inc/CollectionView.hxx 
b/dbaccess/source/ui/inc/CollectionView.hxx
index 69d378c4d542..05ffb23f1485 100644
--- a/dbaccess/source/ui/inc/CollectionView.hxx
+++ b/dbaccess/source/ui/inc/CollectionView.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <com/sun/star/ucb/XContent.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx 
b/dbaccess/source/ui/inc/TableWindowListBox.hxx
index ab1f84d52703..8c309eef9ecd 100644
--- a/dbaccess/source/ui/inc/TableWindowListBox.hxx
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -20,6 +20,7 @@
 
 #include <vcl/transfer.hxx>
 #include <vcl/InterimItemWindow.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include "callbacks.hxx"
 
 namespace dbaui
diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx 
b/dbaccess/source/ui/inc/WTypeSelect.hxx
index 3c206d0fecb1..e5d1c4e70741 100644
--- a/dbaccess/source/ui/inc/WTypeSelect.hxx
+++ b/dbaccess/source/ui/inc/WTypeSelect.hxx
@@ -22,6 +22,8 @@
 #include "TypeInfo.hxx"
 #include "WTabPage.hxx"
 
+#include <vcl/weld/TreeView.hxx>
+
 class SvStream;
 
 namespace dbaui
diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx 
b/dbaccess/source/ui/inc/adtabdlg.hxx
index 4e942023b9bf..67a5cdae8fd7 100644
--- a/dbaccess/source/ui/inc/adtabdlg.hxx
+++ b/dbaccess/source/ui/inc/adtabdlg.hxx
@@ -20,6 +20,7 @@
 
 #include <memory>
 #include <com/sun/star/sdbc/XConnection.hpp>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include "tabletree.hxx"
 
diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx 
b/dbaccess/source/ui/inc/dbtreelistbox.hxx
index e86666c70a09..a1e681c9c87e 100644
--- a/dbaccess/source/ui/inc/dbtreelistbox.hxx
+++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx
@@ -21,6 +21,7 @@
 #include <vcl/InterimItemWindow.hxx>
 #include <vcl/transfer.hxx>
 #include <vcl/timer.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <memory>
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx 
b/dbaccess/source/ui/inc/indexdialog.hxx
index b3be58af4e20..61ce00678a25 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/sdbc/XConnection.hpp>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uno/XComponentContext.hpp>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include "indexes.hxx"
 
diff --git a/dbaccess/source/ui/inc/paramdialog.hxx 
b/dbaccess/source/ui/inc/paramdialog.hxx
index a4b1b46ddc79..f7c6ed3370d3 100644
--- a/dbaccess/source/ui/inc/paramdialog.hxx
+++ b/dbaccess/source/ui/inc/paramdialog.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <vcl/timer.hxx>
 
diff --git a/dbaccess/source/ui/inc/tabletree.hxx 
b/dbaccess/source/ui/inc/tabletree.hxx
index ebfbf7d29c4a..6a19bb5285eb 100644
--- a/dbaccess/source/ui/inc/tabletree.hxx
+++ b/dbaccess/source/ui/inc/tabletree.hxx
@@ -25,6 +25,8 @@
 #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
 #include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
+#include <vcl/weld/TreeView.hxx>
+
 #include <memory>
 
 namespace dbaui
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx 
b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
index b35ba7069aa6..2c67af4907cb 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
@@ -21,6 +21,7 @@
 
 #include <sal/config.h>
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <vector>
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx 
b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index ec344effa2a1..cf02575e1e90 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -27,6 +27,7 @@
 #include <rtl/ref.hxx>
 #include <rtl/ustring.hxx>
 #include <tools/link.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include "dp_gui_updatedata.hxx"
diff --git a/extensions/source/abpilot/tableselectionpage.hxx 
b/extensions/source/abpilot/tableselectionpage.hxx
index 6b3a615aec26..3fb45d3d8757 100644
--- a/extensions/source/abpilot/tableselectionpage.hxx
+++ b/extensions/source/abpilot/tableselectionpage.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include "abspage.hxx"
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 namespace abp
diff --git a/extensions/source/bibliography/datman.cxx 
b/extensions/source/bibliography/datman.cxx
index 3a9c4dac14c1..01f1209c3344 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -46,6 +46,7 @@
 #include <com/sun/star/container/XNameContainer.hpp>
 #include <tools/debug.hxx>
 #include <tools/urlobj.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include "datman.hxx"
 #include "bibresid.hxx"
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx 
b/extensions/source/dbpilots/commonpagesdbp.hxx
index e48913f786fc..9c619e85261d 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include "controlwizard.hxx"
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <com/sun/star/sdb/XDatabaseContext.hpp>
 
diff --git a/extensions/source/dbpilots/controlwizard.hxx 
b/extensions/source/dbpilots/controlwizard.hxx
index 82198342ea70..4cdebc88f71b 100644
--- a/extensions/source/dbpilots/controlwizard.hxx
+++ b/extensions/source/dbpilots/controlwizard.hxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/sdbc/XConnection.hpp>
 #include <com/sun/star/task/XInteractionHandler.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <vcl/wizardmachine.hxx>
 #include "dbptypes.hxx"
diff --git a/extensions/source/propctrlr/listselectiondlg.hxx 
b/extensions/source/propctrlr/listselectiondlg.hxx
index 044cefb54163..916948a0a04d 100644
--- a/extensions/source/propctrlr/listselectiondlg.hxx
+++ b/extensions/source/propctrlr/listselectiondlg.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/extensions/source/propctrlr/selectlabeldialog.hxx 
b/extensions/source/propctrlr/selectlabeldialog.hxx
index 55356bc27ed5..48a545e95f72 100644
--- a/extensions/source/propctrlr/selectlabeldialog.hxx
+++ b/extensions/source/propctrlr/selectlabeldialog.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 
diff --git a/extensions/source/propctrlr/taborder.hxx 
b/extensions/source/propctrlr/taborder.hxx
index 7007c6130cd1..a4c402c8aaf2 100644
--- a/extensions/source/propctrlr/taborder.hxx
+++ b/extensions/source/propctrlr/taborder.hxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/awt/XControlContainer.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 namespace pcr
diff --git a/extensions/source/scanner/sanedlg.hxx 
b/extensions/source/scanner/sanedlg.hxx
index d410f24b4b55..49baf6462c63 100644
--- a/extensions/source/scanner/sanedlg.hxx
+++ b/extensions/source/scanner/sanedlg.hxx
@@ -19,6 +19,7 @@
 #pragma once
 
 #include <vcl/customweld.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include "sane.hxx"
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 961ebeaeeb0e..4e3e088f053c 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -24,6 +24,7 @@
 
 #include <vcl/pdfwriter.hxx>
 #include <vcl/FilterConfigItem.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <com/sun/star/beans/NamedValue.hpp>
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx 
b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
index 6addacc112b2..cf07887e1a60 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
@@ -20,6 +20,7 @@
 
 #include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <vcl/locktoplevels.hxx>
 #include <unotools/moduleoptions.hxx>
diff --git a/formula/source/ui/dlg/funcpage.hxx 
b/formula/source/ui/dlg/funcpage.hxx
index a336074d330a..76b717bb7c14 100644
--- a/formula/source/ui/dlg/funcpage.hxx
+++ b/formula/source/ui/dlg/funcpage.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <vector>
 #include <set>
diff --git a/formula/source/ui/dlg/structpg.hxx 
b/formula/source/ui/dlg/structpg.hxx
index 14bb50d94f5d..bd0d4601488a 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <formula/formula.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 namespace formula
diff --git a/fpicker/source/office/PlacesListBox.hxx 
b/fpicker/source/office/PlacesListBox.hxx
index 03c8a69c74b6..3aabdb5aed14 100644
--- a/fpicker/source/office/PlacesListBox.hxx
+++ b/fpicker/source/office/PlacesListBox.hxx
@@ -11,6 +11,7 @@
 #include "iodlg.hxx"
 
 #include <svtools/place.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <memory>
diff --git a/fpicker/source/office/fileview.hxx 
b/fpicker/source/office/fileview.hxx
index 8b98e0c7006b..4145f6896c8f 100644
--- a/fpicker/source/office/fileview.hxx
+++ b/fpicker/source/office/fileview.hxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/uno/Sequence.h>
 #include <utility>
 #include <vcl/weld/IconView.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <rtl/ustring.hxx>
 
diff --git a/fpicker/source/office/foldertree.hxx 
b/fpicker/source/office/foldertree.hxx
index f572e5fe44e2..80740d7969a7 100644
--- a/fpicker/source/office/foldertree.hxx
+++ b/fpicker/source/office/foldertree.hxx
@@ -10,6 +10,7 @@
 #pragma once
 
 #include <com/sun/star/uno/Sequence.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 namespace com :: sun :: star :: ucb { class XCommandEnvironment; }
diff --git a/include/sfx2/devtools/DocumentModelTreeHandler.hxx 
b/include/sfx2/devtools/DocumentModelTreeHandler.hxx
index a1c9efa40923..d5ae86c54cf6 100644
--- a/include/sfx2/devtools/DocumentModelTreeHandler.hxx
+++ b/include/sfx2/devtools/DocumentModelTreeHandler.hxx
@@ -10,6 +10,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <com/sun/star/uno/XInterface.hpp>
diff --git a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx 
b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
index 9d2df59b8e8c..9f8f1eb9cc94 100644
--- a/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
+++ b/include/sfx2/devtools/ObjectInspectorTreeHandler.hxx
@@ -10,6 +10,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <vcl/commandevent.hxx>
 #include <comphelper/string.hxx>
diff --git a/include/sfx2/devtools/ObjectInspectorWidgets.hxx 
b/include/sfx2/devtools/ObjectInspectorWidgets.hxx
index a2991d6c2d11..3e1a9ffe4161 100644
--- a/include/sfx2/devtools/ObjectInspectorWidgets.hxx
+++ b/include/sfx2/devtools/ObjectInspectorWidgets.hxx
@@ -11,6 +11,7 @@
 #pragma once
 
 #include <sfx2/dllapi.h>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 struct SFX2_DLLPUBLIC ObjectInspectorWidgets
diff --git a/include/sfx2/listview.hxx b/include/sfx2/listview.hxx
index 99ea8666ec5b..3c63b815876d 100644
--- a/include/sfx2/listview.hxx
+++ b/include/sfx2/listview.hxx
@@ -9,6 +9,7 @@
 
 #pragma once
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 enum TemplateViewMode
diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx
index c767f285ca2c..88b5eb5a8b5b 100644
--- a/include/sfx2/newstyle.hxx
+++ b/include/sfx2/newstyle.hxx
@@ -24,6 +24,7 @@
 #include <sfx2/dllapi.h>
 #include <svl/style.hxx>
 #include <vcl/weld/EntryTreeView.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class SFX2_DLLPUBLIC SfxNewStyleDlg final : public 
weld::GenericDialogController
diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index 15dda21192b0..1ab231146da5 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -18,6 +18,7 @@
 
 #include <vcl/idle.hxx>
 #include <vcl/timer.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <sfx2/templatedlglocalview.hxx>
diff --git a/include/svx/ClassificationDialog.hxx 
b/include/svx/ClassificationDialog.hxx
index 3b390233c37f..77785f2b86c2 100644
--- a/include/svx/ClassificationDialog.hxx
+++ b/include/svx/ClassificationDialog.hxx
@@ -12,6 +12,7 @@
 #define INCLUDED_SVX_CLASSIFICATIONDIALOG_HXX
 
 #include <sal/config.h>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <svx/svxdllapi.h>
 #include <sfx2/classificationhelper.hxx>
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 6a6763d67fc6..0b7bf734efc8 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -27,6 +27,7 @@
 #include <tools/datetime.hxx>
 #include <tools/link.hxx>
 #include <tools/time.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <memory>
 
diff --git a/include/svx/sidebar/InspectorTextPanel.hxx 
b/include/svx/sidebar/InspectorTextPanel.hxx
index ae34f720d4a4..7d47276efa19 100644
--- a/include/svx/sidebar/InspectorTextPanel.hxx
+++ b/include/svx/sidebar/InspectorTextPanel.hxx
@@ -21,6 +21,7 @@
 #include <sfx2/sidebar/ControllerItem.hxx>
 #include <sfx2/sidebar/PanelLayout.hxx>
 #include <svx/svxdllapi.h>
+#include <vcl/weld/TreeView.hxx>
 
 namespace svx::sidebar
 {
diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx
index 6f7b51fb422d..70dc795ea07c 100644
--- a/include/svx/txencbox.hxx
+++ b/include/svx/txencbox.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_SVX_TXENCBOX_HXX
 #define INCLUDED_SVX_TXENCBOX_HXX
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <rtl/textenc.h>
 #include <svx/svxdllapi.h>
diff --git a/include/vcl/jsdialog/executor.hxx 
b/include/vcl/jsdialog/executor.hxx
index a6e20ea9c477..3cfaa59f856e 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -12,6 +12,7 @@
 #include <vcl/dllapi.h>
 #include <vcl/uitest/uiobject.hxx>
 #include <vcl/weld/IconView.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <unordered_map>
 
diff --git a/include/vcl/weld/EntryTreeView.hxx 
b/include/vcl/weld/EntryTreeView.hxx
index 24cf702a2703..ce9530188102 100644
--- a/include/vcl/weld/EntryTreeView.hxx
+++ b/include/vcl/weld/EntryTreeView.hxx
@@ -10,6 +10,7 @@
 #pragma once
 
 #include <vcl/dllapi.h>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 namespace weld
diff --git a/include/vcl/weld/TreeView.hxx b/include/vcl/weld/TreeView.hxx
new file mode 100644
index 000000000000..03486618a120
--- /dev/null
+++ b/include/vcl/weld/TreeView.hxx
@@ -0,0 +1,636 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <vcl/dllapi.h>
+#include <vcl/weld/weld.hxx>
+
+namespace weld
+{
+enum class ColumnToggleType
+{
+    Check,
+    Radio
+};
+
+/* Model column indexes are considered to begin at 0, but with special columns
+   before index 0. A expander image column (and an additional optional toggle
+   button column when enable_toggle_buttons is used). Column index -1 is
+   reserved to access those columns.
+*/
+class VCL_DLLPUBLIC TreeView : virtual public Widget
+{
+    friend class ::LOKTrigger;
+
+public:
+    typedef std::pair<const TreeIter&, int> iter_col;
+    typedef std::pair<const TreeIter&, OUString> iter_string;
+    // OUString is the id of the row, it may be null to measure the height of 
a generic line
+    typedef std::pair<vcl::RenderContext&, const OUString&> get_size_args;
+    typedef std::tuple<vcl::RenderContext&, const tools::Rectangle&, bool, 
const OUString&>
+        render_args;
+
+private:
+    OUString m_sSavedValue;
+
+protected:
+    Link<TreeView&, void> m_aSelectionChangedHdl;
+    Link<TreeView&, bool> m_aRowActivatedHdl;
+    Link<int, void> m_aColumnClickedHdl;
+    Link<const iter_col&, void> m_aRadioToggleHdl;
+    Link<const TreeIter&, bool> m_aEditingStartedHdl;
+    Link<const iter_string&, bool> m_aEditingDoneHdl;
+    // if handler returns false, the expansion of the row is refused
+    Link<const TreeIter&, bool> m_aExpandingHdl;
+    // if handler returns false, the collapse of the row is refused
+    Link<const TreeIter&, bool> m_aCollapsingHdl;
+    Link<TreeView&, void> m_aVisibleRangeChangedHdl;
+    Link<TreeView&, void> m_aModelChangedHdl;
+    // if handler returns true, drag is disallowed, consumer can change bool
+    // arg to false to disable the treeview default dnd icon
+    Link<bool&, bool> m_aDragBeginHdl;
+    std::function<int(const weld::TreeIter&, const weld::TreeIter&)> 
m_aCustomSort;
+
+protected:
+    void signal_selection_changed()
+    {
+        if (notify_events_disabled())
+            return;
+        m_aSelectionChangedHdl.Call(*this);
+    }
+
+    bool signal_row_activated()
+    {
+        if (notify_events_disabled())
+            return true;
+        return m_aRowActivatedHdl.Call(*this);
+    }
+
+    void signal_column_clicked(int nColumn) { 
m_aColumnClickedHdl.Call(nColumn); }
+    bool signal_expanding(const TreeIter& rIter)
+    {
+        return !m_aExpandingHdl.IsSet() || m_aExpandingHdl.Call(rIter);
+    }
+    bool signal_collapsing(const TreeIter& rIter)
+    {
+        return !m_aCollapsingHdl.IsSet() || m_aCollapsingHdl.Call(rIter);
+    }
+    void signal_visible_range_changed()
+    {
+        if (notify_events_disabled())
+            return;
+        m_aVisibleRangeChangedHdl.Call(*this);
+    }
+
+    void signal_model_changed()
+    {
+        if (notify_events_disabled())
+            return;
+        m_aModelChangedHdl.Call(*this);
+    }
+
+    void signal_toggled(const iter_col& rIterCol) { 
m_aRadioToggleHdl.Call(rIterCol); }
+
+    bool signal_editing_started(const TreeIter& rIter) { return 
m_aEditingStartedHdl.Call(rIter); }
+
+    bool signal_editing_done(const iter_string& rIterText)
+    {
+        return m_aEditingDoneHdl.Call(rIterText);
+    }
+
+    Link<const TreeIter&, OUString> m_aQueryTooltipHdl;
+
+    OUString signal_query_tooltip(const TreeIter& rIter)
+    {
+        if (notify_events_disabled())
+            return {};
+        return m_aQueryTooltipHdl.Call(rIter);
+    }
+
+    Link<render_args, void> m_aRenderHdl;
+    void signal_custom_render(vcl::RenderContext& rDevice, const 
tools::Rectangle& rRect,
+                              bool bSelected, const OUString& rId)
+    {
+        m_aRenderHdl.Call(render_args(rDevice, rRect, bSelected, rId));
+    }
+
+    Link<get_size_args, Size> m_aGetSizeHdl;
+    Size signal_custom_get_size(vcl::RenderContext& rDevice, const OUString& 
rId)
+    {
+        return m_aGetSizeHdl.Call(get_size_args(rDevice, rId));
+    }
+
+    virtual void do_insert(const TreeIter* pParent, int pos, const OUString* 
pStr,
+                           const OUString* pId, const OUString* pIconName,
+                           VirtualDevice* pImageSurface, bool 
bChildrenOnDemand, TreeIter* pRet)
+        = 0;
+    virtual void do_insert_separator(int pos, const OUString& rId) = 0;
+    virtual void do_select(int pos) = 0;
+    virtual void do_unselect(int pos) = 0;
+    virtual void do_remove(int pos) = 0;
+    virtual void do_scroll_to_row(int row) = 0;
+    virtual void do_set_cursor(int pos) = 0;
+    virtual void do_set_cursor(const TreeIter& rIter) = 0;
+    virtual void do_remove(const TreeIter& rIter) = 0;
+    virtual void do_select(const TreeIter& rIter) = 0;
+    virtual void do_unselect(const TreeIter& rIter) = 0;
+    virtual void do_scroll_to_row(const TreeIter& rIter) = 0;
+    virtual void do_set_children_on_demand(const TreeIter& rIter, bool 
bChildrenOnDemand) = 0;
+    virtual void do_clear() = 0;
+    virtual void do_remove_selection() = 0;
+
+public:
+    virtual void connect_query_tooltip(const Link<const TreeIter&, OUString>& 
rLink)
+    {
+        assert(!m_aQueryTooltipHdl.IsSet() || !rLink.IsSet());
+        m_aQueryTooltipHdl = rLink;
+    }
+
+    // see 'expanding on-demand node details' for bChildrenOnDemand of true
+    void insert(const TreeIter* pParent, int pos, const OUString* pStr, const 
OUString* pId,
+                const OUString* pIconName, VirtualDevice* pImageSurface, bool 
bChildrenOnDemand,
+                TreeIter* pRet)
+    {
+        disable_notify_events();
+        do_insert(pParent, pos, pStr, pId, pIconName, pImageSurface, 
bChildrenOnDemand, pRet);
+        enable_notify_events();
+    }
+
+    void insert(int nRow, TreeIter* pRet = nullptr)
+    {
+        insert(nullptr, nRow, nullptr, nullptr, nullptr, nullptr, false, pRet);
+    }
+
+    void append(TreeIter* pRet = nullptr) { insert(-1, pRet); }
+
+    void insert(int pos, const OUString& rStr, const OUString* pId, const 
OUString* pIconName,
+                VirtualDevice* pImageSurface)
+    {
+        insert(nullptr, pos, &rStr, pId, pIconName, pImageSurface, false, 
nullptr);
+    }
+    void insert_text(int pos, const OUString& rStr)
+    {
+        insert(nullptr, pos, &rStr, nullptr, nullptr, nullptr, false, nullptr);
+    }
+    void append_text(const OUString& rStr)
+    {
+        insert(nullptr, -1, &rStr, nullptr, nullptr, nullptr, false, nullptr);
+    }
+    void append(const OUString& rId, const OUString& rStr)
+    {
+        insert(nullptr, -1, &rStr, &rId, nullptr, nullptr, false, nullptr);
+    }
+    void append(const OUString& rId, const OUString& rStr, const OUString& 
rImage)
+    {
+        insert(nullptr, -1, &rStr, &rId, &rImage, nullptr, false, nullptr);
+    }
+    void append(const TreeIter* pParent, const OUString& rStr)
+    {
+        insert(pParent, -1, &rStr, nullptr, nullptr, nullptr, false, nullptr);
+    }
+
+    void insert_separator(int pos, const OUString& rId)
+    {
+        disable_notify_events();
+        do_insert_separator(pos, rId);
+        enable_notify_events();
+    }
+
+    void append_separator(const OUString& rId) { insert_separator(-1, rId); }
+
+    void connect_selection_changed(const Link<TreeView&, void>& rLink)
+    {
+        m_aSelectionChangedHdl = rLink;
+    }
+
+    /* A row is "activated" when the user double clicks a treeview row. It may
+       also be emitted when a row is selected and Space or Enter is pressed.
+
+       a return of "true" means the activation has been handled, a "false" 
propagates
+       the activation to the default handler which expands/collapses the row, 
if possible.
+    */
+    void connect_row_activated(const Link<TreeView&, bool>& rLink) { 
m_aRowActivatedHdl = rLink; }
+
+    // Argument is a pair of iter, col describing the toggled node
+    void connect_toggled(const Link<const iter_col&, void>& rLink) { 
m_aRadioToggleHdl = rLink; }
+
+    void connect_column_clicked(const Link<int, void>& rLink) { 
m_aColumnClickedHdl = rLink; }
+    void connect_model_changed(const Link<TreeView&, void>& rLink) { 
m_aModelChangedHdl = rLink; }
+
+    virtual OUString get_selected_text() const = 0;
+    virtual OUString get_selected_id() const = 0;
+
+    // call before inserting any content and connecting to toggle signals,
+    // an pre-inserted checkbutton column will exist at the start of every row
+    // inserted after this call which can be accessed with col index -1
+    virtual void enable_toggle_buttons(ColumnToggleType eType) = 0;
+
+    virtual void set_clicks_to_toggle(int nToggleBehavior) = 0;
+
+    //by index
+    virtual int get_selected_index() const = 0;
+    //Don't select when frozen, select after thaw. Note selection doesn't 
survive a freeze.
+    void select(int pos)
+    {
+        disable_notify_events();
+        do_select(pos);
+        enable_notify_events();
+    }
+
+    void unselect(int pos)
+    {
+        disable_notify_events();
+        do_unselect(pos);
+        enable_notify_events();
+    }
+
+    void remove(int pos)
+    {
+        disable_notify_events();
+        do_remove(pos);
+        enable_notify_events();
+    }
+
+    // col index -1 gets the first text column
+    virtual OUString get_text(int row, int col = -1) const = 0;
+    // col index -1 sets the first text column
+    virtual void set_text(int row, const OUString& rText, int col = -1) = 0;
+    // col index -1 sets all columns
+    virtual void set_sensitive(int row, bool bSensitive, int col = -1) = 0;
+    virtual bool get_sensitive(int row, int col) const = 0;
+    virtual void set_id(int row, const OUString& rId) = 0;
+    // col index -1 sets the expander toggle, enable_toggle_buttons must have 
been called to create that column
+    virtual void set_toggle(int row, TriState eState, int col = -1) = 0;
+    // col index -1 gets the expander toggle, enable_toggle_buttons must have 
been called to create that column
+    virtual TriState get_toggle(int row, int col = -1) const = 0;
+    // col index -1 sets the expander image
+    virtual void set_image(int row, const OUString& rImage, int col = -1) = 0;
+    // col index -1 sets the expander image
+    virtual void set_image(int row, VirtualDevice& rImage, int col = -1) = 0;
+    // col index -1 sets the expander image
+    virtual void set_image(int row, const 
css::uno::Reference<css::graphic::XGraphic>& rImage,
+                           int col = -1)
+        = 0;
+    virtual void set_text_emphasis(int row, bool bOn, int col) = 0;
+    virtual bool get_text_emphasis(int row, int col) const = 0;
+    virtual void set_text_align(int row, double fAlign, int col) = 0;
+    virtual void swap(int pos1, int pos2) = 0;
+    virtual std::vector<int> get_selected_rows() const = 0;
+    virtual void set_font_color(int pos, const Color& rColor) = 0;
+
+    // scroll to make 'row' visible, this will also expand all parent rows of 
'row' as necessary to
+    // make 'row' visible
+    void scroll_to_row(int row)
+    {
+        disable_notify_events();
+        do_scroll_to_row(row);
+        enable_notify_events();
+    }
+
+    virtual bool is_selected(int pos) const = 0;
+    virtual int get_cursor_index() const = 0;
+
+    void set_cursor(int pos)
+    {
+        disable_notify_events();
+        do_set_cursor(pos);
+        enable_notify_events();
+    }
+
+    //by text
+    virtual int find_text(const OUString& rText) const = 0;
+    //Don't select when frozen, select after thaw. Note selection doesn't 
survive a freeze.
+    void select_text(const OUString& rText) { select(find_text(rText)); }
+    void remove_text(const OUString& rText) { remove(find_text(rText)); }
+    std::vector<OUString> get_selected_rows_text() const
+    {
+        std::vector<int> aRows(get_selected_rows());
+        std::vector<OUString> aRet;
+        aRet.reserve(aRows.size());
+        for (auto a : aRows)
+            aRet.push_back(get_text(a));
+        return aRet;
+    }
+
+    //by id
+    virtual OUString get_id(int pos) const = 0;
+    virtual int find_id(const OUString& rId) const = 0;
+    //Don't select when frozen, select after thaw. Note selection doesn't 
survive a freeze.
+    void select_id(const OUString& rId) { select(find_id(rId)); }
+    void remove_id(const OUString& rText) { remove(find_id(rText)); }
+
+    //via iter
+    virtual std::unique_ptr<TreeIter> make_iterator(const TreeIter* pOrig = 
nullptr) const = 0;
+    virtual void copy_iterator(const TreeIter& rSource, TreeIter& rDest) const 
= 0;
+    virtual bool get_selected(TreeIter* pIter) const = 0;
+    virtual bool get_cursor(TreeIter* pIter) const = 0;
+
+    void set_cursor(const TreeIter& rIter)
+    {
+        disable_notify_events();
+        do_set_cursor(rIter);
+        enable_notify_events();
+    }
+
+    virtual bool get_iter_first(TreeIter& rIter) const = 0;
+    // set iter to point to next node at the current level
+    virtual bool iter_next_sibling(TreeIter& rIter) const = 0;
+    // set iter to point to previous node at the current level
+    virtual bool iter_previous_sibling(TreeIter& rIter) const = 0;
+    // set iter to point to next node, depth first, then sibling
+    virtual bool iter_next(TreeIter& rIter) const = 0;
+    // set iter to point to previous node, sibling first then depth
+    virtual bool iter_previous(TreeIter& rIter) const = 0;
+    // set iter to point to first child node
+    virtual bool iter_children(TreeIter& rIter) const = 0;
+    bool iter_nth_sibling(TreeIter& rIter, int nChild) const
+    {
+        bool bRet = true;
+        for (int i = 0; i < nChild && bRet; ++i)
+            bRet = iter_next_sibling(rIter);
+        return bRet;
+    }
+    bool iter_nth_child(TreeIter& rIter, int nChild) const
+    {
+        if (!iter_children(rIter))
+            return false;
+        return iter_nth_sibling(rIter, nChild);
+    }
+    virtual bool iter_parent(TreeIter& rIter) const = 0;
+    virtual int get_iter_depth(const TreeIter& rIter) const = 0;
+    virtual int get_iter_index_in_parent(const TreeIter& rIter) const = 0;
+    /* Compares two paths. If a appears before b in a tree, then -1 is 
returned.
+       If b appears before a , then 1 is returned. If the two nodes are equal,
+       then 0 is returned.
+    */
+    virtual int iter_compare(const TreeIter& a, const TreeIter& b) const = 0;
+    virtual bool iter_has_child(const TreeIter& rIter) const = 0;
+    // returns the number of direct children rIter has
+    virtual int iter_n_children(const TreeIter& rIter) const = 0;
+
+    void remove(const TreeIter& rIter)
+    {
+        disable_notify_events();
+        do_remove(rIter);
+        enable_notify_events();
+    }
+
+    //Don't select when frozen, select after thaw. Note selection doesn't 
survive a freeze.
+    void select(const TreeIter& rIter)
+    {
+        disable_notify_events();
+        do_select(rIter);
+        enable_notify_events();
+    }
+
+    void unselect(const TreeIter& rIter)
+    {
+        disable_notify_events();
+        do_unselect(rIter);
+        enable_notify_events();
+    }
+
+    //visually indent this row as if it was at get_iter_depth() + nIndentLevel
+    virtual void set_extra_row_indent(const TreeIter& rIter, int nIndentLevel) 
= 0;
+    // col index -1 sets the first text column
+    virtual void set_text(const TreeIter& rIter, const OUString& rStr, int col 
= -1) = 0;
+    // col index -1 sets all columns
+    virtual void set_sensitive(const TreeIter& rIter, bool bSensitive, int col 
= -1) = 0;
+    virtual bool get_sensitive(const TreeIter& rIter, int col) const = 0;
+    virtual void set_text_emphasis(const TreeIter& rIter, bool bOn, int col) = 
0;
+    virtual bool get_text_emphasis(const TreeIter& rIter, int col) const = 0;
+    virtual void set_text_align(const TreeIter& rIter, double fAlign, int col) 
= 0;
+    // col index -1 sets the expander toggle, enable_toggle_buttons must have 
been called to create that column
+    virtual void set_toggle(const TreeIter& rIter, TriState bOn, int col = -1) 
= 0;
+    // col index -1 gets the expander toggle, enable_toggle_buttons must have 
been called to create that column
+    virtual TriState get_toggle(const TreeIter& rIter, int col = -1) const = 0;
+    // col index -1 gets the first text column
+    virtual OUString get_text(const TreeIter& rIter, int col = -1) const = 0;
+    virtual void set_id(const TreeIter& rIter, const OUString& rId) = 0;
+    virtual OUString get_id(const TreeIter& rIter) const = 0;
+    // col index -1 sets the expander image
+    virtual void set_image(const TreeIter& rIter, const OUString& rImage, int 
col = -1) = 0;
+    // col index -1 sets the expander image
+    virtual void set_image(const TreeIter& rIter, VirtualDevice& rImage, int 
col = -1) = 0;
+    // col index -1 sets the expander image
+    virtual void set_image(const TreeIter& rIter,
+                           const css::uno::Reference<css::graphic::XGraphic>& 
rImage, int col = -1)
+        = 0;
+    virtual void set_font_color(const TreeIter& rIter, const Color& rColor) = 
0;
+
+    // scroll to make rIter visible, this will also expand all parent rows of 
rIter as necessary to
+    // make rIter visible
+    void scroll_to_row(const TreeIter& rIter)
+    {
+        disable_notify_events();
+        do_scroll_to_row(rIter);
+        enable_notify_events();
+    }
+
+    virtual bool is_selected(const TreeIter& rIter) const = 0;
+
+    virtual void move_subtree(TreeIter& rNode, const TreeIter* pNewParent, int 
nIndexInNewParent)
+        = 0;
+
+    // call func on each element until func returns true or we run out of 
elements
+    virtual void all_foreach(const std::function<bool(TreeIter&)>& func) = 0;
+    // call func on each selected element until func returns true or we run 
out of elements
+    virtual void selected_foreach(const std::function<bool(TreeIter&)>& func) 
= 0;
+    // call func on each visible element until func returns true or we run out 
of elements
+    virtual void visible_foreach(const std::function<bool(TreeIter&)>& func) = 
0;
+    // clear the children of pParent (whole tree if nullptr),
+    // then add nSourceCount rows under pParent, call func on each row
+    // inserted with an arg of the index that this row will be when bulk insert
+    // ends.
+    //
+    // this enables inserting the entries backwards in models where that is 
faster,
+    //
+    // pFixedWidths is optional, when present each matching entry col text
+    // width will not be measured, and the fixed width used instead. Use
+    // sparingly because wider text than the fixed width is clipped and cannot
+    // be scrolled into view horizontally.
+    // @param bGoingToSetText needs to be true, if you plan to call set_text 
inside the insert func.
+    virtual void bulk_insert_for_each(int nSourceCount,
+                                      const std::function<void(TreeIter&, int 
nSourceIndex)>& func,
+                                      const weld::TreeIter* pParent = nullptr,
+                                      const std::vector<int>* pFixedWidths = 
nullptr,
+                                      bool bGoingToSetText = false)
+        = 0;
+
+    /* expanding on-demand node details
+
+    When a node is added with children-on-demand (typically via 'insert' with
+    bChildrenOnDemand of true), then initially in reality the
+    children-on-demand node is given a 'placeholder' child entry to indicate
+    the load-on-demand state.
+
+    The 'placeholder' needs to be there for the expander indicator to be
+    drawn/shown even when there are no "real" entries yet. This child doesn't
+    exist for the purposes of any of the iterator methods, e.g. iter_has_child
+    on an on-demand node which hasn't been expanded yet is false. Likewise the
+    rest of the iterator methods skip over or otherwise ignore that node.
+
+    Normal usage is the user clicks on the expander, the expansion mechanism
+    removes the 'placeholder' entry (set_children_on_demand(false)) and calls
+    any installed expanding-callback (installable via connect_expanding) which
+    has the opportunity to populate the node with children.
+
+    If you decide to directly populate the children of an on-demand node
+    outside of the expanding-callback then you also need to explicitly remove
+    the 'placeholder' with set_children_on_demand(false) otherwise the treeview
+    is in an inconsistent state.  */
+
+    virtual bool get_row_expanded(const TreeIter& rIter) const = 0;
+    // expand row will first trigger the callback set via connect_expanding 
before expanding
+    virtual void expand_row(const TreeIter& rIter) = 0;
+    // collapse row will first trigger the callback set via connect_collapsing 
before collapsing
+    virtual void collapse_row(const TreeIter& rIter) = 0;
+
+    // set the empty node to appear as if it has children, true is equivalent
+    // to 'insert' with a bChildrenOnDemand of true. See notes above.
+    void set_children_on_demand(const TreeIter& rIter, bool bChildrenOnDemand)
+    {
+        disable_notify_events();
+        do_set_children_on_demand(rIter, bChildrenOnDemand);
+        enable_notify_events();
+    }
+
+    // return if the node is configured to be populated on-demand
+    virtual bool get_children_on_demand(const TreeIter& rIter) const = 0;
+    // set if the expanders are shown or not
+    virtual void set_show_expanders(bool bShow) = 0;
+
+    void connect_expanding(const Link<const TreeIter&, bool>& rLink) { 
m_aExpandingHdl = rLink; }
+    void connect_collapsing(const Link<const TreeIter&, bool>& rLink) { 
m_aCollapsingHdl = rLink; }
+
+    // rStartLink returns true to allow editing, false to disallow
+    // rEndLink returns true to accept the edit, false to reject
+    virtual void connect_editing(const Link<const TreeIter&, bool>& rStartLink,
+                                 const Link<const iter_string&, bool>& 
rEndLink)
+    {
+        assert(rStartLink.IsSet() == rEndLink.IsSet() && "should be both on or 
both off");
+        m_aEditingStartedHdl = rStartLink;
+        m_aEditingDoneHdl = rEndLink;
+    }
+
+    virtual void start_editing(const weld::TreeIter& rEntry) = 0;
+    virtual void end_editing() = 0;
+
+    virtual void connect_visible_range_changed(const Link<TreeView&, void>& 
rLink)
+    {
+        assert(!m_aVisibleRangeChangedHdl.IsSet() || !rLink.IsSet());
+        m_aVisibleRangeChangedHdl = rLink;
+    }
+
+    virtual void enable_drag_source(rtl::Reference<TransferDataContainer>& 
rTransferable,
+                                    sal_uInt8 eDNDConstants)
+        = 0;
+
+    void connect_drag_begin(const Link<bool&, bool>& rLink) { m_aDragBeginHdl 
= rLink; }
+
+    //all of them. Don't select when frozen, select after thaw. Note selection 
doesn't survive a freeze.
+    virtual void select_all() = 0;
+    virtual void unselect_all() = 0;
+
+    // return the number of toplevel nodes
+    virtual int n_children() const = 0;
+
+    // afterwards, entries will be in default ascending sort order
+    virtual void make_sorted() = 0;
+    virtual void make_unsorted() = 0;
+    virtual bool get_sort_order() const = 0;
+    virtual void set_sort_order(bool bAscending) = 0;
+
+    // TRUE ascending, FALSE, descending, INDET, neither (off)
+    virtual void set_sort_indicator(TriState eState, int nColumn) = 0;
+    virtual TriState get_sort_indicator(int nColumn) const = 0;
+
+    virtual int get_sort_column() const = 0;
+    virtual void set_sort_column(int nColumn) = 0;
+
+    virtual void
+    set_sort_func(const std::function<int(const weld::TreeIter&, const 
weld::TreeIter&)>& func)
+    {
+        m_aCustomSort = func;
+    }
+
+    void clear()
+    {
+        disable_notify_events();
+        do_clear();
+        enable_notify_events();
+    }
+
+    virtual int get_height_rows(int nRows) const = 0;
+
+    virtual void columns_autosize() = 0;
+    virtual void set_column_fixed_widths(const std::vector<int>& rWidths) = 0;
+    virtual void set_column_editables(const std::vector<bool>& rEditables) = 0;
+    virtual int get_column_width(int nCol) const = 0;
+    virtual void set_centered_column(int nCol) = 0;
+    virtual OUString get_column_title(int nColumn) const = 0;
+    virtual void set_column_title(int nColumn, const OUString& rTitle) = 0;
+
+    int get_checkbox_column_width() const { return 
get_approximate_digit_width() * 3 + 6; }
+
+    virtual void set_selection_mode(SelectionMode eMode) = 0;
+    virtual int count_selected_rows() const = 0;
+
+    // remove the selected nodes
+    void remove_selection()
+    {
+        disable_notify_events();
+        do_remove_selection();
+        enable_notify_events();
+    }
+
+    // only meaningful is call this from a "changed" callback, true if the 
change
+    // was due to mouse hovering over the entry
+    virtual bool changed_by_hover() const = 0;
+
+    virtual void vadjustment_set_value(int value) = 0;
+    virtual int vadjustment_get_value() const = 0;
+
+    void save_value() { m_sSavedValue = get_selected_text(); }
+    OUString const& get_saved_value() const { return m_sSavedValue; }
+    bool get_value_changed_from_saved() const { return m_sSavedValue != 
get_selected_text(); }
+
+    // for custom rendering a cell
+    void connect_custom_get_size(const Link<get_size_args, Size>& rLink) { 
m_aGetSizeHdl = rLink; }
+    void connect_custom_render(const Link<render_args, void>& rLink) { 
m_aRenderHdl = rLink; }
+    // call set_column_custom_renderer after setting custom callbacks
+    virtual void set_column_custom_renderer(int nColumn, bool bEnable) = 0;
+    // redraw all rows, typically only useful with custom rendering to redraw 
due to external
+    // state change
+    virtual void queue_draw() = 0;
+
+    /* with bDnDMode false simply return the row under the point
+     *
+     * with bDnDMode true:
+     * a) return the row which should be dropped on, which may
+     *    be different from the row the mouse is over in some backends where
+     *    positioning the mouse on the bottom half of a row indicates to drop
+     *    after the row
+     * b) dnd highlight the dest row
+     */
+    virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* 
pResult, bool bDnDMode,
+                                     bool bAutoScroll = true)
+        = 0;
+    virtual void unset_drag_dest_row() = 0;
+    virtual tools::Rectangle get_row_area(const weld::TreeIter& rIter) const = 
0;
+    // for dragging and dropping between TreeViews, return the active source
+    virtual TreeView* get_drag_source() const = 0;
+
+    using Widget::set_sensitive;
+    using Widget::get_sensitive;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/include/vcl/weld/weld.hxx b/include/vcl/weld/weld.hxx
index 4ce91d5e6809..34cf4bf28f6c 100644
--- a/include/vcl/weld/weld.hxx
+++ b/include/vcl/weld/weld.hxx
@@ -81,6 +81,7 @@ class Container;
 class DialogController;
 class EntryTreeView;
 class IconView;
+class TreeView;
 
 class VCL_DLLPUBLIC Widget
 {
@@ -1006,12 +1007,6 @@ public:
     virtual void set_max_drop_down_rows(int nRows) = 0;
 };
 
-enum class ColumnToggleType
-{
-    Check,
-    Radio
-};
-
 class VCL_DLLPUBLIC TreeIter
 {
 private:
@@ -1024,618 +1019,6 @@ public:
     virtual ~TreeIter() {}
 };
 
-/* Model column indexes are considered to begin at 0, but with special columns
-   before index 0. A expander image column (and an additional optional toggle
-   button column when enable_toggle_buttons is used). Column index -1 is
-   reserved to access those columns.
-*/
-class VCL_DLLPUBLIC TreeView : virtual public Widget
-{
-    friend class ::LOKTrigger;
-
-public:
-    typedef std::pair<const TreeIter&, int> iter_col;
-    typedef std::pair<const TreeIter&, OUString> iter_string;
-    // OUString is the id of the row, it may be null to measure the height of 
a generic line
-    typedef std::pair<vcl::RenderContext&, const OUString&> get_size_args;
-    typedef std::tuple<vcl::RenderContext&, const tools::Rectangle&, bool, 
const OUString&>
-        render_args;
-
-private:
-    OUString m_sSavedValue;
-
-protected:
-    Link<TreeView&, void> m_aSelectionChangedHdl;
-    Link<TreeView&, bool> m_aRowActivatedHdl;
-    Link<int, void> m_aColumnClickedHdl;
-    Link<const iter_col&, void> m_aRadioToggleHdl;
-    Link<const TreeIter&, bool> m_aEditingStartedHdl;
-    Link<const iter_string&, bool> m_aEditingDoneHdl;
-    // if handler returns false, the expansion of the row is refused
-    Link<const TreeIter&, bool> m_aExpandingHdl;
-    // if handler returns false, the collapse of the row is refused
-    Link<const TreeIter&, bool> m_aCollapsingHdl;
-    Link<TreeView&, void> m_aVisibleRangeChangedHdl;
-    Link<TreeView&, void> m_aModelChangedHdl;
-    // if handler returns true, drag is disallowed, consumer can change bool
-    // arg to false to disable the treeview default dnd icon
-    Link<bool&, bool> m_aDragBeginHdl;
-    std::function<int(const weld::TreeIter&, const weld::TreeIter&)> 
m_aCustomSort;
-
-protected:
-    void signal_selection_changed()
-    {
-        if (notify_events_disabled())
-            return;
-        m_aSelectionChangedHdl.Call(*this);
-    }
-
-    bool signal_row_activated()
-    {
-        if (notify_events_disabled())
-            return true;
-        return m_aRowActivatedHdl.Call(*this);
-    }
-
-    void signal_column_clicked(int nColumn) { 
m_aColumnClickedHdl.Call(nColumn); }
-    bool signal_expanding(const TreeIter& rIter)
-    {
-        return !m_aExpandingHdl.IsSet() || m_aExpandingHdl.Call(rIter);
-    }
-    bool signal_collapsing(const TreeIter& rIter)
-    {
-        return !m_aCollapsingHdl.IsSet() || m_aCollapsingHdl.Call(rIter);
-    }
-    void signal_visible_range_changed()
-    {
-        if (notify_events_disabled())
-            return;
-        m_aVisibleRangeChangedHdl.Call(*this);
-    }
-
-    void signal_model_changed()
-    {
-        if (notify_events_disabled())
-            return;
-        m_aModelChangedHdl.Call(*this);
-    }
-
-    void signal_toggled(const iter_col& rIterCol) { 
m_aRadioToggleHdl.Call(rIterCol); }
-
-    bool signal_editing_started(const TreeIter& rIter) { return 
m_aEditingStartedHdl.Call(rIter); }
-
-    bool signal_editing_done(const iter_string& rIterText)
-    {
-        return m_aEditingDoneHdl.Call(rIterText);
-    }
-
-    Link<const TreeIter&, OUString> m_aQueryTooltipHdl;
-
-    OUString signal_query_tooltip(const TreeIter& rIter)
-    {
-        if (notify_events_disabled())
-            return {};
-        return m_aQueryTooltipHdl.Call(rIter);
-    }
-
-    Link<render_args, void> m_aRenderHdl;
-    void signal_custom_render(vcl::RenderContext& rDevice, const 
tools::Rectangle& rRect,
-                              bool bSelected, const OUString& rId)
-    {
-        m_aRenderHdl.Call(render_args(rDevice, rRect, bSelected, rId));
-    }
-
-    Link<get_size_args, Size> m_aGetSizeHdl;
-    Size signal_custom_get_size(vcl::RenderContext& rDevice, const OUString& 
rId)
-    {
-        return m_aGetSizeHdl.Call(get_size_args(rDevice, rId));
-    }
-
-    virtual void do_insert(const TreeIter* pParent, int pos, const OUString* 
pStr,
-                           const OUString* pId, const OUString* pIconName,
-                           VirtualDevice* pImageSurface, bool 
bChildrenOnDemand, TreeIter* pRet)
-        = 0;
-    virtual void do_insert_separator(int pos, const OUString& rId) = 0;
-    virtual void do_select(int pos) = 0;
-    virtual void do_unselect(int pos) = 0;
-    virtual void do_remove(int pos) = 0;
-    virtual void do_scroll_to_row(int row) = 0;
-    virtual void do_set_cursor(int pos) = 0;
-    virtual void do_set_cursor(const TreeIter& rIter) = 0;
-    virtual void do_remove(const TreeIter& rIter) = 0;
-    virtual void do_select(const TreeIter& rIter) = 0;
-    virtual void do_unselect(const TreeIter& rIter) = 0;
-    virtual void do_scroll_to_row(const TreeIter& rIter) = 0;
-    virtual void do_set_children_on_demand(const TreeIter& rIter, bool 
bChildrenOnDemand) = 0;
-    virtual void do_clear() = 0;
-    virtual void do_remove_selection() = 0;
-
-public:
-    virtual void connect_query_tooltip(const Link<const TreeIter&, OUString>& 
rLink)
-    {
-        assert(!m_aQueryTooltipHdl.IsSet() || !rLink.IsSet());
-        m_aQueryTooltipHdl = rLink;
-    }
-
-    // see 'expanding on-demand node details' for bChildrenOnDemand of true
-    void insert(const TreeIter* pParent, int pos, const OUString* pStr, const 
OUString* pId,
-                const OUString* pIconName, VirtualDevice* pImageSurface, bool 
bChildrenOnDemand,
-                TreeIter* pRet)
-    {
-        disable_notify_events();
-        do_insert(pParent, pos, pStr, pId, pIconName, pImageSurface, 
bChildrenOnDemand, pRet);
-        enable_notify_events();
-    }
-
-    void insert(int nRow, TreeIter* pRet = nullptr)
-    {
-        insert(nullptr, nRow, nullptr, nullptr, nullptr, nullptr, false, pRet);
-    }
-
-    void append(TreeIter* pRet = nullptr) { insert(-1, pRet); }
-
-    void insert(int pos, const OUString& rStr, const OUString* pId, const 
OUString* pIconName,
-                VirtualDevice* pImageSurface)
-    {
-        insert(nullptr, pos, &rStr, pId, pIconName, pImageSurface, false, 
nullptr);
-    }
-    void insert_text(int pos, const OUString& rStr)
-    {
-        insert(nullptr, pos, &rStr, nullptr, nullptr, nullptr, false, nullptr);
-    }
-    void append_text(const OUString& rStr)
-    {
-        insert(nullptr, -1, &rStr, nullptr, nullptr, nullptr, false, nullptr);
-    }
-    void append(const OUString& rId, const OUString& rStr)
-    {
-        insert(nullptr, -1, &rStr, &rId, nullptr, nullptr, false, nullptr);
-    }
-    void append(const OUString& rId, const OUString& rStr, const OUString& 
rImage)
-    {
-        insert(nullptr, -1, &rStr, &rId, &rImage, nullptr, false, nullptr);
-    }
-    void append(const TreeIter* pParent, const OUString& rStr)
-    {
-        insert(pParent, -1, &rStr, nullptr, nullptr, nullptr, false, nullptr);
-    }
-
-    void insert_separator(int pos, const OUString& rId)
-    {
-        disable_notify_events();
-        do_insert_separator(pos, rId);
-        enable_notify_events();
-    }
-
-    void append_separator(const OUString& rId) { insert_separator(-1, rId); }
-
-    void connect_selection_changed(const Link<TreeView&, void>& rLink)
-    {
-        m_aSelectionChangedHdl = rLink;
-    }
-
-    /* A row is "activated" when the user double clicks a treeview row. It may
-       also be emitted when a row is selected and Space or Enter is pressed.
-
-       a return of "true" means the activation has been handled, a "false" 
propagates
-       the activation to the default handler which expands/collapses the row, 
if possible.
-    */
-    void connect_row_activated(const Link<TreeView&, bool>& rLink) { 
m_aRowActivatedHdl = rLink; }
-
-    // Argument is a pair of iter, col describing the toggled node
-    void connect_toggled(const Link<const iter_col&, void>& rLink) { 
m_aRadioToggleHdl = rLink; }
-
-    void connect_column_clicked(const Link<int, void>& rLink) { 
m_aColumnClickedHdl = rLink; }
-    void connect_model_changed(const Link<TreeView&, void>& rLink) { 
m_aModelChangedHdl = rLink; }
-
-    virtual OUString get_selected_text() const = 0;
-    virtual OUString get_selected_id() const = 0;
-
-    // call before inserting any content and connecting to toggle signals,
-    // an pre-inserted checkbutton column will exist at the start of every row
-    // inserted after this call which can be accessed with col index -1
-    virtual void enable_toggle_buttons(ColumnToggleType eType) = 0;
-
-    virtual void set_clicks_to_toggle(int nToggleBehavior) = 0;
-
-    //by index
-    virtual int get_selected_index() const = 0;
-    //Don't select when frozen, select after thaw. Note selection doesn't 
survive a freeze.
-    void select(int pos)
-    {
-        disable_notify_events();
-        do_select(pos);
-        enable_notify_events();
-    }
-
-    void unselect(int pos)
-    {
-        disable_notify_events();
-        do_unselect(pos);
-        enable_notify_events();
-    }
-
-    void remove(int pos)
-    {
-        disable_notify_events();
-        do_remove(pos);
-        enable_notify_events();
-    }
-
-    // col index -1 gets the first text column
-    virtual OUString get_text(int row, int col = -1) const = 0;
-    // col index -1 sets the first text column
-    virtual void set_text(int row, const OUString& rText, int col = -1) = 0;
-    // col index -1 sets all columns
-    virtual void set_sensitive(int row, bool bSensitive, int col = -1) = 0;
-    virtual bool get_sensitive(int row, int col) const = 0;
-    virtual void set_id(int row, const OUString& rId) = 0;
-    // col index -1 sets the expander toggle, enable_toggle_buttons must have 
been called to create that column
-    virtual void set_toggle(int row, TriState eState, int col = -1) = 0;
-    // col index -1 gets the expander toggle, enable_toggle_buttons must have 
been called to create that column
-    virtual TriState get_toggle(int row, int col = -1) const = 0;
-    // col index -1 sets the expander image
-    virtual void set_image(int row, const OUString& rImage, int col = -1) = 0;
-    // col index -1 sets the expander image
-    virtual void set_image(int row, VirtualDevice& rImage, int col = -1) = 0;
-    // col index -1 sets the expander image
-    virtual void set_image(int row, const 
css::uno::Reference<css::graphic::XGraphic>& rImage,
-                           int col = -1)
-        = 0;
-    virtual void set_text_emphasis(int row, bool bOn, int col) = 0;
-    virtual bool get_text_emphasis(int row, int col) const = 0;
-    virtual void set_text_align(int row, double fAlign, int col) = 0;
-    virtual void swap(int pos1, int pos2) = 0;
-    virtual std::vector<int> get_selected_rows() const = 0;
-    virtual void set_font_color(int pos, const Color& rColor) = 0;
-
-    // scroll to make 'row' visible, this will also expand all parent rows of 
'row' as necessary to
-    // make 'row' visible
-    void scroll_to_row(int row)
-    {
-        disable_notify_events();
-        do_scroll_to_row(row);
-        enable_notify_events();
-    }
-
-    virtual bool is_selected(int pos) const = 0;
-    virtual int get_cursor_index() const = 0;
-
-    void set_cursor(int pos)
-    {
-        disable_notify_events();
-        do_set_cursor(pos);
-        enable_notify_events();
-    }
-
-    //by text
-    virtual int find_text(const OUString& rText) const = 0;
-    //Don't select when frozen, select after thaw. Note selection doesn't 
survive a freeze.
-    void select_text(const OUString& rText) { select(find_text(rText)); }
-    void remove_text(const OUString& rText) { remove(find_text(rText)); }
-    std::vector<OUString> get_selected_rows_text() const
-    {
-        std::vector<int> aRows(get_selected_rows());
-        std::vector<OUString> aRet;
-        aRet.reserve(aRows.size());
-        for (auto a : aRows)
-            aRet.push_back(get_text(a));
-        return aRet;
-    }
-
-    //by id
-    virtual OUString get_id(int pos) const = 0;
-    virtual int find_id(const OUString& rId) const = 0;
-    //Don't select when frozen, select after thaw. Note selection doesn't 
survive a freeze.
-    void select_id(const OUString& rId) { select(find_id(rId)); }
-    void remove_id(const OUString& rText) { remove(find_id(rText)); }
-
-    //via iter
-    virtual std::unique_ptr<TreeIter> make_iterator(const TreeIter* pOrig = 
nullptr) const = 0;
-    virtual void copy_iterator(const TreeIter& rSource, TreeIter& rDest) const 
= 0;
-    virtual bool get_selected(TreeIter* pIter) const = 0;
-    virtual bool get_cursor(TreeIter* pIter) const = 0;
-
-    void set_cursor(const TreeIter& rIter)
-    {
-        disable_notify_events();
-        do_set_cursor(rIter);
-        enable_notify_events();
-    }
-
-    virtual bool get_iter_first(TreeIter& rIter) const = 0;
-    // set iter to point to next node at the current level
-    virtual bool iter_next_sibling(TreeIter& rIter) const = 0;
-    // set iter to point to previous node at the current level
-    virtual bool iter_previous_sibling(TreeIter& rIter) const = 0;
-    // set iter to point to next node, depth first, then sibling
-    virtual bool iter_next(TreeIter& rIter) const = 0;
-    // set iter to point to previous node, sibling first then depth
-    virtual bool iter_previous(TreeIter& rIter) const = 0;
-    // set iter to point to first child node
-    virtual bool iter_children(TreeIter& rIter) const = 0;
-    bool iter_nth_sibling(TreeIter& rIter, int nChild) const
-    {
-        bool bRet = true;
-        for (int i = 0; i < nChild && bRet; ++i)
-            bRet = iter_next_sibling(rIter);
-        return bRet;
-    }
-    bool iter_nth_child(TreeIter& rIter, int nChild) const
-    {
-        if (!iter_children(rIter))
-            return false;
-        return iter_nth_sibling(rIter, nChild);
-    }
-    virtual bool iter_parent(TreeIter& rIter) const = 0;
-    virtual int get_iter_depth(const TreeIter& rIter) const = 0;
-    virtual int get_iter_index_in_parent(const TreeIter& rIter) const = 0;
-    /* Compares two paths. If a appears before b in a tree, then -1 is 
returned.
-       If b appears before a , then 1 is returned. If the two nodes are equal,
-       then 0 is returned.
-    */
-    virtual int iter_compare(const TreeIter& a, const TreeIter& b) const = 0;
-    virtual bool iter_has_child(const TreeIter& rIter) const = 0;
-    // returns the number of direct children rIter has
-    virtual int iter_n_children(const TreeIter& rIter) const = 0;
-
-    void remove(const TreeIter& rIter)
-    {
-        disable_notify_events();
-        do_remove(rIter);
-        enable_notify_events();
-    }
-
-    //Don't select when frozen, select after thaw. Note selection doesn't 
survive a freeze.
-    void select(const TreeIter& rIter)
-    {
-        disable_notify_events();
-        do_select(rIter);
-        enable_notify_events();
-    }
-
-    void unselect(const TreeIter& rIter)
-    {
-        disable_notify_events();
-        do_unselect(rIter);
-        enable_notify_events();
-    }
-
-    //visually indent this row as if it was at get_iter_depth() + nIndentLevel
-    virtual void set_extra_row_indent(const TreeIter& rIter, int nIndentLevel) 
= 0;
-    // col index -1 sets the first text column
-    virtual void set_text(const TreeIter& rIter, const OUString& rStr, int col 
= -1) = 0;
-    // col index -1 sets all columns
-    virtual void set_sensitive(const TreeIter& rIter, bool bSensitive, int col 
= -1) = 0;
-    virtual bool get_sensitive(const TreeIter& rIter, int col) const = 0;
-    virtual void set_text_emphasis(const TreeIter& rIter, bool bOn, int col) = 
0;
-    virtual bool get_text_emphasis(const TreeIter& rIter, int col) const = 0;
-    virtual void set_text_align(const TreeIter& rIter, double fAlign, int col) 
= 0;
-    // col index -1 sets the expander toggle, enable_toggle_buttons must have 
been called to create that column
-    virtual void set_toggle(const TreeIter& rIter, TriState bOn, int col = -1) 
= 0;
-    // col index -1 gets the expander toggle, enable_toggle_buttons must have 
been called to create that column
-    virtual TriState get_toggle(const TreeIter& rIter, int col = -1) const = 0;
-    // col index -1 gets the first text column
-    virtual OUString get_text(const TreeIter& rIter, int col = -1) const = 0;
-    virtual void set_id(const TreeIter& rIter, const OUString& rId) = 0;
-    virtual OUString get_id(const TreeIter& rIter) const = 0;
-    // col index -1 sets the expander image
-    virtual void set_image(const TreeIter& rIter, const OUString& rImage, int 
col = -1) = 0;
-    // col index -1 sets the expander image
-    virtual void set_image(const TreeIter& rIter, VirtualDevice& rImage, int 
col = -1) = 0;
-    // col index -1 sets the expander image
-    virtual void set_image(const TreeIter& rIter,
-                           const css::uno::Reference<css::graphic::XGraphic>& 
rImage, int col = -1)
-        = 0;
-    virtual void set_font_color(const TreeIter& rIter, const Color& rColor) = 
0;
-
-    // scroll to make rIter visible, this will also expand all parent rows of 
rIter as necessary to
-    // make rIter visible
-    void scroll_to_row(const TreeIter& rIter)
-    {
-        disable_notify_events();
-        do_scroll_to_row(rIter);
-        enable_notify_events();
-    }
-
-    virtual bool is_selected(const TreeIter& rIter) const = 0;
-
-    virtual void move_subtree(TreeIter& rNode, const TreeIter* pNewParent, int 
nIndexInNewParent)
-        = 0;
-
-    // call func on each element until func returns true or we run out of 
elements
-    virtual void all_foreach(const std::function<bool(TreeIter&)>& func) = 0;
-    // call func on each selected element until func returns true or we run 
out of elements
-    virtual void selected_foreach(const std::function<bool(TreeIter&)>& func) 
= 0;
-    // call func on each visible element until func returns true or we run out 
of elements
-    virtual void visible_foreach(const std::function<bool(TreeIter&)>& func) = 
0;
-    // clear the children of pParent (whole tree if nullptr),
-    // then add nSourceCount rows under pParent, call func on each row
-    // inserted with an arg of the index that this row will be when bulk insert
-    // ends.
-    //
-    // this enables inserting the entries backwards in models where that is 
faster,
-    //
-    // pFixedWidths is optional, when present each matching entry col text
-    // width will not be measured, and the fixed width used instead. Use
-    // sparingly because wider text than the fixed width is clipped and cannot
-    // be scrolled into view horizontally.
-    // @param bGoingToSetText needs to be true, if you plan to call set_text 
inside the insert func.
-    virtual void bulk_insert_for_each(int nSourceCount,
-                                      const std::function<void(TreeIter&, int 
nSourceIndex)>& func,
-                                      const weld::TreeIter* pParent = nullptr,
-                                      const std::vector<int>* pFixedWidths = 
nullptr,
-                                      bool bGoingToSetText = false)
-        = 0;
-
-    /* expanding on-demand node details
-
-    When a node is added with children-on-demand (typically via 'insert' with
-    bChildrenOnDemand of true), then initially in reality the
-    children-on-demand node is given a 'placeholder' child entry to indicate
-    the load-on-demand state.
-
-    The 'placeholder' needs to be there for the expander indicator to be
-    drawn/shown even when there are no "real" entries yet. This child doesn't
-    exist for the purposes of any of the iterator methods, e.g. iter_has_child
-    on an on-demand node which hasn't been expanded yet is false. Likewise the
-    rest of the iterator methods skip over or otherwise ignore that node.
-
-    Normal usage is the user clicks on the expander, the expansion mechanism
-    removes the 'placeholder' entry (set_children_on_demand(false)) and calls
-    any installed expanding-callback (installable via connect_expanding) which
-    has the opportunity to populate the node with children.
-
-    If you decide to directly populate the children of an on-demand node
-    outside of the expanding-callback then you also need to explicitly remove
-    the 'placeholder' with set_children_on_demand(false) otherwise the treeview
-    is in an inconsistent state.  */
-
-    virtual bool get_row_expanded(const TreeIter& rIter) const = 0;
-    // expand row will first trigger the callback set via connect_expanding 
before expanding
-    virtual void expand_row(const TreeIter& rIter) = 0;
-    // collapse row will first trigger the callback set via connect_collapsing 
before collapsing
-    virtual void collapse_row(const TreeIter& rIter) = 0;
-
-    // set the empty node to appear as if it has children, true is equivalent
-    // to 'insert' with a bChildrenOnDemand of true. See notes above.
-    void set_children_on_demand(const TreeIter& rIter, bool bChildrenOnDemand)
-    {
-        disable_notify_events();
-        do_set_children_on_demand(rIter, bChildrenOnDemand);
-        enable_notify_events();
-    }
-
-    // return if the node is configured to be populated on-demand
-    virtual bool get_children_on_demand(const TreeIter& rIter) const = 0;
-    // set if the expanders are shown or not
-    virtual void set_show_expanders(bool bShow) = 0;
-
-    void connect_expanding(const Link<const TreeIter&, bool>& rLink) { 
m_aExpandingHdl = rLink; }
-    void connect_collapsing(const Link<const TreeIter&, bool>& rLink) { 
m_aCollapsingHdl = rLink; }
-
-    // rStartLink returns true to allow editing, false to disallow
-    // rEndLink returns true to accept the edit, false to reject
-    virtual void connect_editing(const Link<const TreeIter&, bool>& rStartLink,
-                                 const Link<const iter_string&, bool>& 
rEndLink)
-    {
-        assert(rStartLink.IsSet() == rEndLink.IsSet() && "should be both on or 
both off");
-        m_aEditingStartedHdl = rStartLink;
-        m_aEditingDoneHdl = rEndLink;
-    }
-
-    virtual void start_editing(const weld::TreeIter& rEntry) = 0;
-    virtual void end_editing() = 0;
-
-    virtual void connect_visible_range_changed(const Link<TreeView&, void>& 
rLink)
-    {
-        assert(!m_aVisibleRangeChangedHdl.IsSet() || !rLink.IsSet());
-        m_aVisibleRangeChangedHdl = rLink;
-    }
-
-    virtual void enable_drag_source(rtl::Reference<TransferDataContainer>& 
rTransferable,
-                                    sal_uInt8 eDNDConstants)
-        = 0;
-
-    void connect_drag_begin(const Link<bool&, bool>& rLink) { m_aDragBeginHdl 
= rLink; }
-
-    //all of them. Don't select when frozen, select after thaw. Note selection 
doesn't survive a freeze.
-    virtual void select_all() = 0;
-    virtual void unselect_all() = 0;
-
-    // return the number of toplevel nodes
-    virtual int n_children() const = 0;
-
-    // afterwards, entries will be in default ascending sort order
-    virtual void make_sorted() = 0;
-    virtual void make_unsorted() = 0;
-    virtual bool get_sort_order() const = 0;
-    virtual void set_sort_order(bool bAscending) = 0;
-
-    // TRUE ascending, FALSE, descending, INDET, neither (off)
-    virtual void set_sort_indicator(TriState eState, int nColumn) = 0;
-    virtual TriState get_sort_indicator(int nColumn) const = 0;
-
-    virtual int get_sort_column() const = 0;
-    virtual void set_sort_column(int nColumn) = 0;
-
-    virtual void
-    set_sort_func(const std::function<int(const weld::TreeIter&, const 
weld::TreeIter&)>& func)
-    {
-        m_aCustomSort = func;
-    }
-
-    void clear()
-    {
-        disable_notify_events();
-        do_clear();
-        enable_notify_events();
-    }
-
-    virtual int get_height_rows(int nRows) const = 0;
-
-    virtual void columns_autosize() = 0;
-    virtual void set_column_fixed_widths(const std::vector<int>& rWidths) = 0;
-    virtual void set_column_editables(const std::vector<bool>& rEditables) = 0;
-    virtual int get_column_width(int nCol) const = 0;
-    virtual void set_centered_column(int nCol) = 0;
-    virtual OUString get_column_title(int nColumn) const = 0;
-    virtual void set_column_title(int nColumn, const OUString& rTitle) = 0;
-
-    int get_checkbox_column_width() const { return 
get_approximate_digit_width() * 3 + 6; }
-
-    virtual void set_selection_mode(SelectionMode eMode) = 0;
-    virtual int count_selected_rows() const = 0;
-
-    // remove the selected nodes
-    void remove_selection()
-    {
-        disable_notify_events();
-        do_remove_selection();
-        enable_notify_events();
-    }
-
-    // only meaningful is call this from a "changed" callback, true if the 
change
-    // was due to mouse hovering over the entry
-    virtual bool changed_by_hover() const = 0;
-
-    virtual void vadjustment_set_value(int value) = 0;
-    virtual int vadjustment_get_value() const = 0;
-
-    void save_value() { m_sSavedValue = get_selected_text(); }
-    OUString const& get_saved_value() const { return m_sSavedValue; }
-    bool get_value_changed_from_saved() const { return m_sSavedValue != 
get_selected_text(); }
-
-    // for custom rendering a cell
-    void connect_custom_get_size(const Link<get_size_args, Size>& rLink) { 
m_aGetSizeHdl = rLink; }
-    void connect_custom_render(const Link<render_args, void>& rLink) { 
m_aRenderHdl = rLink; }
-    // call set_column_custom_renderer after setting custom callbacks
-    virtual void set_column_custom_renderer(int nColumn, bool bEnable) = 0;
-    // redraw all rows, typically only useful with custom rendering to redraw 
due to external
-    // state change
-    virtual void queue_draw() = 0;
-
-    /* with bDnDMode false simply return the row under the point
-     *
-     * with bDnDMode true:
-     * a) return the row which should be dropped on, which may
-     *    be different from the row the mouse is over in some backends where
-     *    positioning the mouse on the bottom half of a row indicates to drop
-     *    after the row
-     * b) dnd highlight the dest row
-     */
-    virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* 
pResult, bool bDnDMode,
-                                     bool bAutoScroll = true)
-        = 0;
-    virtual void unset_drag_dest_row() = 0;
-    virtual tools::Rectangle get_row_area(const weld::TreeIter& rIter) const = 
0;
-    // for dragging and dropping between TreeViews, return the active source
-    virtual TreeView* get_drag_source() const = 0;
-
-    using Widget::set_sensitive;
-    using Widget::get_sensitive;
-};
-
 class VCL_DLLPUBLIC Button : virtual public Widget
 {
     friend class ::LOKTrigger;
diff --git a/include/vcl/weld/weldutils.hxx b/include/vcl/weld/weldutils.hxx
index 46eb792dc033..8d2bd8623093 100644
--- a/include/vcl/weld/weldutils.hxx
+++ b/include/vcl/weld/weldutils.hxx
@@ -21,6 +21,7 @@
 #include <vcl/formatter.hxx>
 #include <vcl/timer.hxx>
 #include <vcl/transfer.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 class CalendarWrapper;
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx 
b/reportdesign/source/ui/dlg/Navigator.cxx
index db4ed681d7f6..033347ceeabb 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -39,6 +39,7 @@
 #include <comphelper/SelectionMultiplex.hxx>
 #include <utility>
 #include <vcl/svapp.hxx>
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 #include <vcl/commandevent.hxx>
 #include <ReportVisitor.hxx>
diff --git a/reportdesign/source/ui/inc/AddField.hxx 
b/reportdesign/source/ui/inc/AddField.hxx
index 526afea0c645..e95c4bdd41db 100644
--- a/reportdesign/source/ui/inc/AddField.hxx
+++ b/reportdesign/source/ui/inc/AddField.hxx
@@ -30,6 +30,7 @@
 #include <svx/dbaexchange.hxx>
 #include <cppuhelper/basemutex.hxx>
 
+#include <vcl/weld/TreeView.hxx>
 #include <vcl/weld/weld.hxx>
 
 #include <rtl/ref.hxx>
-e 
... etc. - the rest is truncated

Reply via email to