[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 63 commits - basctl/source bin/ui-converter-skeleton.py chart2/source chart2/uiconfig comphelper/source cui/source cui/uiconfig dbaccess/source desktop/source editeng/source fpicker/uiconfig .git-hooks/pre-commit include/comphelper include/editeng include/sfx2 include/svx include/vcl officecfg/registry reportdesign/uiconfig sc/qa sc/source sc/uiconfig sd/IwyuFilter_sd.yaml sd/Library_sd.mk sd/qa sd/source sd/uiconfig sd/UIConfig_simpress.mk sfx2/inc sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk solenv/clang-format solenv/sanitizers svtools/source svtools/uiconfig svx/inc svx/source svx/uiconfig sw/inc sw/Library_sw.mk sw/qa sw/source sw/uiconfig sw/UIConfig_swriter.mk vcl/inc vcl/jsdialog vcl/source vcl/uiconfig vcl/UIConfig_vcl.mk vcl/unx

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue May 25 10:37:28 UTC 2021


 .git-hooks/pre-commit                                          |    8 
 basctl/source/basicide/baside2b.cxx                            |    4 
 basctl/source/basicide/bastypes.cxx                            |   30 
 basctl/source/inc/bastypes.hxx                                 |    3 
 bin/ui-converter-skeleton.py                                   |  196 ++
 chart2/source/controller/sidebar/Chart2PanelFactory.cxx        |   38 
 chart2/source/controller/sidebar/ChartAreaPanel.cxx            |   16 
 chart2/source/controller/sidebar/ChartAreaPanel.hxx            |    8 
 chart2/source/controller/sidebar/ChartAxisPanel.cxx            |   29 
 chart2/source/controller/sidebar/ChartAxisPanel.hxx            |   10 
 chart2/source/controller/sidebar/ChartElementsPanel.cxx        |   28 
 chart2/source/controller/sidebar/ChartElementsPanel.hxx        |   10 
 chart2/source/controller/sidebar/ChartErrorBarPanel.cxx        |   30 
 chart2/source/controller/sidebar/ChartErrorBarPanel.hxx        |   10 
 chart2/source/controller/sidebar/ChartLinePanel.cxx            |   16 
 chart2/source/controller/sidebar/ChartLinePanel.hxx            |    8 
 chart2/source/controller/sidebar/ChartSeriesPanel.cxx          |   28 
 chart2/source/controller/sidebar/ChartSeriesPanel.hxx          |    9 
 chart2/source/controller/sidebar/ChartTypePanel.cxx            |   20 
 chart2/source/controller/sidebar/ChartTypePanel.hxx            |    5 
 chart2/uiconfig/ui/columnfragment.ui                           |    2 
 chart2/uiconfig/ui/dlg_InsertErrorBars.ui                      |   12 
 chart2/uiconfig/ui/imagefragment.ui                            |    2 
 chart2/uiconfig/ui/tp_DataSource.ui                            |    4 
 chart2/uiconfig/ui/tp_ErrorBars.ui                             |    6 
 chart2/uiconfig/ui/tp_Trendline.ui                             |   12 
 comphelper/source/misc/configuration.cxx                       |    1 
 cui/source/dialogs/hangulhanjadlg.cxx                          |    2 
 cui/source/dialogs/thesdlg.cxx                                 |    2 
 cui/source/factory/dlgfact.cxx                                 |    4 
 cui/source/factory/dlgfact.hxx                                 |    4 
 cui/source/inc/hangulhanjadlg.hxx                              |    2 
 cui/source/inc/thesdlg.hxx                                     |    2 
 cui/uiconfig/ui/aboutdialog.ui                                 |    4 
 cui/uiconfig/ui/comment.ui                                     |    4 
 cui/uiconfig/ui/hyphenate.ui                                   |    4 
 cui/uiconfig/ui/menuassignpage.ui                              |    8 
 cui/uiconfig/ui/movemenu.ui                                    |    4 
 cui/uiconfig/ui/spellingdialog.ui                              |    2 
 cui/uiconfig/ui/textanimtabpage.ui                             |    8 
 cui/uiconfig/ui/thesaurus.ui                                   |    2 
 cui/uiconfig/ui/toolbarmodedialog.ui                           |    4 
 dbaccess/source/ui/control/sqledit.cxx                         |    8 
 desktop/source/lib/init.cxx                                    |   95 -
 editeng/source/editeng/impedit.cxx                             |    8 
 editeng/source/editeng/impedit.hxx                             |    1 
 editeng/source/editeng/impedit4.cxx                            |    7 
 editeng/source/editeng/textconv.cxx                            |    2 
 editeng/source/editeng/textconv.hxx                            |    4 
 editeng/source/misc/hangulhanja.cxx                            |    8 
 fpicker/uiconfig/ui/explorerfiledialog.ui                      |    4 
 include/comphelper/configurationlistener.hxx                   |    4 
 include/editeng/editview.hxx                                   |    6 
 include/editeng/edtdlg.hxx                                     |    4 
 include/editeng/hangulhanja.hxx                                |    4 
 include/sfx2/childwin.hxx                                      |    4 
 include/sfx2/dockwin.hxx                                       |    3 
 include/sfx2/navigat.hxx                                       |   28 
 include/sfx2/sidebar/Deck.hxx                                  |   47 
 include/sfx2/sidebar/FocusManager.hxx                          |   16 
 include/sfx2/sidebar/Panel.hxx                                 |   55 
 include/sfx2/sidebar/PanelLayout.hxx                           |   48 
 include/sfx2/sidebar/SidebarController.hxx                     |   10 
 include/sfx2/sidebar/SidebarPanelBase.hxx                      |   15 
 include/sfx2/sidebar/Theme.hxx                                 |    7 
 include/sfx2/templdlg.hxx                                      |    3 
 include/svx/sidebar/AreaPropertyPanelBase.hxx                  |    9 
 include/svx/sidebar/InspectorTextPanel.hxx                     |    7 
 include/svx/sidebar/LinePropertyPanelBase.hxx                  |    4 
 include/svx/weldeditview.hxx                                   |   43 
 include/vcl/InterimItemWindow.hxx                              |    3 
 include/vcl/builder.hxx                                        |   16 
 include/vcl/dockwin.hxx                                        |   13 
 include/vcl/weld.hxx                                           |   44 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu   |  148 +
 officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs |    8 
 reportdesign/uiconfig/dbreport/ui/conditionwin.ui              |    4 
 sc/qa/uitest/calc_tests8/navigator.py                          |   17 
 sc/source/ui/app/inputwin.cxx                                  |    8 
 sc/source/ui/app/scdll.cxx                                     |    3 
 sc/source/ui/formdlg/dwfunctr.cxx                              |   27 
 sc/source/ui/inc/content.hxx                                   |   12 
 sc/source/ui/inc/dwfunctr.hxx                                  |    7 
 sc/source/ui/inc/inputwin.hxx                                  |    8 
 sc/source/ui/inc/navipi.hxx                                    |   29 
 sc/source/ui/inc/tphfedit.hxx                                  |    4 
 sc/source/ui/inc/uiobject.hxx                                  |   17 
 sc/source/ui/navipi/content.cxx                                |    6 
 sc/source/ui/navipi/navipi.cxx                                 |   96 -
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx                |   23 
 sc/source/ui/sidebar/AlignmentPropertyPanel.hxx                |   10 
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx           |   22 
 sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx           |   15 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx             |   23 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx             |   10 
 sc/source/ui/sidebar/ScPanelFactory.cxx                        |   26 
 sc/source/ui/uitest/uiobject.cxx                               |   28 
 sc/uiconfig/scalc/ui/conditionaliconset.ui                     |    2 
 sc/uiconfig/scalc/ui/sheetprintpage.ui                         |    2 
 sd/IwyuFilter_sd.yaml                                          |   12 
 sd/Library_sd.mk                                               |    3 
 sd/UIConfig_simpress.mk                                        |    2 
 sd/qa/unit/tiledrendering/tiledrendering.cxx                   |   15 
 sd/source/ui/animations/CustomAnimationDialog.cxx              |    2 
 sd/source/ui/animations/CustomAnimationList.cxx                |    2 
 sd/source/ui/animations/CustomAnimationPane.cxx                |   68 
 sd/source/ui/animations/SlideTransitionPane.cxx                |   53 
 sd/source/ui/animations/motionpathtag.cxx                      |    2 
 sd/source/ui/animations/motionpathtag.hxx                      |    2 
 sd/source/ui/annotations/annotationmanager.cxx                 |  150 -
 sd/source/ui/annotations/annotationmanagerimpl.hxx             |    7 
 sd/source/ui/annotations/annotationtag.cxx                     |   60 
 sd/source/ui/annotations/annotationtag.hxx                     |    2 
 sd/source/ui/annotations/annotationwindow.cxx                  |  860 +++++-----
 sd/source/ui/annotations/annotationwindow.hxx                  |  158 +
 sd/source/ui/app/sddll.cxx                                     |    4 
 sd/source/ui/dlg/NavigatorChildWindow.cxx                      |   51 
 sd/source/ui/dlg/navigatr.cxx                                  |   89 -
 sd/source/ui/dlg/sdtreelb.cxx                                  |   13 
 sd/source/ui/inc/CustomAnimationPane.hxx                       |   24 
 sd/source/ui/inc/NavigatorChildWindow.hxx                      |   17 
 sd/source/ui/inc/SlideTransitionPane.hxx                       |   17 
 sd/source/ui/inc/TableDesignPane.hxx                           |   13 
 sd/source/ui/inc/createcustomanimationpanel.hxx                |   38 
 sd/source/ui/inc/createslidetransitionpanel.hxx                |   38 
 sd/source/ui/inc/createtabledesignpanel.hxx                    |   40 
 sd/source/ui/inc/navigatr.hxx                                  |   38 
 sd/source/ui/inc/sdtreelb.hxx                                  |    8 
 sd/source/ui/sidebar/AllMasterPagesSelector.cxx                |   16 
 sd/source/ui/sidebar/AllMasterPagesSelector.hxx                |   21 
 sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx            |   38 
 sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx            |   24 
 sd/source/ui/sidebar/CustomAnimationPanel.cxx                  |   63 
 sd/source/ui/sidebar/CustomAnimationPanel.hxx                  |   54 
 sd/source/ui/sidebar/LayoutMenu.cxx                            |  138 -
 sd/source/ui/sidebar/LayoutMenu.hxx                            |   25 
 sd/source/ui/sidebar/MasterPagesSelector.cxx                   |   91 -
 sd/source/ui/sidebar/MasterPagesSelector.hxx                   |   11 
 sd/source/ui/sidebar/NavigatorWrapper.cxx                      |   44 
 sd/source/ui/sidebar/NavigatorWrapper.hxx                      |   15 
 sd/source/ui/sidebar/PanelFactory.cxx                          |   40 
 sd/source/ui/sidebar/PreviewValueSet.cxx                       |   18 
 sd/source/ui/sidebar/PreviewValueSet.hxx                       |    9 
 sd/source/ui/sidebar/RecentMasterPagesSelector.cxx             |   29 
 sd/source/ui/sidebar/RecentMasterPagesSelector.hxx             |   23 
 sd/source/ui/sidebar/SlideBackground.cxx                       |   28 
 sd/source/ui/sidebar/SlideBackground.hxx                       |    4 
 sd/source/ui/sidebar/SlideTransitionPanel.cxx                  |   61 
 sd/source/ui/sidebar/SlideTransitionPanel.hxx                  |   54 
 sd/source/ui/sidebar/TableDesignPanel.cxx                      |   57 
 sd/source/ui/sidebar/TableDesignPanel.hxx                      |   48 
 sd/source/ui/table/TableDesignPane.cxx                         |   16 
 sd/source/ui/view/drviews4.cxx                                 |    2 
 sd/source/ui/view/drviewsd.cxx                                 |    2 
 sd/uiconfig/simpress/ui/annotation.ui                          |  164 +
 sd/uiconfig/simpress/ui/annotationmenu.ui                      |  117 -
 sd/uiconfig/simpress/ui/annotationtagmenu.ui                   |   10 
 sd/uiconfig/simpress/ui/customanimationeffecttab.ui            |    2 
 sd/uiconfig/simpress/ui/dockinganimation.ui                    |   10 
 sfx2/UIConfig_sfx.mk                                           |    6 
 sfx2/inc/sidebar/DeckLayouter.hxx                              |   13 
 sfx2/inc/sidebar/DeckTitleBar.hxx                              |    6 
 sfx2/inc/sidebar/PanelDescriptor.hxx                           |    1 
 sfx2/inc/sidebar/PanelTitleBar.hxx                             |   12 
 sfx2/inc/sidebar/TitleBar.hxx                                  |   24 
 sfx2/inc/sidebar/UnoPanel.hxx                                  |    2 
 sfx2/source/appl/appreg.cxx                                    |    1 
 sfx2/source/appl/childwin.cxx                                  |   14 
 sfx2/source/appl/newhelp.cxx                                   |   13 
 sfx2/source/appl/newhelp.hxx                                   |    3 
 sfx2/source/control/thumbnailview.cxx                          |    2 
 sfx2/source/dialog/dockwin.cxx                                 |   33 
 sfx2/source/dialog/navigat.cxx                                 |   37 
 sfx2/source/dialog/templdlg.cxx                                |   12 
 sfx2/source/inc/templdgi.hxx                                   |    2 
 sfx2/source/sidebar/Deck.cxx                                   |  271 ---
 sfx2/source/sidebar/DeckLayouter.cxx                           |  270 +--
 sfx2/source/sidebar/DeckTitleBar.cxx                           |   30 
 sfx2/source/sidebar/FocusManager.cxx                           |  166 -
 sfx2/source/sidebar/Panel.cxx                                  |  152 +
 sfx2/source/sidebar/PanelDescriptor.cxx                        |    2 
 sfx2/source/sidebar/PanelLayout.cxx                            |  125 -
 sfx2/source/sidebar/PanelTitleBar.cxx                          |   25 
 sfx2/source/sidebar/ResourceManager.cxx                        |    3 
 sfx2/source/sidebar/SidebarController.cxx                      |   88 -
 sfx2/source/sidebar/SidebarPanelBase.cxx                       |   77 
 sfx2/source/sidebar/TabBar.cxx                                 |    2 
 sfx2/source/sidebar/Theme.cxx                                  |   72 
 sfx2/source/sidebar/TitleBar.cxx                               |   49 
 sfx2/source/sidebar/UnoDeck.cxx                                |    4 
 sfx2/source/sidebar/UnoPanel.cxx                               |   25 
 sfx2/uiconfig/ui/deck.ui                                       |  132 +
 sfx2/uiconfig/ui/decktitlebar.ui                               |   82 
 sfx2/uiconfig/ui/dockingwindow.ui                              |   19 
 sfx2/uiconfig/ui/documentinfopage.ui                           |    2 
 sfx2/uiconfig/ui/infobar.ui                                    |    2 
 sfx2/uiconfig/ui/navigator.ui                                  |   14 
 sfx2/uiconfig/ui/panel.ui                                      |  120 +
 sfx2/uiconfig/ui/paneltitlebar.ui                              |   89 -
 solenv/clang-format/excludelist                                |   15 
 solenv/sanitizers/ui/modules/simpress.suppr                    |    1 
 solenv/sanitizers/ui/modules/swriter.suppr                     |    1 
 solenv/sanitizers/ui/sfx.suppr                                 |    7 
 svtools/source/control/valueset.cxx                            |    2 
 svtools/uiconfig/ui/fixedimagecontrol.ui                       |    2 
 svtools/uiconfig/ui/placeedit.ui                               |    2 
 svtools/uiconfig/ui/tabbuttons.ui                              |  139 +
 svtools/uiconfig/ui/tabbuttonsmirrored.ui                      |  139 +
 svx/inc/GalleryControl.hxx                                     |    8 
 svx/inc/galbrws2.hxx                                           |    1 
 svx/source/dialog/charmap.cxx                                  |    2 
 svx/source/dialog/weldeditview.cxx                             |  117 +
 svx/source/gallery2/GalleryControl.cxx                         |   20 
 svx/source/inc/DefaultShapesPanel.hxx                          |    7 
 svx/source/sidebar/EmptyPanel.cxx                              |   12 
 svx/source/sidebar/EmptyPanel.hxx                              |    3 
 svx/source/sidebar/PanelFactory.cxx                            |   48 
 svx/source/sidebar/area/AreaPropertyPanel.cxx                  |   18 
 svx/source/sidebar/area/AreaPropertyPanel.hxx                  |    8 
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx              |   57 
 svx/source/sidebar/effect/EffectPropertyPanel.cxx              |   24 
 svx/source/sidebar/effect/EffectPropertyPanel.hxx              |   10 
 svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx          |   16 
 svx/source/sidebar/fontwork/FontworkPropertyPanel.hxx          |    7 
 svx/source/sidebar/graphic/GraphicPropertyPanel.cxx            |   33 
 svx/source/sidebar/graphic/GraphicPropertyPanel.hxx            |   12 
 svx/source/sidebar/inspector/InspectorTextPanel.cxx            |   25 
 svx/source/sidebar/line/LinePropertyPanel.cxx                  |   15 
 svx/source/sidebar/line/LinePropertyPanel.hxx                  |    7 
 svx/source/sidebar/line/LinePropertyPanelBase.cxx              |   13 
 svx/source/sidebar/lists/ListsPropertyPanel.cxx                |   18 
 svx/source/sidebar/lists/ListsPropertyPanel.hxx                |    7 
 svx/source/sidebar/media/MediaPlaybackPanel.cxx                |   27 
 svx/source/sidebar/media/MediaPlaybackPanel.hxx                |   11 
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx             |   24 
 svx/source/sidebar/paragraph/ParaPropertyPanel.hxx             |    8 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx            |   28 
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx            |   10 
 svx/source/sidebar/shadow/ShadowPropertyPanel.cxx              |   24 
 svx/source/sidebar/shadow/ShadowPropertyPanel.hxx              |   13 
 svx/source/sidebar/shapes/DefaultShapesPanel.cxx               |   25 
 svx/source/sidebar/styles/StylesPropertyPanel.cxx              |   23 
 svx/source/sidebar/styles/StylesPropertyPanel.hxx              |   10 
 svx/source/sidebar/text/TextPropertyPanel.cxx                  |   19 
 svx/source/sidebar/text/TextPropertyPanel.hxx                  |    7 
 svx/uiconfig/ui/grafctrlbox.ui                                 |    2 
 svx/uiconfig/ui/navigationbar.ui                               |   10 
 sw/Library_sw.mk                                               |    2 
 sw/UIConfig_swriter.mk                                         |    2 
 sw/inc/AnnotationWin.hxx                                       |   45 
 sw/qa/uitest/findBar/findbar.py                                |   10 
 sw/qa/uitest/findBar/tdf136941.py                              |    8 
 sw/qa/uitest/findBar/tdf138232.py                              |    4 
 sw/qa/uitest/findBar/tdf88608.py                               |    4 
 sw/qa/uitest/navigator/tdf114724.py                            |   25 
 sw/qa/uitest/navigator/tdf137274.py                            |    9 
 sw/qa/uitest/navigator/tdf140257.py                            |  116 +
 sw/qa/uitest/writer_tests/comments.py                          |   12 
 sw/source/core/crsr/crstrvl.cxx                                |    6 
 sw/source/uibase/app/swmodule.cxx                              |    3 
 sw/source/uibase/dbui/mailmergehelper.cxx                      |    2 
 sw/source/uibase/docvw/AnnotationMenuButton.cxx                |  213 --
 sw/source/uibase/docvw/AnnotationMenuButton.hxx                |   51 
 sw/source/uibase/docvw/AnnotationWin.cxx                       |   84 
 sw/source/uibase/docvw/AnnotationWin2.cxx                      |  703 ++------
 sw/source/uibase/docvw/PostItMgr.cxx                           |    5 
 sw/source/uibase/docvw/SidebarScrollBar.cxx                    |   73 
 sw/source/uibase/docvw/SidebarScrollBar.hxx                    |   40 
 sw/source/uibase/docvw/SidebarTxtControl.cxx                   |  336 +--
 sw/source/uibase/docvw/SidebarTxtControl.hxx                   |   52 
 sw/source/uibase/docvw/SidebarTxtControlAcc.cxx                |  271 ---
 sw/source/uibase/docvw/SidebarTxtControlAcc.hxx                |   43 
 sw/source/uibase/inc/conttree.hxx                              |    4 
 sw/source/uibase/inc/navipi.hxx                                |   36 
 sw/source/uibase/inc/redlndlg.hxx                              |    3 
 sw/source/uibase/inc/uiobject.hxx                              |   20 
 sw/source/uibase/misc/redlndlg.cxx                             |   12 
 sw/source/uibase/sidebar/PageFooterPanel.cxx                   |   24 
 sw/source/uibase/sidebar/PageFooterPanel.hxx                   |   17 
 sw/source/uibase/sidebar/PageFormatPanel.cxx                   |   23 
 sw/source/uibase/sidebar/PageFormatPanel.hxx                   |   14 
 sw/source/uibase/sidebar/PageHeaderPanel.cxx                   |   23 
 sw/source/uibase/sidebar/PageHeaderPanel.hxx                   |   18 
 sw/source/uibase/sidebar/PageStylesPanel.cxx                   |   24 
 sw/source/uibase/sidebar/PageStylesPanel.hxx                   |   16 
 sw/source/uibase/sidebar/StylePresetsPanel.cxx                 |   23 
 sw/source/uibase/sidebar/StylePresetsPanel.hxx                 |   17 
 sw/source/uibase/sidebar/SwPanelFactory.cxx                    |   54 
 sw/source/uibase/sidebar/TableEditPanel.cxx                    |   21 
 sw/source/uibase/sidebar/TableEditPanel.hxx                    |   17 
 sw/source/uibase/sidebar/ThemePanel.cxx                        |   21 
 sw/source/uibase/sidebar/ThemePanel.hxx                        |   14 
 sw/source/uibase/sidebar/WrapPropertyPanel.cxx                 |   23 
 sw/source/uibase/sidebar/WrapPropertyPanel.hxx                 |    7 
 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx          |   24 
 sw/source/uibase/sidebar/WriterInspectorTextPanel.hxx          |    7 
 sw/source/uibase/uitest/uiobject.cxx                           |   40 
 sw/source/uibase/utlui/content.cxx                             |   11 
 sw/source/uibase/utlui/glbltree.cxx                            |   14 
 sw/source/uibase/utlui/navipi.cxx                              |  176 +-
 sw/uiconfig/swriter/ui/addressblockdialog.ui                   |   12 
 sw/uiconfig/swriter/ui/annotation.ui                           |  240 ++
 sw/uiconfig/swriter/ui/annotationmenu.ui                       |   95 -
 sw/uiconfig/swriter/ui/cardmediumpage.ui                       |    2 
 sw/uiconfig/swriter/ui/columnpage.ui                           |    4 
 sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui              |    4 
 sw/uiconfig/swriter/ui/editfielddialog.ui                      |    4 
 sw/uiconfig/swriter/ui/envaddresspage.ui                       |    2 
 sw/uiconfig/swriter/ui/indexentry.ui                           |   12 
 sw/uiconfig/swriter/ui/insertfootnote.ui                       |    4 
 sw/uiconfig/swriter/ui/insertscript.ui                         |    4 
 sw/uiconfig/swriter/ui/mmaddressblockpage.ui                   |    4 
 sw/uiconfig/swriter/ui/mmsalutationpage.ui                     |    4 
 sw/uiconfig/swriter/ui/outlinebutton.ui                        |   59 
 sw/uiconfig/swriter/ui/tablecolumnpage.ui                      |    4 
 sw/uiconfig/swriter/ui/testmailsettings.ui                     |    8 
 sw/uiconfig/swriter/ui/tokenwidget.ui                          |    4 
 vcl/UIConfig_vcl.mk                                            |    1 
 vcl/inc/bitmaps.hlst                                           |    2 
 vcl/inc/jsdialog/jsdialogbuilder.hxx                           |    8 
 vcl/inc/salvtables.hxx                                         |   14 
 vcl/jsdialog/jsdialogbuilder.cxx                               |   17 
 vcl/source/app/salvtables.cxx                                  |  100 +
 vcl/source/control/InterimItemWindow.cxx                       |   15 
 vcl/source/control/fixed.cxx                                   |    6 
 vcl/source/uitest/uiobject.cxx                                 |    2 
 vcl/source/window/builder.cxx                                  |  250 +-
 vcl/source/window/dockwin.cxx                                  |   40 
 vcl/source/window/printdlg.cxx                                 |    4 
 vcl/uiconfig/ui/aboutbox.ui                                    |    2 
 vcl/uiconfig/ui/dockingwindow.ui                               |   24 
 vcl/uiconfig/ui/printdialog.ui                                 |   10 
 vcl/unx/gtk3/gtk3gtkinst.cxx                                   |  183 +-
 333 files changed, 5155 insertions(+), 6558 deletions(-)

New commits:
commit ac0f18d5e8f463f79245d37043cc59c3a143f4b5
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri May 21 16:45:29 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue May 25 12:21:29 2021 +0200

    jsdialog: sidebar: dump all panels
    
    Change-Id: Ifa547014f6857b0c1fbdce50cba745f1bee4e975

diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 5070d500038d..7a5b89139a08 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -144,9 +144,6 @@ void Deck::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
     auto childrenNode = rJsonWriter.startArray("children");
     for (auto &it : maPanels)
     {
-        if (it->IsLurking())
-            continue;
-
         // collapse the panel itself out
         auto xContent = it->GetContents();
         if (!xContent)
@@ -157,6 +154,7 @@ void Deck::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
         rJsonWriter.put("type", "panel");
         rJsonWriter.put("text", it->GetTitle());
         rJsonWriter.put("enabled", true);
+        rJsonWriter.put("hidden", it->IsLurking());
 
         {
             auto children2Node = rJsonWriter.startArray("children");
commit f527e537cb5f44974f8327c47be658138820e038
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri May 21 14:31:06 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue May 25 12:21:19 2021 +0200

    jsdialog: early return if welded widget found
    
    Change-Id: Ib06b8dd6614bc6085ccf19f947b2c1f6e2d239c3

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6fdf245c4495..1466c04ffcf1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3794,77 +3794,76 @@ static void lcl_sendDialogEvent(unsigned long long int nWindowId, const char* pA
     static constexpr OUStringLiteral sDownAction(u"DOWN");
     static constexpr OUStringLiteral sValue(u"VALUE");
 
-    bool bIsWeldedDialog = false;
+    bool bExecutedWeldedAction = false;
 
     try
     {
         OString sControlId = OUStringToOString(aMap["id"], RTL_TEXTENCODING_ASCII_US);
 
-        bIsWeldedDialog = jsdialog::ExecuteAction(nWindowId, sControlId, aMap);
-        if (!bIsWeldedDialog)
-            bIsWeldedDialog = jsdialog::ExecuteAction(reinterpret_cast<sal_uInt64>(SfxViewShell::Current()),
+        bExecutedWeldedAction = jsdialog::ExecuteAction(nWindowId, sControlId, aMap);
+        if (!bExecutedWeldedAction)
+            bExecutedWeldedAction = jsdialog::ExecuteAction(reinterpret_cast<sal_uInt64>(SfxViewShell::Current()),
                                                       sControlId, aMap);
 
+        if (bExecutedWeldedAction)
+            return;
+
         if (!pWindow)
         {
             SetLastExceptionMsg("Document doesn't support dialog rendering, or window not found.");
             return;
         }
 
-        if (!bIsWeldedDialog)
-        {
-            WindowUIObject aUIObject(pWindow);
-            std::unique_ptr<UIObject> pUIWindow(aUIObject.get_visible_child(aMap["id"]));
-            if (pUIWindow) {
-                OUString sAction((aMap.find("cmd") != aMap.end())? aMap["cmd"]: "");
+        WindowUIObject aUIObject(pWindow);
+        std::unique_ptr<UIObject> pUIWindow(aUIObject.get_visible_child(aMap["id"]));
+        if (pUIWindow) {
+            OUString sAction((aMap.find("cmd") != aMap.end())? aMap["cmd"]: "");
 
-                if (sAction == "selected")
-                {
-                    aMap["POS"] = aMap["data"];
-                    aMap["TEXT"] = aMap["data"];
+            if (sAction == "selected")
+            {
+                aMap["POS"] = aMap["data"];
+                aMap["TEXT"] = aMap["data"];
 
-                    pUIWindow->execute(sSelectAction, aMap);
-                }
-                else if (sAction == "plus")
-                {
-                    pUIWindow->execute(sUpAction, aMap);
-                }
-                else if (sAction == "minus")
-                {
-                    pUIWindow->execute(sDownAction, aMap);
-                }
-                else if (sAction == "set")
-                {
-                    aMap["TEXT"] = aMap["data"];
+                pUIWindow->execute(sSelectAction, aMap);
+            }
+            else if (sAction == "plus")
+            {
+                pUIWindow->execute(sUpAction, aMap);
+            }
+            else if (sAction == "minus")
+            {
+                pUIWindow->execute(sDownAction, aMap);
+            }
+            else if (sAction == "set")
+            {
+                aMap["TEXT"] = aMap["data"];
 
-                    pUIWindow->execute(sClearAction, aMap);
-                    pUIWindow->execute(sTypeAction, aMap);
-                }
-                else if (sAction == "value")
-                {
-                    aMap["VALUE"] = aMap["data"];
-                    pUIWindow->execute(sValue, aMap);
-                }
-                else if (sAction == "click" && aMap["type"] == "drawingarea")
+                pUIWindow->execute(sClearAction, aMap);
+                pUIWindow->execute(sTypeAction, aMap);
+            }
+            else if (sAction == "value")
+            {
+                aMap["VALUE"] = aMap["data"];
+                pUIWindow->execute(sValue, aMap);
+            }
+            else if (sAction == "click" && aMap["type"] == "drawingarea")
+            {
+                int separatorPos = aMap["data"].indexOf(';');
+                if (separatorPos > 0)
                 {
-                    int separatorPos = aMap["data"].indexOf(';');
-                    if (separatorPos > 0)
-                    {
-                        // x;y
-                        aMap["POSX"] = aMap["data"].copy(0, separatorPos);
-                        aMap["POSY"] = aMap["data"].copy(separatorPos + 1);
-                    }
-                    pUIWindow->execute(sClickAction, aMap);
+                    // x;y
+                    aMap["POSX"] = aMap["data"].copy(0, separatorPos);
+                    aMap["POSY"] = aMap["data"].copy(separatorPos + 1);
                 }
-                else
-                    pUIWindow->execute(sClickAction, aMap);
+                pUIWindow->execute(sClickAction, aMap);
             }
+            else
+                pUIWindow->execute(sClickAction, aMap);
         }
     } catch(...) {}
 
     // force resend
-    if (!bIsWeldedDialog)
-        pWindow->Resize();
+    pWindow->Resize();
 }
 
 
commit 74a807f674fee7922d474a45c0b5be59fb8545ed
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue May 18 17:07:30 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue May 25 12:21:01 2021 +0200

    jsdialog: weld Container
    
    Change-Id: I9516538cac8d2e42e0d029feaf84c3bc3a80151a

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index ceeb5c1298b6..949499256d5a 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -226,6 +226,7 @@ public:
     virtual ~JSInstanceBuilder() override;
     virtual std::unique_ptr<weld::MessageDialog> weld_message_dialog(const OString& id) override;
     virtual std::unique_ptr<weld::Dialog> weld_dialog(const OString& id) override;
+    virtual std::unique_ptr<weld::Container> weld_container(const OString& id) override;
     virtual std::unique_ptr<weld::Label> weld_label(const OString& id) override;
     virtual std::unique_ptr<weld::Button> weld_button(const OString& id) override;
     virtual std::unique_ptr<weld::Entry> weld_entry(const OString& id) override;
@@ -378,6 +379,13 @@ public:
     virtual void response(int response) override;
 };
 
+class JSContainer : public JSWidget<SalInstanceContainer, vcl::Window>
+{
+public:
+    JSContainer(JSDialogSender* pSender, vcl::Window* pContainer, SalInstanceBuilder* pBuilder,
+                bool bTakeOwnership);
+};
+
 class JSLabel : public JSWidget<SalInstanceLabel, FixedText>
 {
 public:
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 6cfdea3e8b54..065cb066eca4 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -628,6 +628,17 @@ std::unique_ptr<weld::MessageDialog> JSInstanceBuilder::weld_message_dialog(cons
     return pRet;
 }
 
+std::unique_ptr<weld::Container> JSInstanceBuilder::weld_container(const OString& id)
+{
+    vcl::Window* pContainer = m_xBuilder->get<vcl::Window>(id);
+    auto pWeldWidget = std::make_unique<JSContainer>(this, pContainer, this, false);
+
+    if (pWeldWidget)
+        RememberWidget(id, pWeldWidget.get());
+
+    return pWeldWidget;
+}
+
 std::unique_ptr<weld::Label> JSInstanceBuilder::weld_label(const OString& id)
 {
     ::FixedText* pLabel = m_xBuilder->get<FixedText>(id);
@@ -862,6 +873,12 @@ void JSDialog::response(int response)
     SalInstanceDialog::response(response);
 }
 
+JSContainer::JSContainer(JSDialogSender* pSender, vcl::Window* pContainer,
+                         SalInstanceBuilder* pBuilder, bool bTakeOwnership)
+    : JSWidget<SalInstanceContainer, vcl::Window>(pSender, pContainer, pBuilder, bTakeOwnership)
+{
+}
+
 JSLabel::JSLabel(JSDialogSender* pSender, FixedText* pLabel, SalInstanceBuilder* pBuilder,
                  bool bTakeOwnership)
     : JSWidget<SalInstanceLabel, FixedText>(pSender, pLabel, pBuilder, bTakeOwnership)
commit fae4c002631ee8d68d531a3905fbecacb86cccf6
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri May 21 10:17:51 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue May 25 12:12:33 2021 +0200

    sidebar: fix fontwork panel
    
    Change-Id: Id2487e1c893bc1ae0afb1fd72b6d9bc05d7f94d5

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index f95ea703a464..184317bda5a8 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -827,6 +827,9 @@
         <prop oor:name="OrderIndex" oor:type="xs:int">
           <value>600</value>
         </prop>
+        <prop oor:name="WantsAWT" oor:type="xs:boolean">
+          <value>false</value>
+        </prop>
       </node>
 
       <node oor:name="GraphicPropertyPanel" oor:op="replace">
commit 2c4daf487b4a25cb19e84fb894ade0b06648f4c1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 12 14:25:34 2021 +0000
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue May 25 12:12:33 2021 +0200

    weld the sidebar deck
    
    Change-Id: Idc6710df7e59bcb5f61fca783e0cc0666cb13a1f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112404
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx
index 5122e915da14..489f6137b3a7 100644
--- a/include/sfx2/sidebar/Deck.hxx
+++ b/include/sfx2/sidebar/Deck.hxx
@@ -19,15 +19,14 @@
 #pragma once
 
 #include <sfx2/sidebar/Panel.hxx>
-
-#include <vcl/window.hxx>
-
-class ScrollBar;
+#include <vcl/InterimItemWindow.hxx>
+#include <vcl/weld.hxx>
 
 namespace sfx2::sidebar
 {
 class DeckDescriptor;
 class DeckTitleBar;
+class SidebarDockingWindow;
 
 /** This is the parent window of the panels.
     It displays the deck title.
@@ -35,25 +34,25 @@ class DeckTitleBar;
     A deck consists of multiple panels.
     E.g. Properties, Styles, Navigator.
 */
-class Deck final : public vcl::Window
+class Deck final : public InterimItemWindow
 {
 public:
-    Deck(const DeckDescriptor& rDeckDescriptor, vcl::Window* pParentWindow,
+    Deck(const DeckDescriptor& rDeckDescriptor, SidebarDockingWindow* pParentWindow,
          const std::function<void()>& rCloserAction);
     virtual ~Deck() override;
     virtual void dispose() override;
 
     const OUString& GetId() const { return msId; }
 
-    VclPtr<DeckTitleBar> const& GetTitleBar() const;
+    DeckTitleBar* GetTitleBar() const;
     tools::Rectangle GetContentArea() const;
     void ResetPanels(const SharedPanelContainer& rPanels);
     const SharedPanelContainer& GetPanels() const { return maPanels; }
 
-    Panel* GetPanel(OUString const& panelId);
+    std::shared_ptr<Panel> GetPanel(std::u16string_view panelId);
 
     void RequestLayout();
-    vcl::Window* GetPanelParentWindow();
+    weld::Widget* GetPanelParentWindow();
 
     /** Try to make the panel completely visible.
         When the whole panel does not fit then make its top visible
@@ -61,11 +60,8 @@ public:
     */
     void ShowPanel(const Panel& rPanel);
 
-    virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
-    virtual void Paint(vcl::RenderContext& rRenderContext,
-                       const tools::Rectangle& rUpdateArea) override;
     virtual void DataChanged(const DataChangedEvent& rEvent) override;
-    virtual bool EventNotify(NotifyEvent& rEvent) override;
+
     virtual void Resize() override;
 
     virtual void DumpAsPropertyTree(tools::JsonWriter&) override;
@@ -74,17 +70,7 @@ public:
 
     sal_Int32 GetMinimalWidth() const { return mnMinimalWidth; }
 
-    class ScrollContainerWindow final : public vcl::Window
-    {
-    public:
-        ScrollContainerWindow(vcl::Window* pParentWindow);
-        virtual void Paint(vcl::RenderContext& rRenderContext,
-                           const tools::Rectangle& rUpdateArea) override;
-        void SetSeparators(const ::std::vector<sal_Int32>& rSeparators);
-
-    private:
-        std::vector<sal_Int32> maSeparators;
-    };
+    SidebarDockingWindow* GetDockingWindow() const { return mxParentWindow; }
 
 private:
     void RequestLayoutInternal();
@@ -94,14 +80,11 @@ private:
     sal_Int32 mnMinimalWidth;
     sal_Int32 mnMinimalHeight;
     SharedPanelContainer maPanels;
-    VclPtr<DeckTitleBar> mpTitleBar;
-    VclPtr<vcl::Window> mpScrollClipWindow;
-    VclPtr<ScrollContainerWindow> mpScrollContainer;
-    VclPtr<vcl::Window> mpFiller;
-    VclPtr<ScrollBar> mpVerticalScrollBar;
-
-    DECL_LINK(HandleVerticalScrollBarChange, ScrollBar*, void);
-    bool ProcessWheelEvent(CommandEvent const* pCommandEvent);
+
+    VclPtr<SidebarDockingWindow> mxParentWindow;
+    std::unique_ptr<DeckTitleBar> mxTitleBar;
+    std::unique_ptr<weld::ScrolledWindow> mxVerticalScrollBar;
+    std::unique_ptr<weld::Container> mxContents;
 };
 
 } // end of namespace sfx2::sidebar
diff --git a/include/sfx2/sidebar/FocusManager.hxx b/include/sfx2/sidebar/FocusManager.hxx
index 0bebe247e634..2370ff3f801c 100644
--- a/include/sfx2/sidebar/FocusManager.hxx
+++ b/include/sfx2/sidebar/FocusManager.hxx
@@ -20,6 +20,7 @@
 
 #include <sfx2/sidebar/Panel.hxx>
 #include <tools/link.hxx>
+#include <vcl/vclevent.hxx>
 #include <vcl/keycod.hxx>
 
 namespace weld {
@@ -64,13 +65,14 @@ public:
     void GrabFocus();
     void GrabFocusPanel();
 
-    void SetDeckTitle(DeckTitleBar* pDeckTitleBar);
+    void SetDeck(Deck* pDeck);
     void SetPanels(const SharedPanelContainer& rPanels);
     void SetButtons(const std::vector<weld::Widget*>& rButtons);
 
 private:
-    VclPtr<DeckTitleBar> mpDeckTitleBar;
-    std::vector<VclPtr<Panel> > maPanels;
+    VclPtr<Deck> mxDeck;
+    DeckTitleBar* mpDeckTitleBar;
+    SharedPanelContainer maPanels;
     std::vector<weld::Widget*> maButtons;
     const std::function<void(const Panel&)> maShowPanelFunctor;
 
@@ -94,7 +96,6 @@ private:
     /** Listen for key events for panels and buttons.
     */
     DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
-    DECL_LINK(ChildEventListener, VclWindowEvent&, void);
 
     void ClearPanels();
     void ClearButtons();
@@ -105,10 +106,6 @@ private:
     void RegisterWindow(weld::Widget& rWidget);
     static void UnregisterWindow(weld::Widget& rWidget);
 
-    /** Remove the window from the panel or the button container.
-    */
-    void RemoveWindow(vcl::Window& rWindow);
-
     void FocusDeckTitle();
     bool IsDeckTitleVisible() const;
     bool IsPanelTitleVisible(const sal_Int32 nPanelIndex) const;
@@ -130,13 +127,12 @@ private:
     void ClickButton(const sal_Int32 nButtonIndex);
     void MoveFocusInsidePanel(const FocusLocation& rLocation,
                               const sal_Int32 nDirection);
-    void MoveFocusInsideDeckTitle(const FocusLocation& rLocation,
+    bool MoveFocusInsideDeckTitle(const FocusLocation& rLocation,
                                   const sal_Int32 nDirection);
 
     bool HandleKeyEvent(const vcl::KeyCode& rKeyCode,
                         const FocusLocation& rLocation);
 
-    FocusLocation GetFocusLocation(const vcl::Window& rWindow) const;
     FocusLocation GetFocusLocation() const;
 
 };
diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx
index 9835ccd8207a..dd5926c6a984 100644
--- a/include/sfx2/sidebar/Panel.hxx
+++ b/include/sfx2/sidebar/Panel.hxx
@@ -19,9 +19,7 @@
 #pragma once
 
 #include <sfx2/dllapi.h>
-
-#include <vcl/InterimItemWindow.hxx>
-
+#include <vcl/weld.hxx>
 #include <vector>
 
 namespace com::sun::star::frame
@@ -43,27 +41,28 @@ class XWindow;
 
 namespace sfx2::sidebar
 {
+class Context;
+class Deck;
 class PanelDescriptor;
 class PanelTitleBar;
-class Context;
 
 /**
  * Multiple panels form a single deck.
  * E.g. the Properties deck has panels like Styles, Character, paragraph.
  */
-class SFX2_DLLPUBLIC Panel final : public InterimItemWindow
+class SFX2_DLLPUBLIC Panel final
 {
 public:
-    Panel(const PanelDescriptor& rPanelDescriptor, vcl::Window* pParentWindow,
-          const bool bIsInitiallyExpanded, const std::function<void()>& rDeckLayoutTrigger,
+    Panel(const PanelDescriptor& rPanelDescriptor, weld::Widget* pParentWindow,
+          const bool bIsInitiallyExpanded, Deck* pDeck,
           const std::function<Context()>& rContextAccess,
           const css::uno::Reference<css::frame::XFrame>& rxFrame);
 
-    virtual ~Panel() override;
-    virtual void dispose() override;
+    ~Panel();
 
     PanelTitleBar* GetTitleBar() const;
-    void ShowTitlebar(bool bShowTitlebar);
+    weld::Container* GetContents() const;
+    void Show(bool bShow);
     bool IsTitleBarOptional() const { return mbIsTitleBarOptional; }
     void SetUIElement(const css::uno::Reference<css::ui::XUIElement>& rxElement);
     const css::uno::Reference<css::ui::XSidebarPanel>& GetPanelComponent() const
@@ -76,32 +75,48 @@ public:
     bool IsExpanded() const { return mbIsExpanded; }
     bool HasIdPredicate(const OUString& rsId) const;
     const OUString& GetId() const { return msPanelId; }
-    void TriggerDeckLayouting() { maDeckLayoutTrigger(); }
+    const OUString& GetTitle() const { return msTitle; }
+    void TriggerDeckLayouting();
+
+    void SetHeightPixel(int nHeight);
+
+    bool get_extents(tools::Rectangle& rExtents) const;
 
     /// Set whether a panel should be present but invisible / inactive
     void SetLurkMode(bool bLurk);
     bool IsLurking() const { return mbLurking; }
 
-    virtual void DataChanged(const DataChangedEvent& rEvent) override;
-    virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
-    virtual void DumpAsPropertyTree(tools::JsonWriter&) override;
+    void set_margin_top(int nMargin);
+    void set_margin_bottom(int nMargin);
+    void set_vexpand(bool bExpand);
+
+    weld::Window* GetFrameWeld();
+
+    void DataChanged();
 
 private:
+    std::unique_ptr<weld::Builder> mxBuilder;
     const OUString msPanelId;
+    const OUString msTitle;
     const bool mbIsTitleBarOptional;
     const bool mbWantsAWT;
     css::uno::Reference<css::ui::XUIElement> mxElement;
     css::uno::Reference<css::ui::XSidebarPanel> mxPanelComponent;
     bool mbIsExpanded;
     bool mbLurking;
-    const std::function<void()> maDeckLayoutTrigger;
     const std::function<Context()> maContextAccess;
     const css::uno::Reference<css::frame::XFrame>& mxFrame;
+    weld::Widget* mpParentWindow;
+    VclPtr<Deck> mxDeck;
+    std::unique_ptr<weld::Container> mxContainer;
     std::unique_ptr<PanelTitleBar> mxTitleBar;
     std::unique_ptr<weld::Container> mxContents;
     css::uno::Reference<css::awt::XWindow> mxXWindow;
+
+    DECL_LINK(DumpAsPropertyTreeHdl, tools::JsonWriter&, void);
 };
-typedef std::vector<VclPtr<Panel>> SharedPanelContainer;
+
+typedef std::vector<std::shared_ptr<Panel>> SharedPanelContainer;
 
 } // end of namespace sfx2::sidebar
 
diff --git a/include/sfx2/sidebar/PanelLayout.hxx b/include/sfx2/sidebar/PanelLayout.hxx
index b03ebf97bb22..e5630180f99e 100644
--- a/include/sfx2/sidebar/PanelLayout.hxx
+++ b/include/sfx2/sidebar/PanelLayout.hxx
@@ -21,9 +21,9 @@ namespace tools { class JsonWriter; }
 class SFX2_DLLPUBLIC PanelLayout
 {
 protected:
-    VclPtr<sfx2::sidebar::Panel> m_xPanel;
     std::unique_ptr<weld::Builder> m_xBuilder;
     std::unique_ptr<weld::Container> m_xContainer;
+    sfx2::sidebar::Panel* m_pPanel;
 
     virtual void DataChanged(const DataChangedEvent& rEvent);
     virtual void DumpAsPropertyTree(tools::JsonWriter&);
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index 78e9221000f9..629abf405c5c 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -239,9 +239,9 @@ private:
     void CreatePanels(
         const OUString& rDeckId,
         const Context& rContext);
-    VclPtr<Panel> CreatePanel (
-        const OUString& rsPanelId,
-        vcl::Window* pParentWindow,
+    std::shared_ptr<Panel> CreatePanel (
+        std::u16string_view rsPanelId,
+        weld::Widget* pParentWindow,
         const bool bIsInitiallyExpanded,
         const Context& rContext,
         const VclPtr<Deck>& pDeck);
diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx
index c59d71233b00..26e185396594 100644
--- a/include/sfx2/sidebar/Theme.hxx
+++ b/include/sfx2/sidebar/Theme.hxx
@@ -59,8 +59,6 @@ public:
 
         Image_Color_,
 
-        Color_DeckTitleFont,
-        Color_PanelTitleFont,
         Color_Highlight,
         Color_HighlightText,
         Color_DeckBackground,
@@ -68,16 +66,11 @@ public:
         Color_PanelBackground,
         Color_PanelTitleBarBackground,
         Color_TabBarBackground,
-        Color_HorizontalBorder,
-        Color_VerticalBorder,
-        Color_DropDownBackground,
 
         Color_Int_,
 
-        Int_DeckTitleBarHeight,
         Int_DeckBorderSize,
         Int_DeckSeparatorHeight,
-        Int_PanelTitleBarHeight,
         Int_DeckLeftPadding,
         Int_DeckTopPadding,
         Int_DeckRightPadding,
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 43c566fb761c..035875e5bc20 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -343,8 +343,8 @@ void SlideBackground::HandleContextChange(
             mxInsertImage->hide();
 
         // Need to do a relayouting, otherwise the panel size is not updated after show / hide controls
-        if (m_xPanel)
-            m_xPanel->TriggerDeckLayouting();
+        if (m_pPanel)
+            m_pPanel->TriggerDeckLayouting();
 
     }
     else if ( IsDraw() )
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 88127c9f78b1..865b5c1c3362 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -22,7 +22,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
 	sfx2/uiconfig/ui/cmisinfopage \
 	sfx2/uiconfig/ui/cmisline \
 	sfx2/uiconfig/ui/custominfopage \
-	sfx2/uiconfig/ui/decktitlebar \
+	sfx2/uiconfig/ui/deck \
 	sfx2/uiconfig/ui/descriptioninfopage \
 	sfx2/uiconfig/ui/documentfontspage \
 	sfx2/uiconfig/ui/documentinfopage \
diff --git a/sfx2/inc/sidebar/DeckLayouter.hxx b/sfx2/inc/sidebar/DeckLayouter.hxx
index b84496cd6646..c814abd98921 100644
--- a/sfx2/inc/sidebar/DeckLayouter.hxx
+++ b/sfx2/inc/sidebar/DeckLayouter.hxx
@@ -20,27 +20,26 @@
 
 #include <sfx2/sidebar/Panel.hxx>
 
-class ScrollBar;
-namespace vcl { class Window; }
 namespace tools { class Rectangle; }
 
 namespace sfx2::sidebar {
 
+class DeckTitleBar;
+class SidebarDockingWindow;
+
 /** Helper for layouting the direct and indirect children of a
     deck like title bars, panels, and scroll bars.
 */
 namespace DeckLayouter
 {
     void LayoutDeck (
+        SidebarDockingWindow* pDockingWindow,
         const tools::Rectangle& rContentArea,
         sal_Int32& rMinimalWidth,
         sal_Int32& rMinimalHeight,
         SharedPanelContainer& rPanels,
-        vcl::Window& pDeckTitleBar,
-        vcl::Window& pScrollClipWindow,
-        vcl::Window& pScrollContainer,
-        vcl::Window& pFiller,
-        ScrollBar& pVerticalScrollBar);
+        DeckTitleBar& pDeckTitleBar,
+        weld::ScrolledWindow& pVerticalScrollBar);
 }
 
 } // end of namespace sfx2::sidebar
diff --git a/sfx2/inc/sidebar/DeckTitleBar.hxx b/sfx2/inc/sidebar/DeckTitleBar.hxx
index 5fcc7403f134..c471039fe9af 100644
--- a/sfx2/inc/sidebar/DeckTitleBar.hxx
+++ b/sfx2/inc/sidebar/DeckTitleBar.hxx
@@ -23,14 +23,14 @@
 
 namespace sfx2::sidebar
 {
+class Deck;
 class GripWidget;
 
 class DeckTitleBar final : public TitleBar
 {
 public:
-    DeckTitleBar(const OUString& rsTitle, vcl::Window* pParentWindow,
+    DeckTitleBar(const OUString& rsTitle, weld::Builder& rBuilder,
                  const std::function<void()>& rCloserAction);
-    virtual void dispose() override;
     virtual ~DeckTitleBar() override;
 
     virtual void SetTitle(const OUString& rsTitle) override;
@@ -39,7 +39,7 @@ public:
     void SetCloserVisible(const bool bIsCloserVisible);
     tools::Rectangle GetDragArea();
 
-    virtual void DataChanged(const DataChangedEvent& rEvent) override;
+    virtual void DataChanged() override;
 
 private:
     virtual void HandleToolBoxItemClick() override;
diff --git a/sfx2/inc/sidebar/PanelTitleBar.hxx b/sfx2/inc/sidebar/PanelTitleBar.hxx
index 08133be6cf10..8a90f8a79101 100644
--- a/sfx2/inc/sidebar/PanelTitleBar.hxx
+++ b/sfx2/inc/sidebar/PanelTitleBar.hxx
@@ -28,8 +28,7 @@ namespace sfx2::sidebar {
 
 class Panel;
 
-class PanelTitleBar final
-    : public TitleBarBase
+class PanelTitleBar final : public TitleBar
 {
 public:
     PanelTitleBar(const OUString& rsTitle, weld::Builder& rBuilder, Panel* pPanel);
@@ -37,17 +36,12 @@ public:
 
     virtual void SetTitle (const OUString& rsTitle) override;
     virtual OUString GetTitle() const override;
-    virtual bool GetVisible() const override;
 
     void SetMoreOptionsCommand(const OUString& rsCommandName,
                                const css::uno::Reference<css::frame::XFrame>& rxFrame,
                                const css::uno::Reference<css::frame::XController>& rxController);
 
     void UpdateExpandedState();
-    void Show(bool bShow)
-    {
-        mxTitlebar->set_visible(bShow);
-    }
 
     weld::Expander& GetExpander()
     {
@@ -59,13 +53,11 @@ private:
 
     DECL_LINK(ExpandHdl, weld::Expander&, void);
 
-    std::unique_ptr<weld::Container> mxTitlebar;
     std::unique_ptr<weld::Expander> mxExpander;
 
     css::uno::Reference<css::frame::XToolbarController> mxController;
 
-    VclPtr<Panel> mpPanel;
-    css::uno::Reference<css::frame::XFrame> mxFrame;
+    Panel* mpPanel;
     OString msIdent;
     OUString msMoreOptionsCommand;
 };
diff --git a/sfx2/inc/sidebar/TitleBar.hxx b/sfx2/inc/sidebar/TitleBar.hxx
index 425e859cc690..4672342ffec5 100644
--- a/sfx2/inc/sidebar/TitleBar.hxx
+++ b/sfx2/inc/sidebar/TitleBar.hxx
@@ -21,20 +21,24 @@
 #include <sidebar/SidebarToolBox.hxx>
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/weldutils.hxx>
-#include <vcl/InterimItemWindow.hxx>
 
 namespace sfx2::sidebar {
 
-class TitleBarBase
+class TitleBar
 {
 public:
-    TitleBarBase(weld::Builder& rBuilder, Theme::ThemeItem eThemeItem);
-    void reset();
-    virtual ~TitleBarBase();
+    TitleBar(weld::Builder& rBuilder, Theme::ThemeItem eThemeItem);
+    virtual ~TitleBar();
 
     virtual void SetTitle (const OUString& rsTitle) = 0;
     virtual OUString GetTitle() const = 0;
-    virtual bool GetVisible() const = 0;
+
+    virtual void DataChanged();
+
+    void Show(bool bShow);
+    bool GetVisible() const;
+
+    Size get_preferred_size() const;
 
     void SetIcon(const css::uno::Reference<css::graphic::XGraphic>& rIcon);
 
@@ -49,6 +53,7 @@ public:
 
 protected:
     weld::Builder& mrBuilder;
+    std::unique_ptr<weld::Container> mxTitlebar;
     std::unique_ptr<weld::Image> mxAddonImage;
     std::unique_ptr<weld::Toolbar> mxToolBox;
     std::unique_ptr<ToolbarUnoDispatcher> mxToolBoxController;
@@ -57,20 +62,9 @@ protected:
     virtual void HandleToolBoxItemClick() = 0;
 
     DECL_LINK(SelectionHandler, const OString&, void);
-};
-
-class TitleBar : public InterimItemWindow
-               , public TitleBarBase
-{
-public:
-    TitleBar(vcl::Window* pParentWindow,
-             const OUString& rUIXMLDescription, const OString& rID,
-             Theme::ThemeItem eThemeItem);
-    virtual void dispose() override;
-    virtual bool GetVisible() const override { return IsVisible(); }
-    virtual ~TitleBar() override;
 
-    virtual void DataChanged (const DataChangedEvent& rEvent) override;
+private:
+    void SetBackground();
 };
 
 } // end of namespace sfx2::sidebar
diff --git a/sfx2/inc/sidebar/UnoPanel.hxx b/sfx2/inc/sidebar/UnoPanel.hxx
index 50d9aba2c0fa..2b1197eb95f7 100644
--- a/sfx2/inc/sidebar/UnoPanel.hxx
+++ b/sfx2/inc/sidebar/UnoPanel.hxx
@@ -60,7 +60,7 @@ private:
     const OUString mDeckId;
 
     VclPtr<sfx2::sidebar::Deck> mpDeck;
-    VclPtr<sfx2::sidebar::Panel> mpPanel;
+    std::weak_ptr<sfx2::sidebar::Panel> mxPanel;
 
     sal_Int32 GetMaxOrderIndex(sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer aPanels);
     sal_Int32 GetMinOrderIndex(sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer aPanels);
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index ca988521d184..5070d500038d 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -24,6 +24,7 @@
 #include <sidebar/DeckTitleBar.hxx>
 #include <sidebar/PanelTitleBar.hxx>
 #include <sfx2/sidebar/Panel.hxx>
+#include <sfx2/sidebar/SidebarDockingWindow.hxx>
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/lokhelper.hxx>
 
@@ -42,36 +43,24 @@ using namespace css::uno;
 
 namespace sfx2::sidebar {
 
-Deck::Deck(const DeckDescriptor& rDeckDescriptor, vcl::Window* pParentWindow,
+Deck::Deck(const DeckDescriptor& rDeckDescriptor, SidebarDockingWindow* pParentWindow,
            const std::function<void()>& rCloserAction)
-    : Window(pParentWindow, 0)
+    : InterimItemWindow(pParentWindow, "sfx/ui/deck.ui", "Deck")
     , msId(rDeckDescriptor.msId)
     , mnMinimalWidth(0)
     , mnMinimalHeight(0)
     , maPanels()
-    , mpTitleBar(VclPtr<DeckTitleBar>::Create(rDeckDescriptor.msTitle, this, rCloserAction))
-    , mpScrollClipWindow(VclPtr<vcl::Window>::Create(this))
-    , mpScrollContainer(VclPtr<ScrollContainerWindow>::Create(mpScrollClipWindow.get()))
-    , mpFiller(VclPtr<vcl::Window>::Create(this))
-    , mpVerticalScrollBar(VclPtr<ScrollBar>::Create(this))
+    , mxParentWindow(pParentWindow)
+    , mxTitleBar(new DeckTitleBar(rDeckDescriptor.msTitle, *m_xBuilder, rCloserAction))
+    , mxVerticalScrollBar(m_xBuilder->weld_scrolled_window("scrolledwindow"))
+    , mxContents(m_xBuilder->weld_container("contents"))
 {
-    mpScrollClipWindow->SetBackground(Wallpaper());
-    mpScrollClipWindow->Show();
-
-    mpScrollContainer->SetStyle(mpScrollContainer->GetStyle() | WB_DIALOGCONTROL);
-    mpScrollContainer->SetBackground(Wallpaper());
-    mpScrollContainer->Show();
-
-    mpVerticalScrollBar->SetScrollHdl(LINK(this, Deck, HandleVerticalScrollBarChange));
-    mpVerticalScrollBar->SetLineSize(10);
-    mpVerticalScrollBar->SetPageSize(100);
-
-#ifdef DEBUG
-    SetText(OUString("Deck"));
-    mpScrollClipWindow->SetText(OUString("ScrollClipWindow"));
-    mpFiller->SetText(OUString("Filler"));
-    mpVerticalScrollBar->SetText(OUString("VerticalScrollBar"));
-#endif
+    SetStyle(GetStyle() | WB_DIALOGCONTROL);
+
+    m_xContainer->set_background(Theme::GetColor(Theme::Color_DeckBackground));
+
+    mxVerticalScrollBar->vadjustment_set_step_increment(10);
+    mxVerticalScrollBar->vadjustment_set_page_increment(100);
 }
 
 Deck::~Deck()
@@ -87,22 +76,22 @@ void Deck::dispose()
     // We have to explicitly trigger the destruction of panels.
     // Otherwise that is done by one of our base class destructors
     // without updating maPanels.
-    for (VclPtr<Panel> & rpPanel : aPanels)
-        rpPanel.disposeAndClear();
+    for (auto& rpPanel : aPanels)
+        rpPanel.reset();
 
-    maPanels.clear(); // just to keep the loplugin:vclwidgets happy
-    mpTitleBar.disposeAndClear();
-    mpFiller.disposeAndClear();
-    mpVerticalScrollBar.disposeAndClear();
-    mpScrollContainer.disposeAndClear();
-    mpScrollClipWindow.disposeAndClear();
+    maPanels.clear();
+    mxTitleBar.reset();
+    mxContents.reset();
+    mxVerticalScrollBar.reset();
 
-    vcl::Window::dispose();
+    mxParentWindow.clear();
+
+    InterimItemWindow::dispose();
 }
 
-VclPtr<DeckTitleBar> const & Deck::GetTitleBar() const
+DeckTitleBar* Deck::GetTitleBar() const
 {
-    return mpTitleBar;
+    return mxTitleBar.get();
 }
 
 tools::Rectangle Deck::GetContentArea() const
@@ -119,65 +108,17 @@ tools::Rectangle Deck::GetContentArea() const
         aWindowSize.Height() - 1 - Theme::GetInteger(Theme::Int_DeckBottomPadding) - nBorderSize);
 }
 
-void Deck::ApplySettings(vcl::RenderContext& rRenderContext)
+void Deck::DataChanged(const DataChangedEvent&)
 {
-    rRenderContext.SetBackground(Wallpaper());
-}
+    for (auto& rpPanel : maPanels)
+        rpPanel->DataChanged();
 
-void Deck::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/)
-{
-    const Size aWindowSize (GetSizePixel());
-    const SvBorder aPadding(Theme::GetInteger(Theme::Int_DeckLeftPadding),
-                            Theme::GetInteger(Theme::Int_DeckTopPadding),
-                            Theme::GetInteger(Theme::Int_DeckRightPadding),
-                            Theme::GetInteger(Theme::Int_DeckBottomPadding));
-
-    // Paint deck background outside the border.
-    tools::Rectangle aBox(0, 0, aWindowSize.Width() - 1, aWindowSize.Height() - 1);
-    DrawHelper::DrawBorder(rRenderContext, aBox, aPadding,
-                           Theme::GetColor(Theme::Color_DeckBackground),
-                           Theme::GetColor(Theme::Color_DeckBackground));
-
-    // Paint the border.
-    const int nBorderSize(Theme::GetInteger(Theme::Int_DeckBorderSize));
-    aBox.AdjustLeft(aPadding.Left() );
-    aBox.AdjustTop(aPadding.Top() );
-    aBox.AdjustRight( -(aPadding.Right()) );
-    aBox.AdjustBottom( -(aPadding.Bottom()) );
-    const Color nHorizontalBorderPaint(Theme::GetColor(Theme::Color_HorizontalBorder));
-    DrawHelper::DrawBorder(rRenderContext, aBox,
-                           SvBorder(nBorderSize, nBorderSize, nBorderSize, nBorderSize),
-                           nHorizontalBorderPaint,
-                           Theme::GetColor(Theme::Color_VerticalBorder));
-}
-
-void Deck::DataChanged (const DataChangedEvent&)
-{
     RequestLayoutInternal();
 }
 
-bool Deck::EventNotify(NotifyEvent& rEvent)
-{
-    if (rEvent.GetType() == MouseNotifyEvent::COMMAND)
-    {
-        CommandEvent* pCommandEvent = static_cast<CommandEvent*>(rEvent.GetData());
-        if (pCommandEvent != nullptr)
-            switch (pCommandEvent->GetCommand())
-            {
-                case CommandEventId::Wheel:
-                    return ProcessWheelEvent(pCommandEvent);
-
-                default:
-                    break;
-            }
-    }
-
-    return Window::EventNotify(rEvent);
-}
-
 void Deck::Resize()
 {
-    Window::Resize();
+    InterimItemWindow::Resize();
 
     if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
     {
@@ -207,52 +148,26 @@ void Deck::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
             continue;
 
         // collapse the panel itself out
-        auto xContent = it->GetElementWindow();
-        if (!xContent.is())
-            continue;
-        VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xContent);
-        if (!pWindow)
+        auto xContent = it->GetContents();
+        if (!xContent)
             continue;
 
         auto childNode = rJsonWriter.startStruct();
         rJsonWriter.put("id", it->GetId());
         rJsonWriter.put("type", "panel");
-        rJsonWriter.put("text", it->GetText());
-        rJsonWriter.put("enabled", it->IsEnabled());
+        rJsonWriter.put("text", it->GetTitle());
+        rJsonWriter.put("enabled", true);
 
         {
             auto children2Node = rJsonWriter.startArray("children");
             {
                 auto child2Node = rJsonWriter.startStruct();
-                pWindow->DumpAsPropertyTree(rJsonWriter);
+                xContent->get_property_tree(rJsonWriter);
             }
         }
     }
 }
 
-bool Deck::ProcessWheelEvent(CommandEvent const * pCommandEvent)
-{
-    if ( ! mpVerticalScrollBar)
-        return false;
-    if ( ! mpVerticalScrollBar->IsVisible())
-        return false;
-
-    // Get the wheel data and check that it describes a valid vertical
-    // scroll.
-    const CommandWheelData* pData = pCommandEvent->GetWheelData();
-    if (pData==nullptr
-        || pData->GetModifier()
-        || pData->GetMode() != CommandWheelMode::SCROLL
-        || pData->IsHorz())
-        return false;
-
-    // Execute the actual scroll action.
-    tools::Long nDelta = pData->GetDelta();
-    mpVerticalScrollBar->DoScroll(
-        mpVerticalScrollBar->GetThumbPos() - nDelta);
-    return true;
-}
-
 /**
  * This container may contain existing panels that are
  * being re-used, and new ones too.
@@ -262,7 +177,7 @@ void Deck::ResetPanels(const SharedPanelContainer& rPanelContainer)
     SharedPanelContainer aHiddens;
 
     // First hide old panels we don't need just now.
-    for (VclPtr<Panel> & rpPanel : maPanels)
+    for (auto& rpPanel : maPanels)
     {
         bool bFound = false;
         for (const auto & i : rPanelContainer)
@@ -286,9 +201,9 @@ void Deck::RequestLayoutInternal()
     mnMinimalWidth = 0;
     mnMinimalHeight = 0;
 
-    DeckLayouter::LayoutDeck(GetContentArea(), mnMinimalWidth, mnMinimalHeight, maPanels,
-                             *GetTitleBar(), *mpScrollClipWindow, *mpScrollContainer,
-                             *mpFiller, *mpVerticalScrollBar);
+    DeckLayouter::LayoutDeck(mxParentWindow.get(), GetContentArea(),
+                             mnMinimalWidth, mnMinimalHeight, maPanels,
+                             *GetTitleBar(), *mxVerticalScrollBar);
 }
 
 void Deck::RequestLayout()
@@ -323,18 +238,18 @@ void Deck::RequestLayout()
         setPosSizePixel(0, 0, aParentSize.Width(), aParentSize.Height());
 }
 
-vcl::Window* Deck::GetPanelParentWindow()
+weld::Widget* Deck::GetPanelParentWindow()
 {
-    return mpScrollContainer.get();
+    return mxContents.get();
 }
 
-Panel* Deck::GetPanel(const OUString & panelId)
+std::shared_ptr<Panel> Deck::GetPanel(std::u16string_view panelId)
 {
-    for (const VclPtr<Panel> & pPanel : maPanels)
+    for (const auto& pPanel : maPanels)
     {
         if(pPanel->GetId() == panelId)
         {
-            return pPanel.get();
+            return pPanel;
         }
     }
     return nullptr;
@@ -343,100 +258,27 @@ Panel* Deck::GetPanel(const OUString & panelId)
 
 void Deck::ShowPanel(const Panel& rPanel)
 {
-    if (!mpVerticalScrollBar || !mpVerticalScrollBar->IsVisible())
+    if (!mxVerticalScrollBar || mxVerticalScrollBar->get_vpolicy() == VclPolicyType::NEVER)
         return;
 
     // Get vertical extent of the panel.
-    sal_Int32 nPanelTop (rPanel.GetPosPixel().Y());
-    const sal_Int32 nPanelBottom (nPanelTop + rPanel.GetSizePixel().Height() - 1);
+    tools::Rectangle aExtents;
+    if (!rPanel.get_extents(aExtents))
+        return;
+
+    auto nPanelTop = aExtents.Top();
+    auto nPanelBottom = aExtents.Bottom() - 1;
 
     // Determine what the new thumb position should be like.
     // When the whole panel does not fit then make its top visible
     // and it off at the bottom.
-    sal_Int32 nNewThumbPos (mpVerticalScrollBar->GetThumbPos());
-    if (nPanelBottom >= nNewThumbPos+mpVerticalScrollBar->GetVisibleSize())
-        nNewThumbPos = nPanelBottom - mpVerticalScrollBar->GetVisibleSize();
+    sal_Int32 nNewThumbPos(mxVerticalScrollBar->vadjustment_get_value());
+    if (nPanelBottom >= nNewThumbPos + mxVerticalScrollBar->vadjustment_get_page_size())
+        nNewThumbPos = nPanelBottom - mxVerticalScrollBar->vadjustment_get_page_size();
     if (nPanelTop < nNewThumbPos)
         nNewThumbPos = nPanelTop;
 
-    mpVerticalScrollBar->SetThumbPos(nNewThumbPos);
-    mpScrollContainer->SetPosPixel(
-        Point(
-            mpScrollContainer->GetPosPixel().X(),
-            -nNewThumbPos));
-}
-
-static OUString GetWindowClassification(const vcl::Window* pWindow)
-{
-    const OUString& rsName (pWindow->GetText());
-    if (!rsName.isEmpty())
-    {
-        return rsName;
-    }
-    else
-    {
-        return "window";
-    }
-}
-
-void Deck::PrintWindowSubTree(vcl::Window* pRoot, int nIndentation)
-{
-    static const char* const sIndentation = "                                                                  ";
-    const Point aLocation (pRoot->GetPosPixel());
-    const Size aSize (pRoot->GetSizePixel());
-    SAL_INFO(
-        "sfx.sidebar",
-        sIndentation + strlen(sIndentation) - nIndentation * 4 << pRoot << " "
-            << GetWindowClassification(pRoot) << " "
-            << (pRoot->IsVisible() ? "visible" : "hidden") << " +"
-            << aLocation.X() << "+" << aLocation.Y() << " x" << aSize.Width()
-            << "x" << aSize.Height());
-
-    const sal_uInt16 nChildCount(pRoot->GetChildCount());
-    for (sal_uInt16 nIndex = 0; nIndex < nChildCount; ++nIndex)
-        PrintWindowSubTree(pRoot->GetChild(nIndex), nIndentation + 1);
-}
-
-IMPL_LINK_NOARG(Deck, HandleVerticalScrollBarChange, ScrollBar*, void)
-{
-    const sal_Int32 nYOffset (-mpVerticalScrollBar->GetThumbPos());
-    mpScrollContainer->SetPosPixel(Point(mpScrollContainer->GetPosPixel().X(),
-                                         nYOffset));
-    mpScrollContainer->Invalidate();
-}
-
-//----- Deck::ScrollContainerWindow -------------------------------------------
-
-Deck::ScrollContainerWindow::ScrollContainerWindow (vcl::Window* pParentWindow)
-    : Window(pParentWindow),
-      maSeparators()
-{
-#ifdef DEBUG
-    SetText(OUString("ScrollContainerWindow"));
-#endif
-}
-
-void Deck::ScrollContainerWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rUpdateArea*/)
-{
-    // Paint the separators.
-    const sal_Int32 nSeparatorHeight(Theme::GetInteger(Theme::Int_DeckSeparatorHeight));
-    const sal_Int32 nLeft(0);
-    const sal_Int32 nRight(GetSizePixel().Width() - 1);
-    const Color nHorizontalBorderPaint(Theme::GetColor(Theme::Color_HorizontalBorder));
-    for (auto const& separator : maSeparators)
-    {
-        DrawHelper::DrawHorizontalLine(rRenderContext, nLeft, nRight, separator,
-                                       nSeparatorHeight, nHorizontalBorderPaint);
-    }
-}
-
-void Deck::ScrollContainerWindow::SetSeparators (const ::std::vector<sal_Int32>& rSeparators)
-{
-    if (rSeparators != maSeparators)
-    {
-        maSeparators = rSeparators;
-        Invalidate();
-    }
+    mxVerticalScrollBar->vadjustment_set_value(nNewThumbPos);
 }
 
 } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx
index 05098986b826..36d6357ef305 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -18,10 +18,12 @@
  */
 
 #include <sidebar/DeckLayouter.hxx>
-#include <sfx2/sidebar/Theme.hxx>
-#include <sfx2/sidebar/Panel.hxx>
+#include <sidebar/DeckTitleBar.hxx>
 #include <sidebar/PanelTitleBar.hxx>
 #include <sfx2/sidebar/Deck.hxx>
+#include <sfx2/sidebar/Panel.hxx>
+#include <sfx2/sidebar/Theme.hxx>
+#include <sfx2/sidebar/SidebarDockingWindow.hxx>
 #include <sfx2/sidebar/SidebarController.hxx>
 #include <comphelper/lok.hxx>
 
@@ -52,14 +54,14 @@ namespace {
     class LayoutItem
     {
     public:
-        VclPtr<Panel> mpPanel;
+        std::shared_ptr<Panel> mpPanel;
         css::ui::LayoutSize maLayoutSize;
         sal_Int32 mnDistributedHeight;
         sal_Int32 mnWeight;
         bool mbShowTitleBar;
 
-        LayoutItem(const VclPtr<Panel>& rPanel)
-            : mpPanel(rPanel)
+        LayoutItem(std::shared_ptr<Panel>& pPanel)
+            : mpPanel(pPanel)
             , maLayoutSize(0, 0, 0)
             , mnDistributedHeight(0)
             , mnWeight(0)
@@ -67,14 +69,12 @@ namespace {
         {
         }
     };
-    tools::Rectangle LayoutPanels (
+    void LayoutPanels (
         const tools::Rectangle& rContentArea,
         sal_Int32& rMinimalWidth,
         sal_Int32& rMinimalHeight,
         ::std::vector<LayoutItem>& rLayoutItems,
-        vcl::Window& rScrollClipWindow,
-        vcl::Window& rScrollContainer,
-        ScrollBar& pVerticalScrollBar,
+        weld::ScrolledWindow& pVerticalScrollBar,
         const bool bShowVerticalScrollBar);
     void GetRequestedSizes (
         ::std::vector<LayoutItem>& rLayoutItem,
@@ -86,81 +86,66 @@ namespace {
         const sal_Int32 nHeightToDistribute,
         const sal_Int32 nContainerHeight,
         const bool bMinimumHeightIsBase);
-    bool MoveResizePixel(const VclPtr<vcl::Window> &pWindow,
-                         const Point &rNewPos, const Size &rNewSize);
     sal_Int32 PlacePanels (
         ::std::vector<LayoutItem>& rLayoutItems,
-        const sal_Int32 nWidth,
-        const LayoutMode eMode,
-        vcl::Window& rScrollContainer);
+        const LayoutMode eMode_);
     tools::Rectangle PlaceDeckTitle (
-        vcl::Window& rTitleBar,
+        SidebarDockingWindow* pDockingWindow,
+        DeckTitleBar& rTitleBar,
         const tools::Rectangle& rAvailableSpace);
     tools::Rectangle PlaceVerticalScrollBar (
-        ScrollBar& rVerticalScrollBar,
+        weld::ScrolledWindow& rVerticalScrollBar,
         const tools::Rectangle& rAvailableSpace,
         const bool bShowVerticalScrollBar);
     void SetupVerticalScrollBar(
-        ScrollBar& rVerticalScrollBar,
+        weld::ScrolledWindow& rVerticalScrollBar,
         const sal_Int32 nContentHeight,
         const sal_Int32 nVisibleHeight);
-    void UpdateFiller (
-        vcl::Window& rFiller,
-        const tools::Rectangle& rBox);
 }
 
 void DeckLayouter::LayoutDeck (
+    SidebarDockingWindow* pDockingWindow,
     const tools::Rectangle& rContentArea,
     sal_Int32& rMinimalWidth,
     sal_Int32& rMinimalHeight,
     SharedPanelContainer& rPanels,
-    vcl::Window& rDeckTitleBar,
-    vcl::Window& rScrollClipWindow,
-    vcl::Window& rScrollContainer,
-    vcl::Window& rFiller,
-    ScrollBar& rVerticalScrollBar)
+    DeckTitleBar& rDeckTitleBar,
+    weld::ScrolledWindow& rVerticalScrollBar)
 {
     if (rContentArea.GetWidth()<=0 || rContentArea.GetHeight()<=0)
         return;
-    tools::Rectangle aBox (PlaceDeckTitle(rDeckTitleBar, rContentArea));
+    tools::Rectangle aBox(PlaceDeckTitle(pDockingWindow, rDeckTitleBar, rContentArea));
 
     if ( ! rPanels.empty())
     {
         // Prepare the layout item container.
         ::std::vector<LayoutItem> aLayoutItems;
         aLayoutItems.reserve(rPanels.size());
-        for (const auto& rPanel : rPanels)
+        for (auto& rPanel : rPanels)
             aLayoutItems.emplace_back(rPanel);
 
-        aBox = LayoutPanels(
+        LayoutPanels(
             aBox,
             rMinimalWidth,
             rMinimalHeight,
             aLayoutItems,
-            rScrollClipWindow,
-            rScrollContainer,
             rVerticalScrollBar,
             false);
     }
-    UpdateFiller(rFiller, aBox);
 }
 
 namespace {
 
-tools::Rectangle LayoutPanels (
+void LayoutPanels (
     const tools::Rectangle& rContentArea,
     sal_Int32& rMinimalWidth,
     sal_Int32& rMinimalHeight,
     ::std::vector<LayoutItem>& rLayoutItems,
-    vcl::Window& rScrollClipWindow,
-    vcl::Window& rScrollContainer,
-    ScrollBar& rVerticalScrollBar,
+    weld::ScrolledWindow& rVerticalScrollBar,
     const bool bShowVerticalScrollBar)
 {
     tools::Rectangle aBox (PlaceVerticalScrollBar(rVerticalScrollBar, rContentArea, bShowVerticalScrollBar));
 
-    const sal_Int32 nWidth (aBox.GetWidth());
-
     // Get the requested heights of the panels and the available
     // height that is left when all panel titles and separators are
     // taken into account.
@@ -186,15 +171,14 @@ tools::Rectangle LayoutPanels (
         // Not enough space, even when all panels are shrunk to their
         // minimum height.
         // Show a vertical scrollbar.
-        return LayoutPanels(
+        LayoutPanels(
             rContentArea,
             rMinimalWidth,
             rMinimalHeight,
             rLayoutItems,
-            rScrollClipWindow,
-            rScrollContainer,
             rVerticalScrollBar,
             true);
+        return;
     }
 
     // We are now in one of three modes.
@@ -227,58 +211,26 @@ tools::Rectangle LayoutPanels (
             eMode==MinimumOrLarger);
     }
 
-    // Set position and size of the mpScrollClipWindow to the available
-    // size.  Its child, the mpScrollContainer, may have a bigger
-    // height.
-    rScrollClipWindow.setPosSizePixel(aBox.Left(), aBox.Top(), aBox.GetWidth(), aBox.GetHeight());
-
-    const sal_Int32 nContentHeight (
-        eMode==Preferred
-            ? nTotalPreferredHeight + nTotalDecorationHeight
-            : aBox.GetHeight());
-    sal_Int32 nY = rVerticalScrollBar.GetThumbPos();
-    if (nContentHeight-nY < aBox.GetHeight())
-        nY = nContentHeight-aBox.GetHeight();
-    if (nY < 0)
-        nY = 0;
-    rScrollContainer.setPosSizePixel(
-        0,
-        -nY,
-        nWidth,
-        nContentHeight);
-
     if (bShowVerticalScrollBar)
+    {
+        const sal_Int32 nContentHeight(
+            eMode==Preferred
+                ? nTotalPreferredHeight + nTotalDecorationHeight
+                : aBox.GetHeight());
         SetupVerticalScrollBar(rVerticalScrollBar, nContentHeight, aBox.GetHeight());
+    }
 
-    const sal_Int32 nUsedHeight (PlacePanels(rLayoutItems, nWidth, eMode, rScrollContainer));
-    aBox.AdjustTop(nUsedHeight );
+    const sal_Int32 nUsedHeight(PlacePanels(rLayoutItems, eMode));
     rMinimalHeight = nUsedHeight;
-    return aBox;
-}
-
-bool MoveResizePixel(const VclPtr<vcl::Window> &pWindow,
-                     const Point &rNewPos, const Size &rNewSize)
-{
-    Point aCurPos = pWindow->GetPosPixel();
-    Size aCurSize = pWindow->GetSizePixel();
-    if (rNewPos == aCurPos && aCurSize == rNewSize)
-        return false;
-    pWindow->setPosSizePixel(rNewPos.X(), rNewPos.Y(), rNewSize.Width(), rNewSize.Height());
-    return true;
 }
 
 sal_Int32 PlacePanels (
     ::std::vector<LayoutItem>& rLayoutItems,
-    const sal_Int32 nWidth,
-    const LayoutMode eMode,
-    vcl::Window& rScrollContainer)
+    const LayoutMode eMode)
 {
-    ::std::vector<sal_Int32> aSeparators;
     const sal_Int32 nDeckSeparatorHeight (Theme::GetInteger(Theme::Int_DeckSeparatorHeight));
     sal_Int32 nY (0);
 
-    vcl::Region aInvalidRegions;
-
     // Assign heights and places.
     for(::std::vector<LayoutItem>::const_iterator iItem(rLayoutItems.begin()),
          iEnd(rLayoutItems.end());
@@ -290,22 +242,26 @@ sal_Int32 PlacePanels (
 
         Panel& rPanel (*iItem->mpPanel);
 
+        rPanel.set_margin_top(nDeckSeparatorHeight);
+        rPanel.set_margin_bottom(0);
+
         // Separator above the panel title bar.
         if (!rPanel.IsLurking())
         {
-            aSeparators.push_back(nY);
             nY += nDeckSeparatorHeight;
         }
 
-        const sal_Int32 nPanelTitleBarHeight(Theme::GetInteger(Theme::Int_PanelTitleBarHeight) * rPanel.GetDPIScaleFactor());
-
         bool bShowTitlebar = iItem->mbShowTitleBar;
-        rPanel.ShowTitlebar(bShowTitlebar);
+        PanelTitleBar* pTitleBar = rPanel.GetTitleBar();
+        pTitleBar->Show(bShowTitlebar);
+        rPanel.set_vexpand(!bShowTitlebar);
+        weld::Container* pContents = rPanel.GetContents();
+        pContents->set_vexpand(true);
 
         bool bExpanded = rPanel.IsExpanded() && !rPanel.IsLurking();
         if (bShowTitlebar || bExpanded)
         {
-            rPanel.Show();
+            rPanel.Show(true);
 
             sal_Int32 nPanelHeight(0);
             if (bExpanded)
@@ -329,24 +285,15 @@ sal_Int32 PlacePanels (
                 }
             }
             if (bShowTitlebar)
-                nPanelHeight += nPanelTitleBarHeight;
+                nPanelHeight += pTitleBar->get_preferred_size().Height();
 
-            // Place the panel.
-            Point aNewPos(0, nY);
-            Size  aNewSize(nWidth, nPanelHeight);
-
-            // Only invalidate if we moved
-            if (MoveResizePixel(&rPanel, aNewPos, aNewSize))
-            {
-                tools::Rectangle aRect(aNewPos, aNewSize);
-                aInvalidRegions.Union(rPanel.PixelToLogic(aRect));
-            }
+            rPanel.SetHeightPixel(nPanelHeight);
 
             nY += nPanelHeight;
         }
         else
         {
-            rPanel.Hide();
+            rPanel.Show(false);
         }
 
         if (!bExpanded)
@@ -356,19 +303,12 @@ sal_Int32 PlacePanels (
             if (iItem == rLayoutItems.end()-1)
             {
                 // Separator below the panel title bar.
-                aSeparators.push_back(nY);
+                rPanel.set_margin_bottom(nDeckSeparatorHeight);
                 nY += nDeckSeparatorHeight;
             }
         }
     }
 
-    Deck::ScrollContainerWindow* pScrollContainerWindow
-        = dynamic_cast<Deck::ScrollContainerWindow*>(&rScrollContainer);
-    if (pScrollContainerWindow != nullptr)
-        pScrollContainerWindow->SetSeparators(aSeparators);
-
-    rScrollContainer.Invalidate(aInvalidRegions);
-
     return nY;
 }
 
@@ -407,7 +347,8 @@ void GetRequestedSizes (
         {
             // Show the title bar and a separator above and below
             // the title bar.
-            const sal_Int32 nPanelTitleBarHeight (Theme::GetInteger(Theme::Int_PanelTitleBarHeight) * rItem.mpPanel->GetDPIScaleFactor());
+            PanelTitleBar* pTitleBar = rItem.mpPanel->GetTitleBar();
+            const sal_Int32 nPanelTitleBarHeight = pTitleBar->get_preferred_size().Height();
 
             rAvailableHeight -= nPanelTitleBarHeight;
             rAvailableHeight -= nDeckSeparatorHeight;
@@ -548,25 +489,21 @@ void DistributeHeights (
     OSL_ASSERT(nRemainingHeightToDistribute==0);
 }
 
-tools::Rectangle PlaceDeckTitle (
-    vcl::Window& rDeckTitleBar,
+tools::Rectangle PlaceDeckTitle(
+    SidebarDockingWindow* pDockingWindow,
+    DeckTitleBar& rDeckTitleBar,
     const tools::Rectangle& rAvailableSpace)
 {
-    if (static_cast<DockingWindow*>(rDeckTitleBar.GetParent()->GetParent())->IsFloatingMode())
+    if (pDockingWindow->IsFloatingMode())
     {
         // When the side bar is undocked then the outer system window displays the deck title.
-        rDeckTitleBar.Hide();
+        rDeckTitleBar.Show(false);
         return rAvailableSpace;
     }
     else
     {
-        const sal_Int32 nDeckTitleBarHeight (Theme::GetInteger(Theme::Int_DeckTitleBarHeight) * rDeckTitleBar.GetDPIScaleFactor());
-        rDeckTitleBar.setPosSizePixel(
-            rAvailableSpace.Left(),
-            rAvailableSpace.Top(),
-            rAvailableSpace.GetWidth(),
-            nDeckTitleBarHeight);
-        rDeckTitleBar.Show();
+        rDeckTitleBar.Show(true);
+        const sal_Int32 nDeckTitleBarHeight(rDeckTitleBar.get_preferred_size().Height());
         return tools::Rectangle(
             rAvailableSpace.Left(),
             rAvailableSpace.Top() + nDeckTitleBarHeight,
@@ -576,19 +513,14 @@ tools::Rectangle PlaceDeckTitle (
 }
 
 tools::Rectangle PlaceVerticalScrollBar (
-    ScrollBar& rVerticalScrollBar,
+    weld::ScrolledWindow& rVerticalScrollBar,
     const tools::Rectangle& rAvailableSpace,
     const bool bShowVerticalScrollBar)
 {
     if (bShowVerticalScrollBar)
     {
-        const sal_Int32 nScrollBarWidth (rVerticalScrollBar.GetSizePixel().Width());
-        rVerticalScrollBar.setPosSizePixel(
-            rAvailableSpace.Right() - nScrollBarWidth + 1,
-            rAvailableSpace.Top(),
-            nScrollBarWidth,
-            rAvailableSpace.GetHeight());
-        rVerticalScrollBar.Show();
+        const sal_Int32 nScrollBarWidth(rVerticalScrollBar.get_scroll_thickness());
+        rVerticalScrollBar.set_vpolicy(VclPolicyType::ALWAYS);
         return tools::Rectangle(
             rAvailableSpace.Left(),
             rAvailableSpace.Top(),
@@ -597,44 +529,20 @@ tools::Rectangle PlaceVerticalScrollBar (
     }
     else
     {
-        rVerticalScrollBar.Hide();
+        rVerticalScrollBar.set_vpolicy(VclPolicyType::NEVER);
         return rAvailableSpace;
     }
 }
 
 void SetupVerticalScrollBar(
-    ScrollBar& rVerticalScrollBar,
+    weld::ScrolledWindow& rVerticalScrollBar,
     const sal_Int32 nContentHeight,
     const sal_Int32 nVisibleHeight)
 {
     OSL_ASSERT(nContentHeight > nVisibleHeight);
 
-    rVerticalScrollBar.SetRangeMin(0);
-    rVerticalScrollBar.SetRangeMax(nContentHeight-1);
-    rVerticalScrollBar.SetVisibleSize(nVisibleHeight);
-}
-
-void UpdateFiller (
-    vcl::Window& rFiller,
-    const tools::Rectangle& rBox)
-{
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        // Not shown on LOK, and causes invalidation thrash
-        rFiller.Hide();
-    }
-    else if (rBox.GetHeight() > 0)
-    {
-        // Show the filler.
-        rFiller.SetBackground(Theme::GetColor(Theme::Color_PanelBackground));
-        rFiller.SetPosSizePixel(rBox.TopLeft(), rBox.GetSize());
-        rFiller.Show();
-    }
-    else
-    {
-        // Hide the filler.
-        rFiller.Hide();
-    }
+    rVerticalScrollBar.vadjustment_set_upper(nContentHeight-1);
+    rVerticalScrollBar.vadjustment_set_page_size(nVisibleHeight);
 }
 
 }
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index c797fc274f78..0124a651ab70 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -58,46 +58,30 @@ public:
 };
 
 DeckTitleBar::DeckTitleBar (const OUString& rsTitle,
-                            vcl::Window* pParentWindow,
+                            weld::Builder& rBuilder,
                             const std::function<void()>& rCloserAction)
-    : TitleBar(pParentWindow, "sfx/ui/decktitlebar.ui", "DeckTitleBar",
-               Theme::Color_DeckTitleBarBackground)
+    : TitleBar(rBuilder, Theme::Color_DeckTitleBarBackground)
     , mxGripWidget(new GripWidget)
-    , mxGripWeld(new weld::CustomWeld(*m_xBuilder, "grip", *mxGripWidget))
-    , mxLabel(m_xBuilder->weld_label("label"))
+    , mxGripWeld(new weld::CustomWeld(rBuilder, "grip", *mxGripWidget))
+    , mxLabel(rBuilder.weld_label("label"))
     , maCloserAction(rCloserAction)
     , mbIsCloserVisible(false)
 {
     mxLabel->set_label(rsTitle);
     mxGripWidget->SetPointer(PointerStyle::Move);
 
-    OSL_ASSERT(pParentWindow != nullptr);
-
     if (maCloserAction)
         SetCloserVisible(true);
-
-#ifdef DEBUG
-    SetText(OUString("DeckTitleBar"));
-#endif
 }
 
 DeckTitleBar::~DeckTitleBar()
 {
-    disposeOnce();
-}
-
-void DeckTitleBar::dispose()
-{
-    mxLabel.reset();
-    mxGripWeld.reset();
-    mxGripWidget.reset();
-    TitleBar::dispose();
 }
 
 tools::Rectangle DeckTitleBar::GetDragArea()
 {
     int x, y, width, height;
-    if (mxGripWidget->GetDrawingArea()->get_extents_relative_to(*m_xContainer, x, y, width, height))
+    if (mxGripWidget->GetDrawingArea()->get_extents_relative_to(*mxTitlebar, x, y, width, height))
         return tools::Rectangle(Point(x, y), Size(width, height));
     return tools::Rectangle();
 }
@@ -138,10 +122,10 @@ void DeckTitleBar::HandleToolBoxItemClick()
         maCloserAction();
 }
 
-void DeckTitleBar::DataChanged (const DataChangedEvent& rEvent)
+void DeckTitleBar::DataChanged()
 {
     mxToolBox->set_item_icon_name("button", "sfx2/res/closedoc.png");
-    TitleBar::DataChanged(rEvent);
+    TitleBar::DataChanged();
 }
 
 } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index 2f05308e5ce5..ebdc03939d66 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -18,13 +18,13 @@
  */
 
 #include <sfx2/sidebar/FocusManager.hxx>
+#include <sfx2/sidebar/Deck.hxx>
 #include <sfx2/sidebar/Panel.hxx>
 #include <sidebar/DeckTitleBar.hxx>
 #include <sidebar/PanelTitleBar.hxx>
 #include <sidebar/TitleBar.hxx>
 #include <vcl/event.hxx>
-#include <vcl/svapp.hxx>
-#include <toolkit/helper/vclunohelper.hxx>
+#include <vcl/weld.hxx>
 
 namespace sfx2::sidebar {
 
@@ -35,7 +35,7 @@ FocusManager::FocusLocation::FocusLocation (const PanelComponent eComponent, con
 }
 
 FocusManager::FocusManager(const std::function<void(const Panel&)>& rShowPanelFunctor)
-    : mpDeckTitleBar(),
+    : mpDeckTitleBar(nullptr),
       maPanels(),
       maButtons(),
       maShowPanelFunctor(rShowPanelFunctor)
@@ -59,14 +59,14 @@ void FocusManager::GrabFocusPanel()
 
 void FocusManager::Clear()
 {
-    SetDeckTitle(nullptr);
+    SetDeck(nullptr);
     ClearPanels();
     ClearButtons();
 }
 
 void FocusManager::ClearPanels()
 {
-    std::vector<VclPtr<Panel> > aPanels;
+    SharedPanelContainer aPanels;
     aPanels.swap(maPanels);
     for (auto const& panel : aPanels)
     {
@@ -76,7 +76,8 @@ void FocusManager::ClearPanels()
             UnregisterWindow(panel->GetTitleBar()->GetExpander());
         }
 
-        panel->RemoveChildEventListener(LINK(this, FocusManager, ChildEventListener));
+        weld::Container* pContents = panel->GetContents();
+        UnregisterWindow(*pContents);
     }
 }
 
@@ -90,12 +91,13 @@ void FocusManager::ClearButtons()
     }
 }
 
-void FocusManager::SetDeckTitle (DeckTitleBar* pDeckTitleBar)
+void FocusManager::SetDeck(Deck* pDeck)
 {
+    DeckTitleBar* pDeckTitleBar = pDeck ? pDeck->GetTitleBar() : nullptr;
     if (mpDeckTitleBar != nullptr)
         UnregisterWindow(mpDeckTitleBar->GetToolBox());
+    mxDeck = pDeck;
     mpDeckTitleBar = pDeckTitleBar;
-
     if (mpDeckTitleBar != nullptr)
         RegisterWindow(mpDeckTitleBar->GetToolBox());
 }
@@ -111,10 +113,11 @@ void FocusManager::SetPanels (const SharedPanelContainer& rPanels)
             RegisterWindow(panel->GetTitleBar()->GetExpander());
         }
 
-        // Register also as child event listener at the panel.
-        panel->AddChildEventListener(LINK(this, FocusManager, ChildEventListener));
+        // Register also as key event listener at the panel.
+        weld::Container* pContents = panel->GetContents();
+        RegisterWindow(*pContents);
 
-        maPanels.emplace_back(panel.get());
+        maPanels.emplace_back(panel);
     }
 }
 
@@ -139,18 +142,6 @@ void FocusManager::UnregisterWindow(weld::Widget& rWidget)
     rWidget.connect_key_press(Link<const KeyEvent&, bool>());
 }
 
-FocusManager::FocusLocation FocusManager::GetFocusLocation (const vcl::Window& rWindow) const
-{
-    // Search the panels.
-    for (size_t nIndex = 0; nIndex < maPanels.size(); ++nIndex)
-    {
-        if (maPanels[nIndex] == &rWindow)
-            return FocusLocation(PC_PanelContent, nIndex);
-    }
-
-    return FocusLocation(PC_None, -1);
-}
-
 FocusManager::FocusLocation FocusManager::GetFocusLocation() const
 {
     // Check the deck title.
@@ -167,6 +158,9 @@ FocusManager::FocusLocation FocusManager::GetFocusLocation() const
             return FocusLocation(PC_PanelTitle, nIndex);
         if (pTitleBar->GetToolBox().has_focus())
             return FocusLocation(PC_PanelToolBox, nIndex);
+        weld::Container* pContents = maPanels[nIndex]->GetContents();
+        if (pContents->has_child_focus())
+            return FocusLocation(PC_PanelContent, nIndex);
     }
 
     // Search the buttons.
@@ -204,7 +198,7 @@ bool FocusManager::IsPanelTitleVisible (const sal_Int32 nPanelIndex) const
     if (nPanelIndex<0 || nPanelIndex>=static_cast<sal_Int32>(maPanels.size()))
         return false;
 
-    TitleBarBase* pTitleBar = maPanels[nPanelIndex]->GetTitleBar();
+    TitleBar* pTitleBar = maPanels[nPanelIndex]->GetTitleBar();
     if (!pTitleBar)
         return false;
     return pTitleBar->GetVisible();
@@ -247,14 +241,13 @@ void FocusManager::FocusPanel (
         maShowPanelFunctor(rPanel);
 }
 
-void FocusManager::FocusPanelContent (const sal_Int32 nPanelIndex)
+void FocusManager::FocusPanelContent(const sal_Int32 nPanelIndex)
 {
     if (!maPanels[nPanelIndex]->IsExpanded())
         maPanels[nPanelIndex]->SetExpanded(true);
 
-    VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(maPanels[nPanelIndex]->GetElementWindow());
-    if (pWindow)
-        pWindow->GrabFocus();
+    weld::Container* pContents = maPanels[nPanelIndex]->GetContents();
+    pContents->child_grab_focus();
 }
 
 void FocusManager::FocusButton (const sal_Int32 nButtonIndex)
@@ -262,21 +255,6 @@ void FocusManager::FocusButton (const sal_Int32 nButtonIndex)
     maButtons[nButtonIndex]->grab_focus();
 }
 
-void FocusManager::RemoveWindow (vcl::Window& rWindow)
-{
-    auto iPanel (::std::find(maPanels.begin(), maPanels.end(), &rWindow));
-    if (iPanel != maPanels.end())
-    {
-        if ((*iPanel)->GetTitleBar() != nullptr)
-        {
-            UnregisterWindow((*iPanel)->GetTitleBar()->GetToolBox());
-            UnregisterWindow((*iPanel)->GetTitleBar()->GetExpander());
-        }
-        maPanels.erase(iPanel);
-        return;
-    }
-}
-
 void FocusManager::MoveFocusInsidePanel (
     const FocusLocation& rFocusLocation,
     const sal_Int32 nDirection)
@@ -303,10 +281,11 @@ void FocusManager::MoveFocusInsidePanel (
     }
 }
 
-void FocusManager::MoveFocusInsideDeckTitle (
+bool FocusManager::MoveFocusInsideDeckTitle (
     const FocusLocation& rFocusLocation,
     const sal_Int32 nDirection)
 {
+    bool bConsumed = false;
     // Note that when the title bar of the first (and only) panel is
     // not visible then the deck title takes its place and the focus
     // is moved between a) deck closer and b) content of panel 0.
@@ -314,11 +293,15 @@ void FocusManager::MoveFocusInsideDeckTitle (
     {
         case PC_DeckToolBox:
             if (nDirection>0 && ! IsPanelTitleVisible(0))
+            {
                 FocusPanelContent(0);
+                bConsumed = true;
+            }
             break;
 
         default: break;
     }
+    return bConsumed;
 }
 
 bool FocusManager::HandleKeyEvent(
@@ -337,15 +320,21 @@ bool FocusManager::HandleKeyEvent(
                 case PC_PanelTitle:
                 case PC_PanelToolBox:
                 {
-                    vcl::Window* pFocusWin = Application::GetFocusWindow();
-                    if (pFocusWin)
+                    if (mxDeck)
                     {
-                        pFocusWin->GrabFocusToDocument();
+                        mxDeck->GrabFocusToDocument();
                         bConsumed = true;
                     }
                     break;
                 }
-
+                case PC_PanelContent:
+                    // Return focus to tab bar sidebar settings button or panel title.
+                    if (!IsDeckTitleVisible() && maPanels.size() == 1)
+                        FocusButton(0);
+                    else
+                        FocusPanel(aLocation.mnIndex, true);
+                    bConsumed = true;
+                    break;
                 default:
                     break;
             }
@@ -380,19 +369,31 @@ bool FocusManager::HandleKeyEvent(
             {
                 case PC_PanelTitle:
                 case PC_PanelToolBox:
-                case PC_PanelContent:
                     MoveFocusInsidePanel(aLocation, nDirection);
                     bConsumed = true;
                     break;
 
                 case PC_DeckToolBox:
-                    MoveFocusInsideDeckTitle(aLocation, nDirection);
+                    bConsumed = MoveFocusInsideDeckTitle(aLocation, nDirection);
+                    break;
+
+                case PC_TabBar:
+                    if (rKeyCode.IsShift())
+                        FocusPanel(maPanels.size()-1, true);
+                    else
+                    {
+                        if (IsDeckTitleVisible())
+                            FocusDeckTitle();
+                        else
+                            FocusPanel(0, true);
+                    }
                     bConsumed = true;
                     break;
 
                 default:
                     break;
             }
+            fprintf(stderr, "seen here, consumed %d\n", bConsumed);
             break;
         }
 
@@ -402,7 +403,6 @@ bool FocusManager::HandleKeyEvent(
             {
                 case PC_PanelTitle:
                 case PC_PanelToolBox:
-                case PC_PanelContent:
                     // Go to previous panel or the deck title.
                     if (aLocation.mnIndex > 0)
                         FocusPanel(aLocation.mnIndex-1, true);
@@ -452,7 +452,6 @@ bool FocusManager::HandleKeyEvent(
             {
                 case PC_PanelTitle:
                 case PC_PanelToolBox:
-                case PC_PanelContent:
                     // Go to next panel.
                     if (aLocation.mnIndex < static_cast<sal_Int32>(maPanels.size())-1)
                         FocusPanel(aLocation.mnIndex+1, false);
@@ -503,56 +502,6 @@ IMPL_LINK(FocusManager, KeyInputHdl, const KeyEvent&, rKeyEvent, bool)
     return HandleKeyEvent(rKeyEvent.GetKeyCode(), GetFocusLocation());
 }
 
-IMPL_LINK(FocusManager, ChildEventListener, VclWindowEvent&, rEvent, void)
-{
-    vcl::Window* pSource = rEvent.GetWindow();
-    if (pSource == nullptr)
-        return;
-
-    switch (rEvent.GetId())
-    {
-        case VclEventId::WindowKeyInput:
-        {
-            KeyEvent* pKeyEvent = static_cast<KeyEvent*>(rEvent.GetData());
-
-            // Go up the window hierarchy to find out whether the
-            // parent of the event source is known to us.
-            vcl::Window* pWindow = pSource;
-            FocusLocation aLocation (PC_None, -1);
-            while (true)
-            {
-                if (pWindow == nullptr)
-                    break;
-                aLocation = GetFocusLocation(*pWindow);
-                if (aLocation.meComponent != PC_None)
-                    break;
-                pWindow = pWindow->GetParent();
-            }
-
-            if (aLocation.meComponent != PC_None)
-            {
-                switch (pKeyEvent->GetKeyCode().GetCode())
-                {
-                    case KEY_ESCAPE:
-                        // Return focus to tab bar sidebar settings button or panel title.
-                        if (!IsDeckTitleVisible() && maPanels.size() == 1)
-                            FocusButton(0);
-                        else
-                            FocusPanel(aLocation.mnIndex, true);
-                        break;
-
-                    default:
-                        break;
-                }
-            }
-            return;
-        }
-
-        default:
-            break;
-    }
-}
-
 } // end of namespace sfx2::sidebar
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx
index 3d03beb2e9a0..471a5f2b9507 100644
--- a/sfx2/source/sidebar/Panel.cxx
+++ b/sfx2/source/sidebar/Panel.cxx
@@ -45,56 +45,77 @@ using namespace css::uno;
 namespace sfx2::sidebar {
 
 Panel::Panel(const PanelDescriptor& rPanelDescriptor,
-             vcl::Window* pParentWindow,
+             weld::Widget* pParentWindow,
              const bool bIsInitiallyExpanded,
-             const std::function<void()>& rDeckLayoutTrigger,
+             Deck* pDeck,
              const std::function<Context()>& rContextAccess,
              const css::uno::Reference<css::frame::XFrame>& rxFrame)
-    : InterimItemWindow(pParentWindow, "sfx/ui/panel.ui", "Panel")
+    : mxBuilder(Application::CreateBuilder(pParentWindow, "sfx/ui/panel.ui"))
     , msPanelId(rPanelDescriptor.msId)
+    , msTitle(rPanelDescriptor.msTitle)
     , mbIsTitleBarOptional(rPanelDescriptor.mbIsTitleBarOptional)
     , mbWantsAWT(rPanelDescriptor.mbWantsAWT)
     , mxElement()
     , mxPanelComponent()
     , mbIsExpanded(bIsInitiallyExpanded)
     , mbLurking(false)
-    , maDeckLayoutTrigger(rDeckLayoutTrigger)
     , maContextAccess(rContextAccess)
     , mxFrame(rxFrame)
-    , mxTitleBar(new PanelTitleBar(rPanelDescriptor.msTitle, *m_xBuilder, this))
-    , mxContents(m_xBuilder->weld_container("contents"))
+    , mpParentWindow(pParentWindow)
+    , mxDeck(pDeck)
+    , mxContainer(mxBuilder->weld_container("Panel"))
+    , mxTitleBar(new PanelTitleBar(rPanelDescriptor.msTitle, *mxBuilder, this))
+    , mxContents(mxBuilder->weld_container("contents"))
 {
-    SetText(rPanelDescriptor.msTitle);
     mxContents->set_visible(mbIsExpanded);
+    mxContainer->connect_get_property_tree(LINK(this, Panel, DumpAsPropertyTreeHdl));
 }
 
-Panel::~Panel()
+bool Panel::get_extents(tools::Rectangle &rExtents) const
 {
-    disposeOnce();
-    assert(!mxTitleBar);
+    // Get vertical extent of the panel.
+    int x, y, width, height;
+    if (mxContainer->get_extents_relative_to(*mpParentWindow, x, y, width, height))
+    {
+        rExtents = tools::Rectangle(Point(x, y), Size(width, height));
+        return true;
+    }
+    return false;
 }
 
-void Panel::SetLurkMode(bool bLurk)
+void Panel::SetHeightPixel(int nHeight)
 {
-    // cf. DeckLayouter
-    mbLurking = bLurk;
+    mxContainer->set_size_request(-1, nHeight);
+}
+
+void Panel::set_margin_top(int nMargin)
+{
+    mxContainer->set_margin_top(nMargin);
+}
+
+void Panel::set_margin_bottom(int nMargin)
+{
+    mxContainer->set_margin_bottom(nMargin);
+}
+
+void Panel::set_vexpand(bool bExpand)
+{
+    mxContainer->set_vexpand(bExpand);
 }
 
-void Panel::ApplySettings(vcl::RenderContext& rRenderContext)
+void Panel::SetLurkMode(bool bLurk)
 {
-    rRenderContext.SetBackground(Theme::GetColor(Theme::Color_PanelBackground));
+    // cf. DeckLayouter
+    mbLurking = bLurk;
 }
 
-void Panel::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
+IMPL_LINK(Panel, DumpAsPropertyTreeHdl, tools::JsonWriter&, rJsonWriter, void)
 {
     if (!IsLurking())
-    {
-        InterimItemWindow::DumpAsPropertyTree(rJsonWriter);
         rJsonWriter.put("type", "panel");
-    }
 }
 
-void Panel::dispose()
+Panel::~Panel()
 {
     mxPanelComponent = nullptr;
 
@@ -120,7 +141,7 @@ void Panel::dispose()
     }
     mxContents.reset();
 
-    InterimItemWindow::dispose();
+    assert(!mxTitleBar);
 }
 
 PanelTitleBar* Panel::GetTitleBar() const
@@ -128,9 +149,14 @@ PanelTitleBar* Panel::GetTitleBar() const
     return mxTitleBar.get();
 }
 
-void Panel::ShowTitlebar(bool bShowTitlebar)
+weld::Container* Panel::GetContents() const
+{
+    return mxContents.get();
+}
+
+void Panel::Show(bool bShow)
 {
-    mxTitleBar->Show(bShowTitlebar);
+    mxContainer->set_visible(bShow);
 }
 
 void Panel::SetUIElement (const Reference<ui::XUIElement>& rxElement)
@@ -146,6 +172,16 @@ void Panel::SetUIElement (const Reference<ui::XUIElement>& rxElement)
     pPanelBase->SetParentPanel(this);
 }
 
+void Panel::TriggerDeckLayouting()
+{
+    mxDeck->RequestLayout();
+}
+
+weld::Window* Panel::GetFrameWeld()
+{
+    return mxDeck->GetFrameWeld();
+}
+
 void Panel::SetExpanded (const bool bIsExpanded)
 {
     SidebarController* pSidebarController = SidebarController::GetSidebarControllerForFrame(mxFrame);
@@ -155,7 +191,7 @@ void Panel::SetExpanded (const bool bIsExpanded)
 
     mbIsExpanded = bIsExpanded;
     mxTitleBar->UpdateExpandedState();
-    maDeckLayoutTrigger();
+    TriggerDeckLayouting();
 
     if (maContextAccess && pSidebarController)
     {
@@ -173,9 +209,9 @@ bool Panel::HasIdPredicate (const OUString& rsId) const
     return msPanelId == rsId;
 }
 
-void Panel::DataChanged (const DataChangedEvent&)
+void Panel::DataChanged()
 {
-    Invalidate();
+    mxTitleBar->DataChanged();
 }
 
 Reference<awt::XWindow> Panel::GetElementWindow()
diff --git a/sfx2/source/sidebar/PanelLayout.cxx b/sfx2/source/sidebar/PanelLayout.cxx
index 3a47773175ce..271f4d8a6c36 100644
--- a/sfx2/source/sidebar/PanelLayout.cxx
+++ b/sfx2/source/sidebar/PanelLayout.cxx
@@ -19,6 +19,7 @@ using namespace sfx2::sidebar;
 PanelLayout::PanelLayout(weld::Widget* pParent, const OString& rID, const OUString& rUIXMLDescription)
     : m_xBuilder(Application::CreateBuilder(pParent, rUIXMLDescription))
     , m_xContainer(m_xBuilder->weld_container(rID))
+    , m_pPanel(nullptr)
 {
     m_xContainer->set_background(Theme::GetColor(Theme::Color_PanelBackground));
     m_xContainer->connect_get_property_tree(LINK(this, PanelLayout, DumpAsPropertyTreeHdl));
@@ -53,17 +54,17 @@ void PanelLayout::DataChanged(const DataChangedEvent& rEvent)
 
 void PanelLayout::SetPanel(sfx2::sidebar::Panel* pPanel)
 {
-    m_xPanel = pPanel;
+    m_pPanel = pPanel;
 }
 
 weld::Window* PanelLayout::GetFrameWeld() const
 {
-    if (!m_xPanel)
+    if (!m_pPanel)
     {
         SAL_WARN("sfx.sidebar", "Expected a toplevel Panel to exist");
         return nullptr;
     }
-    return m_xPanel->GetFrameWeld();
+    return m_pPanel->GetFrameWeld();
 }
 
 PanelLayout::~PanelLayout()
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx
index 54adda78aa29..112602cfef4b 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -39,16 +39,12 @@ namespace sfx2::sidebar {
 PanelTitleBar::PanelTitleBar(const OUString& rsTitle,
                              weld::Builder& rBuilder,
                              Panel* pPanel)
-    : TitleBarBase(rBuilder, Theme::Color_PanelTitleBarBackground),
-      mxTitlebar(rBuilder.weld_container("titlebar")),
+    : TitleBar(rBuilder, Theme::Color_PanelTitleBarBackground),
       mxExpander(rBuilder.weld_expander("expander")),
       mpPanel(pPanel),
-      mxFrame(),
       msIdent("button"),
       msMoreOptionsCommand()
 {
-    mxTitlebar->set_background(Theme::GetColor(meThemeItem));
-
     mxExpander->set_label(rsTitle);
     mxExpander->connect_expanded(LINK(this, PanelTitleBar, ExpandHdl));
 
@@ -61,11 +57,6 @@ PanelTitleBar::PanelTitleBar(const OUString& rsTitle,
 #endif
 }
 
-bool PanelTitleBar::GetVisible() const
-{
-    return mxTitlebar->get_visible();
-}
-
 void PanelTitleBar::SetTitle(const OUString& rsTitle)
 {
     mxExpander->set_label(rsTitle);
@@ -87,10 +78,8 @@ PanelTitleBar::~PanelTitleBar()
     if (xComponent.is())
         xComponent->dispose();
     mxController.clear();
-    mpPanel.clear();
+    mpPanel = nullptr;
     mxExpander.reset();
-    mxTitlebar.reset();
-    reset();
 }
 
 void PanelTitleBar::SetMoreOptionsCommand(const OUString& rsCommandName,
@@ -104,7 +93,6 @@ void PanelTitleBar::SetMoreOptionsCommand(const OUString& rsCommandName,
         mxToolBox->hide();
 
     msMoreOptionsCommand = rsCommandName;
-    mxFrame = rxFrame;
 
     if (msMoreOptionsCommand.isEmpty())
         return;
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 5294525f1d4b..51304f07bc9d 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -471,8 +471,8 @@ void SidebarController::NotifyResize()
     sal_Int32 nMinimalWidth = 0;
     if (mpCurrentDeck && !mpCurrentDeck->isDisposed())
     {
-        VclPtr<DeckTitleBar> pTitleBar = mpCurrentDeck->GetTitleBar();
-        if (pTitleBar && pTitleBar->IsVisible())
+        DeckTitleBar* pTitleBar = mpCurrentDeck->GetTitleBar();
+        if (pTitleBar && pTitleBar->GetVisible())
             pTitleBar->SetCloserVisible(CanModifyChildWindowWidth());
         nMinimalWidth = mpCurrentDeck->GetMinimalWidth();
     }
@@ -732,37 +732,36 @@ void SidebarController::CreatePanels(const OUString& rDeckId, const Context& rCo
         if ( ! bIsPanelVisible)
             continue;
 
-        Panel *const pPanel(pDeck->GetPanel(rPanelContexDescriptor.msId));
-        if (pPanel != nullptr)
+        auto xOldPanel(pDeck->GetPanel(rPanelContexDescriptor.msId));
+        if (xOldPanel)
         {
-            pPanel->SetLurkMode(false);
-            aNewPanels[nWriteIndex] = pPanel;
-            pPanel->SetExpanded( rPanelContexDescriptor.mbIsInitiallyVisible );
+            xOldPanel->SetLurkMode(false);
+            aNewPanels[nWriteIndex] = xOldPanel;
+            xOldPanel->SetExpanded(rPanelContexDescriptor.mbIsInitiallyVisible);
             ++nWriteIndex;
         }
         else
         {
-                VclPtr<Panel>  aPanel = CreatePanel(
-                                            rPanelContexDescriptor.msId,
-                                            pDeck->GetPanelParentWindow(),
-                                            rPanelContexDescriptor.mbIsInitiallyVisible,
-                                            rContext,
-                                            pDeck);
-                if (aPanel )
+            auto aPanel = CreatePanel(rPanelContexDescriptor.msId,
+                                      pDeck->GetPanelParentWindow(),
+                                      rPanelContexDescriptor.mbIsInitiallyVisible,
+                                      rContext,
+                                      pDeck);
+            if (aPanel)
+            {
+                aNewPanels[nWriteIndex] = std::move(aPanel);
+
+                // Depending on the context we have to change the command
+                // for the "more options" dialog.
+                PanelTitleBar* pTitleBar = aNewPanels[nWriteIndex]->GetTitleBar();
+                if (pTitleBar)
                 {
-                    aNewPanels[nWriteIndex] = aPanel;
-
-                    // Depending on the context we have to change the command
-                    // for the "more options" dialog.
-                    PanelTitleBar* pTitleBar = aNewPanels[nWriteIndex]->GetTitleBar();
-                    if (pTitleBar)
-                    {
-                        pTitleBar->SetMoreOptionsCommand(
-                            rPanelContexDescriptor.msMenuCommand,
-                            mxFrame, xController);
-                    }
-                    ++nWriteIndex;
+                    pTitleBar->SetMoreOptionsCommand(
+                        rPanelContexDescriptor.msMenuCommand,
+                        mxFrame, xController);
                 }
+                ++nWriteIndex;
+            }
         }
     }
 
@@ -895,7 +894,7 @@ void SidebarController::SwitchToDeck (
 
     // Tell the focus manager about the new panels and tab bar
     // buttons.
-    maFocusManager.SetDeckTitle(mpCurrentDeck->GetTitleBar());
+    maFocusManager.SetDeck(mpCurrentDeck);
     maFocusManager.SetPanels(mpCurrentDeck->GetPanels());
 
     mpTabBar->UpdateFocusManager(maFocusManager);
@@ -906,15 +905,15 @@ void SidebarController::notifyDeckTitle(const OUString& targetDeckId)
 {
     if (msCurrentDeckId == targetDeckId)
     {
-        maFocusManager.SetDeckTitle(mpCurrentDeck->GetTitleBar());
+        maFocusManager.SetDeck(mpCurrentDeck);
         mpTabBar->UpdateFocusManager(maFocusManager);
         UpdateTitleBarIcons();
     }
 }
 
-VclPtr<Panel> SidebarController::CreatePanel (
-    const OUString& rsPanelId,
-    vcl::Window* pParentWindow,
+std::shared_ptr<Panel> SidebarController::CreatePanel (
+    std::u16string_view rsPanelId,
+    weld::Widget* pParentWindow,
     const bool bIsInitiallyExpanded,
     const Context& rContext,
     const VclPtr<Deck>& pDeck)
@@ -925,31 +924,31 @@ VclPtr<Panel> SidebarController::CreatePanel (
         return nullptr;
 
     // Create the panel which is the parent window of the UIElement.
-    VclPtr<Panel> pPanel = VclPtr<Panel>::Create(
+    auto xPanel = std::make_shared<Panel>(
         *xPanelDescriptor,
         pParentWindow,
         bIsInitiallyExpanded,
-        [pDeck]() { return pDeck->RequestLayout(); },
+        pDeck,
         [this]() { return this->GetCurrentContext(); },
         mxFrame);
 
     // Create the XUIElement.
     Reference<ui::XUIElement> xUIElement (CreateUIElement(
-            pPanel->GetElementParentWindow(),
+            xPanel->GetElementParentWindow(),
             xPanelDescriptor->msImplementationURL,
             xPanelDescriptor->mbWantsCanvas,
             rContext));
     if (xUIElement.is())
     {
         // Initialize the panel and add it to the active deck.
-        pPanel->SetUIElement(xUIElement);
+        xPanel->SetUIElement(xUIElement);
     }
     else
     {
-        pPanel.disposeAndClear();
+        xPanel.reset();
     }
 
-    return pPanel;
+    return xPanel;
 }
 
 Reference<ui::XUIElement> SidebarController::CreateUIElement (
@@ -1570,9 +1569,7 @@ tools::Rectangle SidebarController::GetDeckDragArea() const
     tools::Rectangle aRect;
     if (mpCurrentDeck)
     {
-        VclPtr<DeckTitleBar> pTitleBar(mpCurrentDeck->GetTitleBar());
-
-        if (pTitleBar)
+        if (DeckTitleBar* pTitleBar = mpCurrentDeck->GetTitleBar())
         {
             aRect = pTitleBar->GetDragArea();
         }
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index d7f52741fd6e..48698bb00937 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -63,6 +63,8 @@ TabBar::TabBar(vcl::Window* pParentWindow,
     , maPopupMenuProvider(rPopupMenuProvider)
     , pParentSidebarController(rParentSidebarController)
 {
+    InitControlBase(mxMenuButton.get());
+
     mxTempToplevel->move(mxContents.get(), m_xContainer.get());
 
     gDefaultWidth = m_xContainer->get_preferred_size().Width();
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index bd64a87b7907..dbbcabeadd55 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -130,14 +130,10 @@ void Theme::UpdateTheme()
     try
     {
         const StyleSettings& rStyle (Application::GetSettings().GetStyleSettings());
-        const bool bUseSystemColors (GetBoolean(Bool_UseSystemColors));
-
-#define Alternatives(n,hc,sys) (mbIsHighContrastMode ? hc : (bUseSystemColors ? sys : n))
 
         Color aBaseBackgroundColor (rStyle.GetDialogColor());
         // UX says this should be a little brighter, but that looks off when compared to the other windows.
         //aBaseBackgroundColor.IncreaseLuminance(7);
-        Color aBorderColor (aBaseBackgroundColor);
         Color aSecondColor (aBaseBackgroundColor);
         aSecondColor.DecreaseLuminance(15);
 
@@ -151,15 +147,6 @@ void Theme::UpdateTheme()
         setPropertyValue(
             maPropertyIdToNameMap[Int_DeckSeparatorHeight],
             Any(sal_Int32(1)));
-        setPropertyValue(
-            maPropertyIdToNameMap[Color_DeckTitleFont],
-            Any(sal_Int32(rStyle.GetFontColor().GetRGBColor())));
-        setPropertyValue(
-            maPropertyIdToNameMap[Int_DeckTitleBarHeight],
-            Any(sal_Int32(Alternatives(
-                        26,
-                        26,
-                        rStyle.GetFloatTitleHeight()))));
         setPropertyValue(
             maPropertyIdToNameMap[Color_PanelBackground],
             Any(sal_Int32(aBaseBackgroundColor.GetRGBColor())));
@@ -167,40 +154,16 @@ void Theme::UpdateTheme()
         setPropertyValue(
             maPropertyIdToNameMap[Color_PanelTitleBarBackground],
             Any(sal_Int32(aSecondColor.GetRGBColor())));
-        setPropertyValue(
-            maPropertyIdToNameMap[Color_PanelTitleFont],
-            Any(sal_Int32(mbIsHighContrastMode ? 0x00ff00 : 0x262626)));
-        setPropertyValue(
-            maPropertyIdToNameMap[Int_PanelTitleBarHeight],
-            Any(sal_Int32(Alternatives(
-                        26,
-                        26,
-                        rStyle.GetTitleHeight()))));
         setPropertyValue(
             maPropertyIdToNameMap[Color_TabBarBackground],
             Any(sal_Int32(aBaseBackgroundColor.GetRGBColor())));
 
-        setPropertyValue(
-            maPropertyIdToNameMap[Color_DropDownBackground],
-            Any(sal_Int32(aBaseBackgroundColor.GetRGBColor())));
-
         setPropertyValue(
             maPropertyIdToNameMap[Color_Highlight],
             Any(sal_Int32(rStyle.GetHighlightColor().GetRGBColor())));
         setPropertyValue(
             maPropertyIdToNameMap[Color_HighlightText],
             Any(sal_Int32(rStyle.GetHighlightTextColor().GetRGBColor())));
-
-        setPropertyValue(
-            maPropertyIdToNameMap[Color_HorizontalBorder],
-            Any(sal_Int32(aBorderColor.GetRGBColor())));
-
-        setPropertyValue(
-            maPropertyIdToNameMap[Color_VerticalBorder],
-            Any(sal_Int32(aBorderColor.GetRGBColor())));
-        setPropertyValue(
-            maPropertyIdToNameMap[Image_CloseIndicator],
-            Any(OUString("private:graphicrepository/cmd/lc_decrementlevel.png")));
     }
     catch(beans::UnknownPropertyException const &)
     {
@@ -492,16 +455,6 @@ void Theme::SetupPropertyMaps()
     maIntegers.resize(Int_Bool_ - Color_Int_ - 1);
     maBooleans.resize(Post_Bool_ - Int_Bool_ - 1);
 
-    maPropertyNameToIdMap["Image_CloseIndicator"]=Image_CloseIndicator;
-    maPropertyIdToNameMap[Image_CloseIndicator]="Image_CloseIndicator";
-
-
-    maPropertyNameToIdMap["Color_DeckTitleFont"]=Color_DeckTitleFont;
-    maPropertyIdToNameMap[Color_DeckTitleFont]="Color_DeckTitleFont";
-
-    maPropertyNameToIdMap["Color_PanelTitleFont"]=Color_PanelTitleFont;
-    maPropertyIdToNameMap[Color_PanelTitleFont]="Color_PanelTitleFont";
-
     maPropertyNameToIdMap["Color_Highlight"]=Color_Highlight;
     maPropertyIdToNameMap[Color_Highlight]="Color_Highlight";
 
@@ -524,18 +477,6 @@ void Theme::SetupPropertyMaps()
     maPropertyNameToIdMap["Color_TabBarBackground"]=Color_TabBarBackground;
     maPropertyIdToNameMap[Color_TabBarBackground]="Color_TabBarBackground";
 
-    maPropertyNameToIdMap["Color_HorizontalBorder"]=Color_HorizontalBorder;
-    maPropertyIdToNameMap[Color_HorizontalBorder]="Color_HorizontalBorder";
-
-    maPropertyNameToIdMap["Color_VerticalBorder"]=Color_VerticalBorder;
-    maPropertyIdToNameMap[Color_VerticalBorder]="Color_VerticalBorder";
-
-    maPropertyNameToIdMap["Color_DropDownBackground"]=Color_DropDownBackground;
-    maPropertyIdToNameMap[Color_DropDownBackground]="Color_DropDownBackground";
-
-
-    maPropertyNameToIdMap["Int_DeckTitleBarHeight"]=Int_DeckTitleBarHeight;
-    maPropertyIdToNameMap[Int_DeckTitleBarHeight]="Int_DeckTitleBarHeight";
 
     maPropertyNameToIdMap["Int_DeckBorderSize"]=Int_DeckBorderSize;
     maPropertyIdToNameMap[Int_DeckBorderSize]="Int_DeckBorderSize";
@@ -543,9 +484,6 @@ void Theme::SetupPropertyMaps()
     maPropertyNameToIdMap["Int_DeckSeparatorHeight"]=Int_DeckSeparatorHeight;
     maPropertyIdToNameMap[Int_DeckSeparatorHeight]="Int_DeckSeparatorHeight";
 
-    maPropertyNameToIdMap["Int_PanelTitleBarHeight"]=Int_PanelTitleBarHeight;
-    maPropertyIdToNameMap[Int_PanelTitleBarHeight]="Int_PanelTitleBarHeight";
-
     maPropertyNameToIdMap["Int_DeckLeftPadding"]=Int_DeckLeftPadding;
     maPropertyIdToNameMap[Int_DeckLeftPadding]="Int_DeckLeftPadding";
 
@@ -572,11 +510,6 @@ Theme::PropertyType Theme::GetPropertyType (const ThemeItem eItem)
 {
     switch(eItem)
     {
-        case Image_CloseIndicator:
-            return PT_Image;
-
-        case Color_DeckTitleFont:
-        case Color_PanelTitleFont:
         case Color_Highlight:
         case Color_HighlightText:
         case Color_DeckBackground:
@@ -584,15 +517,10 @@ Theme::PropertyType Theme::GetPropertyType (const ThemeItem eItem)
         case Color_PanelBackground:
         case Color_PanelTitleBarBackground:
         case Color_TabBarBackground:
-        case Color_HorizontalBorder:
-        case Color_VerticalBorder:
-        case Color_DropDownBackground:
             return PT_Color;
 
-        case Int_DeckTitleBarHeight:
         case Int_DeckBorderSize:
         case Int_DeckSeparatorHeight:
-        case Int_PanelTitleBarHeight:
         case Int_DeckLeftPadding:
         case Int_DeckTopPadding:
         case Int_DeckRightPadding:
diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx
index b88b4e92e1db..9dc13d3aa274 100644
--- a/sfx2/source/sidebar/TitleBar.cxx
+++ b/sfx2/source/sidebar/TitleBar.cxx
@@ -21,61 +21,58 @@
 
 namespace sfx2::sidebar {
 
-TitleBarBase::TitleBarBase(weld::Builder& rBuilder, Theme::ThemeItem eThemeItem)
+TitleBar::TitleBar(weld::Builder& rBuilder, Theme::ThemeItem eThemeItem)
     : mrBuilder(rBuilder)
+    , mxTitlebar(rBuilder.weld_container("titlebar"))
     , mxAddonImage(rBuilder.weld_image("addonimage"))
     , mxToolBox(rBuilder.weld_toolbar("toolbar"))
     , meThemeItem(eThemeItem)
 {
-    mxToolBox->set_background(Theme::GetColor(meThemeItem));
+    SetBackground();
 
-    mxToolBox->connect_clicked(LINK(this, TitleBarBase, SelectionHandler));
+    mxToolBox->connect_clicked(LINK(this, TitleBar, SelectionHandler));
 }
 
-TitleBarBase::~TitleBarBase()
+void TitleBar::SetBackground()
 {
+    Color aColor(Theme::GetColor(meThemeItem));
+    mxTitlebar->set_background(aColor);
+    mxToolBox->set_background(aColor);
 }
 
-void TitleBarBase::reset()
+void TitleBar::DataChanged()
 {
-    mxToolBox.reset();
-    mxAddonImage.reset();
+    SetBackground();
 }
 
-void TitleBarBase::SetIcon(const css::uno::Reference<css::graphic::XGraphic>& rIcon)
+TitleBar::~TitleBar()
 {
-    mxAddonImage->set_image(rIcon);
-    mxAddonImage->set_visible(rIcon.is());
 }
 
-IMPL_LINK_NOARG(TitleBarBase, SelectionHandler, const OString&, void)
+Size TitleBar::get_preferred_size() const
 {
-    HandleToolBoxItemClick();
+    return mxTitlebar->get_preferred_size();
 }
 
-TitleBar::TitleBar(vcl::Window* pParentWindow,
-                   const OUString& rUIXMLDescription, const OString& rID,
-                   Theme::ThemeItem eThemeItem)
-    : InterimItemWindow(pParentWindow, rUIXMLDescription, rID)
-    , TitleBarBase(*m_xBuilder, eThemeItem)
+void TitleBar::Show(bool bShow)
 {
-    m_xContainer->set_background(Theme::GetColor(meThemeItem));
+    mxTitlebar->set_visible(bShow);
 }
 
-TitleBar::~TitleBar()
+bool TitleBar::GetVisible() const
 {
-    disposeOnce();
+    return mxTitlebar->get_visible();
 }
 
-void TitleBar::dispose()
+void TitleBar::SetIcon(const css::uno::Reference<css::graphic::XGraphic>& rIcon)
 {
-    reset();
-    InterimItemWindow::dispose();
+    mxAddonImage->set_image(rIcon);
+    mxAddonImage->set_visible(rIcon.is());
 }
 
-void TitleBar::DataChanged (const DataChangedEvent& /*rEvent*/)
+IMPL_LINK_NOARG(TitleBar, SelectionHandler, const OString&, void)
 {
-    m_xContainer->set_background(Theme::GetColor(meThemeItem));
+    HandleToolBoxItemClick();
 }
 
 } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/UnoDeck.cxx b/sfx2/source/sidebar/UnoDeck.cxx
index 122afbe018a2..3af5c1c62b73 100644
--- a/sfx2/source/sidebar/UnoDeck.cxx
+++ b/sfx2/source/sidebar/UnoDeck.cxx
@@ -54,7 +54,7 @@ OUString SAL_CALL  SfxUnoDeck::getTitle()
         pDeck = pSidebarController->GetResourceManager()->GetDeckDescriptor(mDeckId)->mpDeck;
     }
 
-    VclPtr<DeckTitleBar> pTitleBar = pDeck->GetTitleBar();
+    DeckTitleBar* pTitleBar = pDeck->GetTitleBar();
     return pTitleBar->GetTitle();
 }
 
@@ -70,7 +70,7 @@ void SAL_CALL SfxUnoDeck::setTitle( const OUString& newTitle )
     if (xDeckDescriptor)
     {
         Deck* pDeck = xDeckDescriptor->mpDeck;
-        const VclPtr<DeckTitleBar>& pTitleBar = pDeck->GetTitleBar();
+        DeckTitleBar* pTitleBar = pDeck->GetTitleBar();
         pTitleBar->SetTitle(newTitle);
 
         xDeckDescriptor->msTitle = newTitle;
diff --git a/sfx2/source/sidebar/UnoPanel.cxx b/sfx2/source/sidebar/UnoPanel.cxx
index 1170cbce1674..802126873a7a 100644
--- a/sfx2/source/sidebar/UnoPanel.cxx
+++ b/sfx2/source/sidebar/UnoPanel.cxx
@@ -29,13 +29,13 @@ xFrame(rFrame),
 mPanelId(panelId),
 mDeckId(deckId),
 mpDeck(),
-mpPanel()
+mxPanel()
 {
     SidebarController* pSidebarController = getSidebarController();
 
     pSidebarController->CreateDeck(mDeckId); // creates deck object is not already
     mpDeck = pSidebarController->GetResourceManager()->GetDeckDescriptor(mDeckId)->mpDeck;
-    mpPanel = mpDeck->GetPanel(mPanelId);
+    mxPanel = mpDeck->GetPanel(mPanelId);
 }
 
 SidebarController* SfxUnoPanel::getSidebarController()
@@ -54,7 +54,8 @@ OUString SAL_CALL SfxUnoPanel::getTitle()
 {
     SolarMutexGuard aGuard;
 
-    PanelTitleBar* pTitleBar = mpPanel->GetTitleBar();
+    auto xPanel = mxPanel.lock();
+    PanelTitleBar* pTitleBar = xPanel ? xPanel->GetTitleBar() : nullptr;
     if (pTitleBar)
         return pTitleBar->GetTitle();
     else
@@ -71,7 +72,8 @@ void SAL_CALL SfxUnoPanel::setTitle( const OUString& newTitle )
     if (xPanelDescriptor)
     {
         xPanelDescriptor->msTitle = newTitle;
-        PanelTitleBar* pTitleBar = mpPanel->GetTitleBar();
+        auto xPanel = mxPanel.lock();
+        PanelTitleBar* pTitleBar = xPanel ? xPanel->GetTitleBar() : nullptr;
         if (pTitleBar)
             pTitleBar->SetTitle(newTitle);
     }
@@ -81,7 +83,8 @@ sal_Bool SAL_CALL SfxUnoPanel::isExpanded()
 {
     SolarMutexGuard aGuard;
 
-    return mpPanel->IsExpanded();
+    auto xPanel = mxPanel.lock();
+    return xPanel && xPanel->IsExpanded();
 }
 
 
@@ -90,7 +93,9 @@ void SAL_CALL SfxUnoPanel::expand( const sal_Bool bCollapseOther )
 
     SolarMutexGuard aGuard;
 
-    mpPanel->SetExpanded(true);
+    auto xPanel = mxPanel.lock();
+    if (xPanel)
+        xPanel->SetExpanded(true);
 
     if (bCollapseOther)
     {
@@ -111,7 +116,9 @@ void SAL_CALL SfxUnoPanel::collapse()
 {
     SolarMutexGuard aGuard;
 
-    mpPanel->SetExpanded(false);
+    auto xPanel = mxPanel.lock();
+    if (xPanel)
+        xPanel->SetExpanded(false);
     SidebarController* pSidebarController = getSidebarController();
     pSidebarController->NotifyResize();
 }
@@ -120,10 +127,10 @@ uno::Reference<awt::XWindow> SAL_CALL SfxUnoPanel::getDialog()
 {
     SolarMutexGuard aGuard;
 
-    return mpPanel->GetElementWindow();
+    auto xPanel = mxPanel.lock();
+    return xPanel ? xPanel->GetElementWindow() : nullptr;
 }
 
-
 sal_Int32 SAL_CALL SfxUnoPanel::getOrderIndex()
 {
     SolarMutexGuard aGuard;
diff --git a/sfx2/uiconfig/ui/deck.ui b/sfx2/uiconfig/ui/deck.ui
new file mode 100644
index 000000000000..61ad555c1cb3
--- /dev/null
+++ b/sfx2/uiconfig/ui/deck.ui
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface domain="sfx">
+  <requires lib="gtk+" version="3.20"/>
+  <!-- n-columns=1 n-rows=2 -->
+  <object class="GtkGrid" id="Deck">
+    <property name="visible">True</property>
+    <property name="can-focus">False</property>
+    <property name="vexpand">True</property>
+    <child>
+      <object class="GtkScrolledWindow" id="scrolledwindow">

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list