[Libreoffice-commits] core.git: chart2/source cui/source dbaccess/source desktop/source formula/source include/vcl sc/source sd/source sfx2/source starmath/source svtools/source svx/source sw/source vcl/inc vcl/source vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 6 14:47:49 UTC 2020


 chart2/source/controller/dialogs/tp_ChartType.cxx   |    2 +-
 chart2/source/controller/sidebar/ChartTypePanel.cxx |    2 +-
 cui/source/customize/cfg.cxx                        |    2 +-
 cui/source/dialogs/cuicharmap.cxx                   |    4 ++--
 cui/source/dialogs/hangulhanjadlg.cxx               |    6 ++----
 cui/source/options/optchart.cxx                     |    2 +-
 cui/source/tabpages/labdlg.cxx                      |    2 +-
 cui/source/tabpages/numpages.cxx                    |    2 +-
 cui/source/tabpages/tpbitmap.cxx                    |    2 +-
 cui/source/tabpages/tpcolor.cxx                     |    2 +-
 cui/source/tabpages/tpgradnt.cxx                    |    2 +-
 cui/source/tabpages/tphatch.cxx                     |    2 +-
 cui/source/tabpages/tppattern.cxx                   |    2 +-
 dbaccess/source/ui/app/AppSwapWindow.cxx            |    2 +-
 desktop/source/deployment/gui/dp_gui_dialog2.cxx    |    4 ++--
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx |    1 -
 formula/source/ui/dlg/parawin.cxx                   |    3 +--
 include/vcl/weld.hxx                                |    9 ++++++---
 sc/source/ui/dbgui/csvtablebox.cxx                  |    3 +--
 sc/source/ui/dbgui/filtdlg.cxx                      |    3 +--
 sc/source/ui/miscdlgs/datafdlg.cxx                  |    4 +---
 sc/source/ui/miscdlgs/optsolver.cxx                 |    3 +--
 sc/source/ui/miscdlgs/tabbgcolordlg.cxx             |    2 +-
 sd/source/filter/html/pubdlg.cxx                    |    2 +-
 sd/source/ui/animations/SlideTransitionPane.cxx     |    2 +-
 sd/source/ui/dlg/sdpreslt.cxx                       |    2 +-
 sd/source/ui/table/TableDesignPane.cxx              |    2 +-
 sfx2/source/control/emojicontrol.cxx                |    2 +-
 sfx2/source/control/thumbnailview.cxx               |    1 -
 sfx2/source/dialog/dinfdlg.cxx                      |    3 +--
 sfx2/source/doc/templatedlg.cxx                     |    4 ++--
 starmath/source/ElementsDockingWindow.cxx           |    3 +--
 starmath/source/dialog.cxx                          |    5 ++---
 svtools/source/control/valueset.cxx                 |    3 ---
 svtools/source/dialogs/addresstemplate.cxx          |    3 +--
 svx/source/dialog/charmap.cxx                       |    2 --
 svx/source/dialog/rubydialog.cxx                    |    3 +--
 svx/source/gallery2/galbrws2.cxx                    |    2 +-
 svx/source/tbxctrls/colrctrl.cxx                    |    2 +-
 svx/source/tbxctrls/fontworkgallery.cxx             |    2 +-
 svx/source/tbxctrls/linectrl.cxx                    |    4 ++--
 svx/source/tbxctrls/tbcontrl.cxx                    |    2 +-
 sw/source/ui/dbui/mmaddressblockpage.cxx            |   10 +++++-----
 sw/source/ui/dbui/mmgreetingspage.cxx               |    2 +-
 sw/source/uibase/dbui/mailmergehelper.cxx           |    1 -
 vcl/inc/salvtables.hxx                              |    3 ++-
 vcl/source/app/salvtables.cxx                       |   15 +++++----------
 vcl/unx/gtk3/gtk3gtkinst.cxx                        |   10 ++++++----
 48 files changed, 68 insertions(+), 88 deletions(-)

New commits:
commit f1f33b332a0b4ada8ac8ff885fc2efee768091a6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 6 11:23:35 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 6 16:47:04 2020 +0200

    move set_user_managed_scrolling to an initial weld argument
    
    gtk is creating a11y objects on widgets changing parents so manage when that
    can happen to avoid premature creation of custom widget a11y objects
    
    Change-Id: I4879a93a897b2e4084cf6af0c9c0b0f0c1062254
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104025
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 271d4721cbe4..e209f508e3cc 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -53,7 +53,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle
     , m_aTimerTriggeredControllerLock( m_xChartModel )
     , m_xFT_ChooseType(m_xBuilder->weld_label("FT_CAPTION_FOR_WIZARD"))
     , m_xMainTypeList(m_xBuilder->weld_tree_view("charttype"))
-    , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window("subtypewin")))
+    , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window("subtypewin", true)))
     , m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, "subtype", *m_xSubTypeList))
 {
     Size aSize(m_xSubTypeList->GetDrawingArea()->get_ref_device().LogicToPixel(Size(150, 50), MapMode(MapUnit::MapAppFont)));
diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx b/chart2/source/controller/sidebar/ChartTypePanel.cxx
index ceea3b2186b6..2fbe55d3eb10 100644
--- a/chart2/source/controller/sidebar/ChartTypePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx
@@ -60,7 +60,7 @@ ChartTypePanel::ChartTypePanel(vcl::Window* pParent,
     , m_nChangingCalls(0)
     , m_aTimerTriggeredControllerLock(m_xChartModel)
     , m_xMainTypeList(m_xBuilder->weld_combo_box("cmb_chartType"))
-    , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window("subtypewin")))
+    , m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window("subtypewin", true)))
     , m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, "subtype", *m_xSubTypeList))
 {
     Size aSize(m_xSubTypeList->GetDrawingArea()->get_ref_device().LogicToPixel(
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index dd3c5645e7e7..d638fa7ce473 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2634,7 +2634,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow,
     : GenericDialogController(pWindow, "cui/ui/iconselectordialog.ui", "IconSelector")
     , m_xImageManager(rXImageManager)
     , m_xParentImageManager(rXParentImageManager)
-    , m_xTbSymbol(new ValueSet(m_xBuilder->weld_scrolled_window("symbolswin")))
+    , m_xTbSymbol(new ValueSet(m_xBuilder->weld_scrolled_window("symbolswin", true)))
     , m_xTbSymbolWin(new weld::CustomWeld(*m_xBuilder, "symbolsToolbar", *m_xTbSymbol))
     , m_xFtNote(m_xBuilder->weld_label("noteLabel"))
     , m_xBtnImport(m_xBuilder->weld_button("importButton"))
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 28260d70cf4c..25b05c68d2b1 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -132,9 +132,9 @@ SvxCharacterMap::SvxCharacterMap(weld::Widget* pParent, const SfxItemSet* pSet,
                      std::make_unique<weld::CustomWeld>(*m_xBuilder, "favchar14", m_aFavCharView[13]),
                      std::make_unique<weld::CustomWeld>(*m_xBuilder, "favchar15", m_aFavCharView[14]),
                      std::make_unique<weld::CustomWeld>(*m_xBuilder, "favchar16", m_aFavCharView[15])}
-    , m_xShowSet(new SvxShowCharSet(m_xBuilder->weld_scrolled_window("showscroll"), m_xVirDev))
+    , m_xShowSet(new SvxShowCharSet(m_xBuilder->weld_scrolled_window("showscroll", true), m_xVirDev))
     , m_xShowSetArea(new weld::CustomWeld(*m_xBuilder, "showcharset", *m_xShowSet))
-    , m_xSearchSet(new SvxSearchCharSet(m_xBuilder->weld_scrolled_window("searchscroll"), m_xVirDev))
+    , m_xSearchSet(new SvxSearchCharSet(m_xBuilder->weld_scrolled_window("searchscroll", true), m_xVirDev))
     , m_xSearchSetArea(new weld::CustomWeld(*m_xBuilder, "searchcharset", *m_xSearchSet))
 {
     m_aShowChar.SetCentered(true);
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 25fadc445c5b..8bf1e1ccdd12 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -284,7 +284,7 @@ namespace svx
     SuggestionDisplay::SuggestionDisplay(weld::Builder& rBuilder)
         : m_bDisplayListBox( true )
         , m_bInSelectionUpdate( false )
-        , m_xValueSet(new SuggestionSet(rBuilder.weld_scrolled_window("scrollwin")))
+        , m_xValueSet(new SuggestionSet(rBuilder.weld_scrolled_window("scrollwin", true)))
         , m_xValueSetWin(new weld::CustomWeld(rBuilder, "valueset", *m_xValueSet))
         , m_xListBox(rBuilder.weld_tree_view("listbox"))
     {
@@ -1435,12 +1435,10 @@ namespace svx
         , m_xEdit3(new SuggestionEdit(m_xBuilder->weld_entry("edit3"), this))
         , m_xEdit4(new SuggestionEdit(m_xBuilder->weld_entry("edit4"), this))
         , m_xContents(m_xBuilder->weld_widget("box"))
-        , m_xScrollSB(m_xBuilder->weld_scrolled_window("scrollbar"))
+        , m_xScrollSB(m_xBuilder->weld_scrolled_window("scrollbar", true))
         , m_xNewPB(m_xBuilder->weld_button("new"))
         , m_xDeletePB(m_xBuilder->weld_button("delete"))
     {
-        m_xScrollSB->set_user_managed_scrolling();
-
         Size aSize(m_xContents->get_preferred_size());
         m_xScrollSB->set_size_request(-1, aSize.Height());
 
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 1df577ee13cd..7d740cfd2000 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -95,7 +95,7 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage(weld::Container* pPage, weld::Dia
     , m_xPBDefault(m_xBuilder->weld_button("default"))
     , m_xPBAdd(m_xBuilder->weld_button("add"))
     , m_xPBRemove(m_xBuilder->weld_button("delete"))
-    , m_xValSetColorBox(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("tablewin")))
+    , m_xValSetColorBox(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("tablewin", true)))
     , m_xValSetColorBoxWin(new weld::CustomWeld(*m_xBuilder, "table", *m_xValSetColorBox))
 {
     m_xLbChartColors->set_size_request(-1, m_xLbChartColors->get_height_rows(16));
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 39098871bd0b..0ae754eeb2e7 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -88,7 +88,7 @@ SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogControl
     , m_xFT_LENGTHFT(m_xBuilder->weld_label("lengthft"))
     , m_xMF_LENGTH(m_xBuilder->weld_metric_spin_button("length", FieldUnit::MM))
     , m_xCB_OPTIMAL(m_xBuilder->weld_check_button("optimal"))
-    , m_xCT_CAPTTYPE(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
+    , m_xCT_CAPTTYPE(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true)))
     , m_xCT_CAPTTYPEWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xCT_CAPTTYPE))
 {
     Size aSize(m_xCT_CAPTTYPE->GetDrawingArea()->get_ref_device().LogicToPixel(Size(187, 38), MapMode(MapUnit::MapAppFont)));
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 4eb04ec24b40..4e9b322f4f87 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -733,7 +733,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(weld::Container* pPage, weld::DialogC
     , bPreset(false)
     , m_xErrorText(m_xBuilder->weld_label("errorft"))
     , m_xBtBrowseFile(m_xBuilder->weld_button("browseBtn"))
-    , m_xExamplesVS(new SvxBmpNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
+    , m_xExamplesVS(new SvxBmpNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true)))
     , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS))
 {
     SetExchangeSupport();
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 9797c73b1da0..cff0dab685b0 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -76,7 +76,7 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogControlle
     , m_aXFillAttr(rInAttrs.GetPool())
     , m_rXFSet(m_aXFillAttr.GetItemSet())
     , mpView(nullptr)
-    , m_xBitmapLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("bitmapwin")))
+    , m_xBitmapLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("bitmapwin", true)))
     , m_xBitmapStyleLB(m_xBuilder->weld_combo_box("bitmapstyle"))
     , m_xSizeBox(m_xBuilder->weld_container("sizebox"))
     , m_xTsbScale(m_xBuilder->weld_check_button("scaletsb"))
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 8a79dcd44c9e..586557c2c089 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -46,7 +46,7 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController*
     , rXFSet( aXFillAttr.GetItemSet() )
     , eCM( ColorModel::RGB )
     , m_context(comphelper::getProcessComponentContext())
-    , m_xValSetColorList(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin")))
+    , m_xValSetColorList(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin", true)))
     , m_xValSetRecentList(new SvxColorValueSet(nullptr))
     , m_xSelectPalette(m_xBuilder->weld_combo_box("paletteselector"))
     , m_xRbRGB(m_xBuilder->weld_radio_button("RGB"))
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index dc54b084d085..6540dfde1a5e 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -60,7 +60,7 @@ SvxGradientTabPage::SvxGradientTabPage(weld::Container* pPage, weld::DialogContr
     , m_xMtrColorFrom(m_xBuilder->weld_metric_spin_button("colorfrommtr", FieldUnit::PERCENT))
     , m_xLbColorTo(new ColorListBox(m_xBuilder->weld_menu_button("colortolb"), pController->getDialog()))
     , m_xMtrColorTo(m_xBuilder->weld_metric_spin_button("colortomtr", FieldUnit::PERCENT))
-    , m_xGradientLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("gradientpresetlistwin")))
+    , m_xGradientLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("gradientpresetlistwin", true)))
     , m_xMtrIncrement(m_xBuilder->weld_spin_button("incrementmtr"))
     , m_xCbIncrement(m_xBuilder->weld_check_button("autoincrement"))
     , m_xBtnAdd(m_xBuilder->weld_button("add"))
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index d1dbbc79aa30..b0a6753db997 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -57,7 +57,7 @@ SvxHatchTabPage::SvxHatchTabPage(weld::Container* pPage, weld::DialogController*
     , m_xLbLineColor(new ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"), pController->getDialog()))
     , m_xCbBackgroundColor(m_xBuilder->weld_check_button("backgroundcolor"))
     , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button("backgroundcolorlb"), pController->getDialog()))
-    , m_xHatchLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("hatchpresetlistwin")))
+    , m_xHatchLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("hatchpresetlistwin", true)))
     , m_xBtnAdd(m_xBuilder->weld_button("add"))
     , m_xBtnModify(m_xBuilder->weld_button("modify"))
     , m_xHatchLBWin(new weld::CustomWeld(*m_xBuilder, "hatchpresetlist", *m_xHatchLB))
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index a22197d773f8..553430b5b38a 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -79,7 +79,7 @@ SvxPatternTabPage::SvxPatternTabPage(weld::Container* pPage, weld::DialogControl
     , m_xCtlPixel(new SvxPixelCtl(this))
     , m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_COLOR"), pController->getDialog()))
     , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_BACKGROUND_COLOR"), pController->getDialog()))
-    , m_xPatternLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("patternpresetlistwin")))
+    , m_xPatternLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("patternpresetlistwin", true)))
     , m_xBtnAdd(m_xBuilder->weld_button("BTN_ADD"))
     , m_xBtnModify(m_xBuilder->weld_button("BTN_MODIFY"))
     , m_xCtlPixelWin(new weld::CustomWeld(*m_xBuilder, "CTL_PIXEL", *m_xCtlPixel))
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index c6b13a0a44b9..ec113838371a 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -34,7 +34,7 @@ using namespace ::com::sun::star::container;
 
 OApplicationSwapWindow::OApplicationSwapWindow(weld::Container* pParent, OAppBorderWindow& rBorderWindow)
     : OChildWindow(pParent, "dbaccess/ui/appswapwindow.ui", "AppSwapWindow")
-    , m_xIconControl(new OApplicationIconControl(m_xBuilder->weld_scrolled_window("scroll")))
+    , m_xIconControl(new OApplicationIconControl(m_xBuilder->weld_scrolled_window("scroll", true)))
     , m_xIconControlWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xIconControl))
     , m_eLastType(E_NONE)
     , m_rBorderWin(rBorderWindow)
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 91fe52ebed50..de01830fb9fe 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -433,7 +433,7 @@ ExtMgrDialog::ExtMgrDialog(weld::Window *pParent, TheExtensionManager *pManager)
     , m_bClosed(false)
     , m_nProgress(0)
     , m_pManager(pManager)
-    , m_xExtensionBox(new ExtBoxWithBtns_Impl(m_xBuilder->weld_scrolled_window("scroll")))
+    , m_xExtensionBox(new ExtBoxWithBtns_Impl(m_xBuilder->weld_scrolled_window("scroll", true)))
     , m_xExtensionBoxWnd(new weld::CustomWeld(*m_xBuilder, "extensions", *m_xExtensionBox))
     , m_xOptionsBtn(m_xBuilder->weld_button("optionsbtn"))
     , m_xAddBtn(m_xBuilder->weld_button("addbtn"))
@@ -982,7 +982,7 @@ UpdateRequiredDialog::UpdateRequiredDialog(weld::Window *pParent, TheExtensionMa
     , m_bHasLockedEntries(false)
     , m_nProgress(0)
     , m_pManager(pManager)
-    , m_xExtensionBox(new ExtensionBox_Impl(m_xBuilder->weld_scrolled_window("scroll")))
+    , m_xExtensionBox(new ExtensionBox_Impl(m_xBuilder->weld_scrolled_window("scroll", true)))
     , m_xExtensionBoxWnd(new weld::CustomWeld(*m_xBuilder, "extensions", *m_xExtensionBox))
     , m_xUpdateNeeded(m_xBuilder->weld_label("updatelabel"))
     , m_xUpdateBtn(m_xBuilder->weld_button("ok"))
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index ccf546d713b7..3000a29a91c0 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -198,7 +198,6 @@ ExtensionBox_Impl::ExtensionBox_Impl(std::unique_ptr<weld::ScrolledWindow> xScro
 
 void ExtensionBox_Impl::Init()
 {
-    m_xScrollBar->set_user_managed_scrolling();
     m_xScrollBar->connect_vadjustment_changed( LINK( this, ExtensionBox_Impl, ScrollHdl ) );
 
     auto nIconHeight = 2*TOP_OFFSET + SMALL_ICON_SIZE;
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index 93b50777c20d..454af53891fe 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -42,7 +42,7 @@ ParaWin::ParaWin(weld::Container* pParent,IControlReferenceHandler* _pDlg)
     , m_sRequired(ForResId(STR_REQUIRED))
     , m_xBuilder(Application::CreateBuilder(pParent, "formula/ui/parameter.ui"))
     , m_xContainer(m_xBuilder->weld_container("ParameterPage"))
-    , m_xSlider(m_xBuilder->weld_scrolled_window("scrollbar"))
+    , m_xSlider(m_xBuilder->weld_scrolled_window("scrollbar", true))
     , m_xParamGrid(m_xBuilder->weld_widget("paramgrid"))
     , m_xGrid(m_xBuilder->weld_widget("grid"))
     , m_xFtEditDesc(m_xBuilder->weld_label("editdesc"))
@@ -90,7 +90,6 @@ ParaWin::ParaWin(weld::Container* pParent,IControlReferenceHandler* _pDlg)
     nEdFocus = NOT_FOUND;
     nActiveLine = 0;
 
-    m_xSlider->set_user_managed_scrolling();
     m_xSlider->connect_vadjustment_changed(LINK(this, ParaWin, ScrollHdl));
 
     InitArgInput( 0, *m_xFtArg1, *m_xBtnFx1, *m_xEdArg1, *m_xRefBtn1);
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index db1b6d519d1f..aab0dd469b55 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -319,8 +319,6 @@ protected:
     void signal_hadjustment_changed() { m_aHChangeHdl.Call(*this); }
 
 public:
-    virtual void set_user_managed_scrolling() = 0;
-
     virtual void hadjustment_configure(int value, int lower, int upper, int step_increment,
                                        int page_increment, int page_size)
         = 0;
@@ -2248,7 +2246,12 @@ public:
     virtual std::unique_ptr<Button> weld_button(const OString& id) = 0;
     virtual std::unique_ptr<MenuButton> weld_menu_button(const OString& id) = 0;
     virtual std::unique_ptr<Frame> weld_frame(const OString& id) = 0;
-    virtual std::unique_ptr<ScrolledWindow> weld_scrolled_window(const OString& id) = 0;
+    /* bUserManagedScrolling of true means that the automatic scrolling of the window is disabled
+       and the owner must specifically listen to adjustment changes and react appropiately to them.
+    */
+    virtual std::unique_ptr<ScrolledWindow> weld_scrolled_window(const OString& id,
+                                                                 bool bUserManagedScrolling = false)
+        = 0;
     virtual std::unique_ptr<Notebook> weld_notebook(const OString& id) = 0;
     virtual std::unique_ptr<ToggleButton> weld_toggle_button(const OString& id) = 0;
     virtual std::unique_ptr<RadioButton> weld_radio_button(const OString& id) = 0;
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index 9f1de427291a..908a6ea61bad 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -25,11 +25,10 @@
 ScCsvTableBox::ScCsvTableBox(weld::Builder& rBuilder)
     : mxRuler(new ScCsvRuler(maData, this))
     , mxGrid(new ScCsvGrid(maData, rBuilder.weld_menu("popup"), this))
-    , mxScroll(rBuilder.weld_scrolled_window("scrolledwindow"))
+    , mxScroll(rBuilder.weld_scrolled_window("scrolledwindow", true))
     , mxRulerWeld(new weld::CustomWeld(rBuilder, "csvruler", *mxRuler))
     , mxGridWeld(new weld::CustomWeld(rBuilder, "csvgrid", *mxGrid))
 {
-    mxScroll->set_user_managed_scrolling();
     Size aSize(mxScroll->get_approximate_digit_width() * 67,
                mxScroll->get_text_height() * 10);
     // this needs to be larger than the ScCsvGrid initial size to get it
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index ff4653f8d971..0d439f86c273 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -82,7 +82,7 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa
     , m_xEdVal4(m_xBuilder->weld_combo_box("val4"))
     , m_xBtnRemove4(m_xBuilder->weld_button("remove4"))
     , m_xContents(m_xBuilder->weld_widget("grid"))
-    , m_xScrollBar(m_xBuilder->weld_scrolled_window("scrollbar"))
+    , m_xScrollBar(m_xBuilder->weld_scrolled_window("scrollbar", true))
     , m_xExpander(m_xBuilder->weld_expander("more"))
     , m_xBtnClear(m_xBuilder->weld_button("clear"))
     , m_xBtnOk(m_xBuilder->weld_button("ok"))
@@ -259,7 +259,6 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
         UpdateValueList(i+1);
     }
 
-    m_xScrollBar->set_user_managed_scrolling();
     m_xScrollBar->connect_vadjustment_changed( LINK( this, ScFilterDlg, ScrollHdl ) );
     m_xScrollBar->vadjustment_configure(0, 0, 8, 1, 3, 4);
     Size aSize(m_xContents->get_preferred_size());
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index df21fb4c26b7..0e6fe0d76584 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -35,12 +35,10 @@ ScDataFormDlg::ScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShel
     , m_xBtnPrev(m_xBuilder->weld_button("prev"))
     , m_xBtnNext(m_xBuilder->weld_button("next"))
     , m_xBtnClose(m_xBuilder->weld_button("close"))
-    , m_xSlider(m_xBuilder->weld_scrolled_window("scrollbar"))
+    , m_xSlider(m_xBuilder->weld_scrolled_window("scrollbar", true))
     , m_xGrid(m_xBuilder->weld_container("grid"))
     , m_xFixedText(m_xBuilder->weld_label("label"))
 {
-    m_xSlider->set_user_managed_scrolling();
-
     sNewRecord = m_xFixedText->get_label();
 
     //read header from current document, and add new controls
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 763ca762bee6..2da4898cfa48 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -198,7 +198,7 @@ ScOptSolverDlg::ScOptSolverDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Windo
     , m_xEdRight4(new ScCursorRefEdit(m_xBuilder->weld_entry("val4edit")))
     , m_xRBRight4(new formula::RefButton(m_xBuilder->weld_button("val4button")))
     , m_xBtnDel4(m_xBuilder->weld_button("del4"))
-    , m_xScrollBar(m_xBuilder->weld_scrolled_window("scrollbar"))
+    , m_xScrollBar(m_xBuilder->weld_scrolled_window("scrollbar", true))
     , m_xBtnOpt(m_xBuilder->weld_button("options"))
     , m_xBtnCancel(m_xBuilder->weld_button("close"))
     , m_xBtnSolve(m_xBuilder->weld_button("ok"))
@@ -323,7 +323,6 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
     }
     m_xEdTargetValue->SetModifyHdl( LINK( this, ScOptSolverDlg, TargetModifyHdl ) );
 
-    m_xScrollBar->set_user_managed_scrolling();
     Size aSize(m_xContents->get_preferred_size());
     m_xContents->set_size_request(aSize.Width(), aSize.Height());
     m_xScrollBar->connect_vadjustment_changed( LINK( this, ScOptSolverDlg, ScrollHdl ) );
diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
index aa19882544c6..0d873c901043 100644
--- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
+++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx
@@ -33,7 +33,7 @@ ScTabBgColorDlg::ScTabBgColorDlg(weld::Window* pParent, const OUString& rTitle,
     : GenericDialogController(pParent, "modules/scalc/ui/tabcolordialog.ui", "TabColorDialog")
     , m_aTabBgColor(rDefaultColor)
     , m_xSelectPalette(m_xBuilder->weld_combo_box("paletteselector"))
-    , m_xTabBgColorSet(new ScTabBgColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin")))
+    , m_xTabBgColorSet(new ScTabBgColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin", true)))
     , m_xTabBgColorSetWin(new weld::CustomWeld(*m_xBuilder, "colorset", *m_xTabBgColorSet))
     , m_xBtnOk(m_xBuilder->weld_button("ok"))
 {
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 0855240aac7d..6a9f2fd29aaf 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -610,7 +610,7 @@ void SdPublishingDlg::CreatePages()
     m_xPage5 = m_xBuilder->weld_container("page5");
     m_xPage5_Title = m_xBuilder->weld_label("buttonStyleLabel");
     m_xPage5_TextOnly = m_xBuilder->weld_check_button("textOnlyCheckbutton");
-    m_xPage5_Buttons.reset(new ValueSet(m_xBuilder->weld_scrolled_window("buttonsDrawingareawin")));
+    m_xPage5_Buttons.reset(new ValueSet(m_xBuilder->weld_scrolled_window("buttonsDrawingareawin", true)));
     m_xPage5_ButtonsWnd.reset(new weld::CustomWeld(*m_xBuilder, "buttonsDrawingarea", *m_xPage5_Buttons));
     aAssistentFunc.InsertControl(5, m_xPage5.get());
     aAssistentFunc.InsertControl(5, m_xPage5_Title.get());
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 8c9ad5bdb8ed..a796b6511ce7 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -431,7 +431,7 @@ void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
     mxCBX_duration->get_widget().set_size_request(aOptimalSize.Width(), -1);
     rSpinButton.set_max(nMax);
 
-    mxVS_TRANSITION_ICONS.reset(new TransitionPane(m_xBuilder->weld_scrolled_window("transitions_iconswin")));
+    mxVS_TRANSITION_ICONS.reset(new TransitionPane(m_xBuilder->weld_scrolled_window("transitions_iconswin", true)));
     mxVS_TRANSITION_ICONSWin.reset(new weld::CustomWeld(*m_xBuilder, "transitions_icons", *mxVS_TRANSITION_ICONS));
 
     if( pDoc )
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index 6593251299a7..6cc2ec279f28 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -45,7 +45,7 @@ SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell,
     , m_xCbxMasterPage(m_xBuilder->weld_check_button("masterpage"))
     , m_xCbxCheckMasters(m_xBuilder->weld_check_button("checkmasters"))
     , m_xBtnLoad(m_xBuilder->weld_button("load"))
-    , m_xVS(new ValueSet(m_xBuilder->weld_scrolled_window("selectwin")))
+    , m_xVS(new ValueSet(m_xBuilder->weld_scrolled_window("selectwin", true)))
     , m_xVSWin(new weld::CustomWeld(*m_xBuilder, "select", *m_xVS))
 {
     m_xVSWin->set_size_request(m_xBtnLoad->get_approximate_digit_width() * 60,
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 8ff07499c0eb..0680c268d3b4 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -90,7 +90,7 @@ const std::string_view gPropNames[CB_COUNT] =
 
 TableDesignWidget::TableDesignWidget(weld::Builder& rBuilder, ViewShellBase& rBase)
     : mrBase(rBase)
-    , m_xValueSet(new TableValueSet(rBuilder.weld_scrolled_window("previewswin")))
+    , m_xValueSet(new TableValueSet(rBuilder.weld_scrolled_window("previewswin", true)))
     , m_xValueSetWin(new weld::CustomWeld(rBuilder, "previews", *m_xValueSet))
 {
     m_xValueSet->SetStyle(m_xValueSet->GetStyle() | WB_NO_DIRECTSELECT | WB_FLATVALUESET | WB_ITEMBORDER);
diff --git a/sfx2/source/control/emojicontrol.cxx b/sfx2/source/control/emojicontrol.cxx
index 8eeea0d5cc19..850c87897974 100644
--- a/sfx2/source/control/emojicontrol.cxx
+++ b/sfx2/source/control/emojicontrol.cxx
@@ -49,7 +49,7 @@ SfxEmojiControl::SfxEmojiControl(const EmojiPopup* pControl, weld::Widget* pPare
     , mxSymbolsBtn(m_xBuilder->weld_toggle_button(FILTER_SYMBOLS))
     , mxFlagsBtn(m_xBuilder->weld_toggle_button(FILTER_FLAGS))
     , mxUnicode9Btn(m_xBuilder->weld_toggle_button(FILTER_UNICODE9))
-    , mxEmojiView(new EmojiView(m_xBuilder->weld_scrolled_window("emoji_win")))
+    , mxEmojiView(new EmojiView(m_xBuilder->weld_scrolled_window("emoji_win", true)))
     , mxEmojiWeld(new weld::CustomWeld(*m_xBuilder, "emoji_view", *mxEmojiView))
 {
     ConvertLabelToUnicode(*mxPeopleBtn);
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 1ddba0728521..f407836fc0a4 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -1222,7 +1222,6 @@ SfxThumbnailView::SfxThumbnailView(std::unique_ptr<weld::ScrolledWindow> xWindow
     , mxScrolledWindow(std::move(xWindow))
     , mxContextMenu(std::move(xMenu))
 {
-    mxScrolledWindow->set_user_managed_scrolling();
     ImplInit();
     mxScrolledWindow->connect_vadjustment_changed(LINK(this, SfxThumbnailView, ImplScrollHdl));
 }
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 23774c4954da..4beb9a439a90 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1772,8 +1772,7 @@ void CustomPropertiesControl::Init(weld::Builder& rBuilder)
     m_xName = rBuilder.weld_label("name");
     m_xType = rBuilder.weld_label("type");
     m_xValue = rBuilder.weld_label("value");
-    m_xVertScroll = rBuilder.weld_scrolled_window("scroll");
-    m_xVertScroll->set_user_managed_scrolling();
+    m_xVertScroll = rBuilder.weld_scrolled_window("scroll", true);
     m_xPropertiesWin.reset(new CustomPropertiesWindow(*m_xBody, *m_xName, *m_xType, *m_xValue));
 
     m_xBox->set_stack_background();
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 5144fae20a4b..9ee571111afc 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -165,9 +165,9 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(weld::Window *pParent)
     , mxLinkButton(m_xBuilder->weld_button("online_link"))
     , mxCBXHideDlg(m_xBuilder->weld_check_button("hidedialogcb"))
     , mxActionBar(m_xBuilder->weld_menu_button("action_menu"))
-    , mxSearchView(new TemplateSearchView(m_xBuilder->weld_scrolled_window("scrollsearch"),
+    , mxSearchView(new TemplateSearchView(m_xBuilder->weld_scrolled_window("scrollsearch", true),
                                           m_xBuilder->weld_menu("contextmenu1")))
-    , mxLocalView(new SfxTemplateLocalView(m_xBuilder->weld_scrolled_window("scrolllocal"),
+    , mxLocalView(new SfxTemplateLocalView(m_xBuilder->weld_scrolled_window("scrolllocal", true),
                                            m_xBuilder->weld_menu("contextmenu2")))
     , mxTemplateDefaultMenu(m_xBuilder->weld_menu("submenu"))
     , mxSearchViewWeld(new weld::CustomWeld(*m_xBuilder, "search_view", *mxSearchView))
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 30bd64cb99e7..516f424f0107 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -275,7 +275,6 @@ SmElementsControl::SmElementsControl(std::unique_ptr<weld::ScrolledWindow> xScro
     , mxScroll(std::move(xScrolledWindow))
     , m_bFirstPaintAfterLayout(false)
 {
-    mxScroll->set_user_managed_scrolling();
     mxScroll->connect_hadjustment_changed( LINK(this, SmElementsControl, ScrollHdl) );
     mxScroll->connect_vadjustment_changed( LINK(this, SmElementsControl, ScrollHdl) );
 }
@@ -1130,7 +1129,7 @@ sal_uInt16 SmElementsControl::itemAtPos(const Point& rPoint) const
 SmElementsDockingWindow::SmElementsDockingWindow(SfxBindings* pInputBindings, SfxChildWindow* pChildWindow, vcl::Window* pParent)
     : SfxDockingWindow(pInputBindings, pChildWindow, pParent, "DockingElements",
         "modules/smath/ui/dockingelements.ui")
-    , mxElementsControl(new SmElementsControl(m_xBuilder->weld_scrolled_window("scrolledwindow")))
+    , mxElementsControl(new SmElementsControl(m_xBuilder->weld_scrolled_window("scrolledwindow", true)))
     , mxElementsControlWin(new weld::CustomWeld(*m_xBuilder, "element_selector", *mxElementsControl))
     , mxElementListBox(m_xBuilder->weld_combo_box("listbox"))
 {
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 6a2c9e628525..5c206546541a 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -940,7 +940,6 @@ SmShowSymbolSet::SmShowSymbolSet(std::unique_ptr<weld::ScrolledWindow> pScrolled
     , nSelectSymbol(SYMBOL_NONE)
     , m_xScrolledWindow(std::move(pScrolledWindow))
 {
-    m_xScrolledWindow->set_user_managed_scrolling();
     m_xScrolledWindow->connect_vadjustment_changed(LINK(this, SmShowSymbolSet, ScrollHdl));
 }
 
@@ -1296,7 +1295,7 @@ SmSymbolDialog::SmSymbolDialog(weld::Window *pParent, OutputDevice *pFntListDevi
     , rSymbolMgr(rMgr)
     , pFontListDev(pFntListDevice)
     , m_xSymbolSets(m_xBuilder->weld_combo_box("symbolset"))
-    , m_xSymbolSetDisplay(new SmShowSymbolSet(m_xBuilder->weld_scrolled_window("scrolledwindow")))
+    , m_xSymbolSetDisplay(new SmShowSymbolSet(m_xBuilder->weld_scrolled_window("scrolledwindow", true)))
     , m_xSymbolSetDisplayArea(new weld::CustomWeld(*m_xBuilder, "symbolsetdisplay", *m_xSymbolSetDisplay))
     , m_xSymbolName(m_xBuilder->weld_label("symbolname"))
     , m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, "preview", m_aSymbolDisplay))
@@ -1741,7 +1740,7 @@ SmSymDefineDialog::SmSymDefineDialog(weld::Window* pParent, OutputDevice *pFntLi
     , m_xDeleteBtn(m_xBuilder->weld_button("delete"))
     , m_xOldSymbolDisplay(new weld::CustomWeld(*m_xBuilder, "oldSymbolDisplay", m_aOldSymbolDisplay))
     , m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, "symbolDisplay", m_aSymbolDisplay))
-    , m_xCharsetDisplay(new SvxShowCharSet(m_xBuilder->weld_scrolled_window("showscroll"), m_xVirDev))
+    , m_xCharsetDisplay(new SvxShowCharSet(m_xBuilder->weld_scrolled_window("showscroll", true), m_xVirDev))
     , m_xCharsetDisplayArea(new weld::CustomWeld(*m_xBuilder, "charsetDisplay", *m_xCharsetDisplay))
 {
     // auto completion is troublesome since that symbols character also gets automatically selected in the
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 8d0c1713c0e4..25e0c79e6c0e 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -112,10 +112,7 @@ ValueSet::ValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow)
     mbHasVisibleItems   = false;
 
     if (mxScrolledWindow)
-    {
-        mxScrolledWindow->set_user_managed_scrolling();
         mxScrolledWindow->connect_vadjustment_changed(LINK(this, ValueSet, ImplScrollHdl));
-    }
 }
 
 void ValueSet::SetDrawingArea(weld::DrawingArea* pDrawingArea)
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 6bf1fadb9663..eb8480d7dbeb 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -493,8 +493,7 @@ void AssignmentPersistentData::ImplCommit()
         m_xDatasource = m_xBuilder->weld_combo_box("datasource");
         m_xAdministrateDatasources = m_xBuilder->weld_button("admin");
         m_xTable = m_xBuilder->weld_combo_box("datatable");
-        m_xFieldScroller = m_xBuilder->weld_scrolled_window("scrollwindow");
-        m_xFieldScroller->set_user_managed_scrolling();
+        m_xFieldScroller = m_xBuilder->weld_scrolled_window("scrollwindow", true);
         m_xGrid = m_xBuilder->weld_widget("grid");
 
         for (sal_Int32 row=0; row<FIELD_PAIRS_VISIBLE; ++row)
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 5ad20c80ba00..96ac6ad27c5a 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -72,8 +72,6 @@ SvxShowCharSet::SvxShowCharSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWi
     , mbUpdateBackground(true)
 {
     init();
-
-    mxScrollArea->set_user_managed_scrolling();
 }
 
 void SvxShowCharSet::SetDrawingArea(weld::DrawingArea* pDrawingArea)
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 357f0d9e3134..f4161b37fe9c 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -213,7 +213,7 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, weld::Wind
     , m_xRight3ED(m_xBuilder->weld_entry("Right3ED"))
     , m_xLeft4ED(m_xBuilder->weld_entry("Left4ED"))
     , m_xRight4ED(m_xBuilder->weld_entry("Right4ED"))
-    , m_xScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow"))
+    , m_xScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow", true))
     , m_xAdjustLB(m_xBuilder->weld_combo_box("adjustlb"))
     , m_xPositionLB(m_xBuilder->weld_combo_box("positionlb"))
     , m_xCharStyleFT(m_xBuilder->weld_label("styleft"))
@@ -228,7 +228,6 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, weld::Wind
 {
     m_xCharStyleLB->make_sorted();
     m_xPreviewWin->setRubyDialog(this);
-    m_xScrolledWindow->set_user_managed_scrolling();
     m_xScrolledWindow->set_size_request(-1, m_xGrid->get_preferred_size().Height());
     m_xScrolledWindow->set_vpolicy(VclPolicyType::NEVER);
 
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index e17e275600f5..71dd0ab32784 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -333,7 +333,7 @@ void GalleryThemePopup::BackgroundMenuSelectHdl(sal_uInt16 nPos)
 GalleryBrowser2::GalleryBrowser2(weld::Builder& rBuilder, Gallery* pGallery)
     : mpGallery(pGallery)
     , mpCurTheme(nullptr)
-    , mxIconView(new GalleryIconView(this, rBuilder.weld_scrolled_window("galleryscroll")))
+    , mxIconView(new GalleryIconView(this, rBuilder.weld_scrolled_window("galleryscroll", true)))
     , mxIconViewWin(new weld::CustomWeld(rBuilder, "gallery", *mxIconView))
     , mxListView(rBuilder.weld_tree_view("gallerylist"))
     , mxPreview(new GalleryPreview(this, rBuilder.weld_scrolled_window("previewscroll")))
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index e06426a0c686..069c1c871e8b 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -183,7 +183,7 @@ SvxColorDockingWindow::SvxColorDockingWindow(SfxBindings* _pBindings, SfxChildWi
     : SfxDockingWindow(_pBindings, pCW, _pParent,
         "DockingColorWindow", "svx/ui/dockingcolorwindow.ui")
     , pColorList()
-    , xColorSet(new SvxColorValueSet_docking(m_xBuilder->weld_scrolled_window("valuesetwin")))
+    , xColorSet(new SvxColorValueSet_docking(m_xBuilder->weld_scrolled_window("valuesetwin", true)))
     , xColorSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *xColorSet))
 {
     SetText(SvxResId(STR_COLORTABLE));
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 24fa16afbe39..75f78f71d35f 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -57,7 +57,7 @@ FontWorkGalleryDialog::FontWorkGalleryDialog(weld::Window* pParent, SdrView& rSd
     , mrSdrView(rSdrView)
     , mppSdrObject(nullptr)
     , mpDestModel(nullptr)
-    , maCtlFavorites(m_xBuilder->weld_scrolled_window("ctlFavoriteswin"))
+    , maCtlFavorites(m_xBuilder->weld_scrolled_window("ctlFavoriteswin", true))
     , mxCtlFavorites(new weld::CustomWeld(*m_xBuilder, "ctlFavorites", maCtlFavorites))
     , mxOKButton(m_xBuilder->weld_button("ok"))
 {
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index e612ee2f4298..1bd1ff0221fd 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -266,7 +266,7 @@ constexpr sal_uInt16 gnCols = 2;
 SvxLineEndWindow::SvxLineEndWindow(SvxLineEndToolBoxControl* pControl, weld::Widget* pParent)
     : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatinglineend.ui", "FloatingLineEnd")
     , mxControl(pControl)
-    , mxLineEndSet(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
+    , mxLineEndSet(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true)))
     , mxLineEndSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLineEndSet))
     , mnLines(12)
 {
@@ -504,7 +504,7 @@ com_sun_star_comp_svx_LineEndToolBoxControl_get_implementation(
 SvxLineBox::SvxLineBox(SvxLineStyleToolBoxControl* pControl, weld::Widget* pParent, int nInitialIndex)
     : WeldToolbarPopup(pControl->getFrameInterface(), pParent, "svx/ui/floatinglinestyle.ui", "FloatingLineStyle")
     , mxControl(pControl)
-    , mxLineStyleSet(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
+    , mxLineStyleSet(new ValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true)))
     , mxLineStyleSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxLineStyleSet))
 {
     mxLineStyleSet->SetStyle(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT);
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 6d46b52ac94d..464aa72e46b0 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1765,7 +1765,7 @@ ColorWindow::ColorWindow(const OUString& rCommand,
     , mxPaletteManager(rPaletteManager)
     , mrColorStatus(rColorStatus)
     , maColorSelectFunction(aFunction)
-    , mxColorSet(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin")))
+    , mxColorSet(new SvxColorValueSet(m_xBuilder->weld_scrolled_window("colorsetwin", true)))
     , mxRecentColorSet(new SvxColorValueSet(nullptr))
     , mxPaletteListBox(m_xBuilder->weld_combo_box("palette_listbox"))
     , mxButtonAutoColor(m_xBuilder->weld_button("auto_color_button"))
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 984ab547b1d9..bff5619a4270 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -68,8 +68,8 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage(weld::Container* pPage,
     , m_xPrevSetIB(m_xBuilder->weld_button("prev"))
     , m_xNextSetIB(m_xBuilder->weld_button("next"))
     , m_xDifferentlist(m_xBuilder->weld_button("differentlist"))
-    , m_xSettings(new SwAddressPreview(m_xBuilder->weld_scrolled_window("settingspreviewwin")))
-    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("addresspreviewwin")))
+    , m_xSettings(new SwAddressPreview(m_xBuilder->weld_scrolled_window("settingspreviewwin", true)))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("addresspreviewwin", true)))
     , m_xSettingsWIN(new weld::CustomWeld(*m_xBuilder, "settingspreview", *m_xSettings))
     , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "addresspreview", *m_xPreview))
 {
@@ -315,7 +315,7 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, weld::Button&, rButto
 SwSelectAddressBlockDialog::SwSelectAddressBlockDialog(weld::Window* pParent, SwMailMergeConfigItem& rConfig)
     : SfxDialogController(pParent, "modules/swriter/ui/selectblockdialog.ui", "SelectBlockDialog")
     , m_rConfig(rConfig)
-    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin", true)))
     , m_xNewPB(m_xBuilder->weld_button("new"))
     , m_xCustomizePB(m_xBuilder->weld_button("edit"))
     , m_xDeletePB(m_xBuilder->weld_button("delete"))
@@ -471,7 +471,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
     , m_xFieldFT(m_xBuilder->weld_label("customft"))
     , m_xFieldCB(m_xBuilder->weld_combo_box("custom"))
     , m_xOK(m_xBuilder->weld_button("ok"))
-    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin", true)))
     , m_xPreviewWIN(new weld::CustomWeld(*m_xBuilder, "addrpreview", *m_xPreview))
     , m_xDragED(new AddressMultiLineEdit(this))
     , m_xDragWIN(new weld::CustomWeld(*m_xBuilder, "addressdest", *m_xDragED))
@@ -971,7 +971,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog(
     , m_sNone(SwResId(SW_STR_NONE))
     , m_rPreviewString(rPreview)
     , m_rConfigItem(rConfigItem)
-    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin", true)))
     , m_xMatchingFI(m_xBuilder->weld_label("MATCHING_LABEL"))
     , m_xAddressTitle(m_xBuilder->weld_label("addresselem"))
     , m_xMatchTitle(m_xBuilder->weld_label("matchelem"))
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index c09f087b6d1c..d45f24093fd5 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -198,7 +198,7 @@ void SwGreetingsHandler::Contains(bool bContainsGreeting)
 SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(weld::Container* pPage, SwMailMergeWizard* pWizard)
     : vcl::OWizardPage(pPage, pWizard, "modules/swriter/ui/mmsalutationpage.ui", "MMSalutationPage")
     , SwGreetingsHandler(pWizard->GetConfigItem(), *m_xBuilder)
-    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin")))
+    , m_xPreview(new SwAddressPreview(m_xBuilder->weld_scrolled_window("previewwin", true)))
     , m_xPreviewFI(m_xBuilder->weld_label("previewft"))
     , m_xAssignPB(m_xBuilder->weld_button("assign"))
     , m_xDocumentIndexFI(m_xBuilder->weld_label("documentindex"))
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 0981bce7fdaa..19318862a4cd 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -277,7 +277,6 @@ SwAddressPreview::SwAddressPreview(std::unique_ptr<weld::ScrolledWindow> xWindow
     : pImpl(new SwAddressPreview_Impl())
     , m_xVScrollBar(std::move(xWindow))
 {
-    m_xVScrollBar->set_user_managed_scrolling();
     m_xVScrollBar->connect_vadjustment_changed(LINK(this, SwAddressPreview, ScrollHdl));
 }
 
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index affca7347051..b7dd10de3a69 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -54,7 +54,8 @@ public:
 
     virtual std::unique_ptr<weld::Frame> weld_frame(const OString& id) override;
 
-    virtual std::unique_ptr<weld::ScrolledWindow> weld_scrolled_window(const OString& id) override;
+    virtual std::unique_ptr<weld::ScrolledWindow>
+    weld_scrolled_window(const OString& id, bool bUserManagedScrolling = false) override;
 
     virtual std::unique_ptr<weld::Notebook> weld_notebook(const OString& id) override;
 
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 28deb03208aa..29ecc5d74dc6 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1955,10 +1955,10 @@ private:
 
 public:
     SalInstanceScrolledWindow(VclScrolledWindow* pScrolledWindow, SalInstanceBuilder* pBuilder,
-                              bool bTakeOwnership)
+                              bool bTakeOwnership, bool bUserManagedScrolling)
         : SalInstanceContainer(pScrolledWindow, pBuilder, bTakeOwnership)
         , m_xScrolledWindow(pScrolledWindow)
-        , m_bUserManagedScrolling(false)
+        , m_bUserManagedScrolling(bUserManagedScrolling)
     {
         ScrollBar& rVertScrollBar = m_xScrolledWindow->getVertScrollBar();
         m_aOrigVScrollHdl = rVertScrollBar.GetScrollHdl();
@@ -1966,6 +1966,7 @@ public:
         ScrollBar& rHorzScrollBar = m_xScrolledWindow->getHorzScrollBar();
         m_aOrigHScrollHdl = rHorzScrollBar.GetScrollHdl();
         rHorzScrollBar.SetScrollHdl(LINK(this, SalInstanceScrolledWindow, HscrollHdl));
+        m_xScrolledWindow->setUserManagedScrolling(m_bUserManagedScrolling);
     }
 
     virtual void hadjustment_configure(int value, int lower, int upper, int step_increment,
@@ -2156,12 +2157,6 @@ public:
         return m_xScrolledWindow->getVertScrollBar().get_preferred_size().Width();
     }
 
-    virtual void set_user_managed_scrolling() override
-    {
-        m_bUserManagedScrolling = true;
-        m_xScrolledWindow->setUserManagedScrolling(true);
-    }
-
     virtual ~SalInstanceScrolledWindow() override
     {
         ScrollBar& rVertScrollBar = m_xScrolledWindow->getVertScrollBar();
@@ -6645,11 +6640,11 @@ std::unique_ptr<weld::Frame> SalInstanceBuilder::weld_frame(const OString& id)
     return pRet;
 }
 
-std::unique_ptr<weld::ScrolledWindow> SalInstanceBuilder::weld_scrolled_window(const OString& id)
+std::unique_ptr<weld::ScrolledWindow> SalInstanceBuilder::weld_scrolled_window(const OString& id, bool bUserManagedScrolling)
 {
     VclScrolledWindow* pScrolledWindow = m_xBuilder->get<VclScrolledWindow>(id);
     return pScrolledWindow
-               ? std::make_unique<SalInstanceScrolledWindow>(pScrolledWindow, this, false)
+               ? std::make_unique<SalInstanceScrolledWindow>(pScrolledWindow, this, false, bUserManagedScrolling)
                : nullptr;
 }
 
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 405df2e1b742..8d4dff537f38 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -5681,7 +5681,7 @@ private:
     }
 
 public:
-    GtkInstanceScrolledWindow(GtkScrolledWindow* pScrolledWindow, GtkInstanceBuilder* pBuilder, bool bTakeOwnership)
+    GtkInstanceScrolledWindow(GtkScrolledWindow* pScrolledWindow, GtkInstanceBuilder* pBuilder, bool bTakeOwnership, bool bUserManagedScrolling)
         : GtkInstanceContainer(GTK_CONTAINER(pScrolledWindow), pBuilder, bTakeOwnership)
         , m_pScrolledWindow(pScrolledWindow)
         , m_pOrigViewport(nullptr)
@@ -5690,9 +5690,11 @@ public:
         , m_nVAdjustChangedSignalId(g_signal_connect(m_pVAdjustment, "value-changed", G_CALLBACK(signalVAdjustValueChanged), this))
         , m_nHAdjustChangedSignalId(g_signal_connect(m_pHAdjustment, "value-changed", G_CALLBACK(signalHAdjustValueChanged), this))
     {
+        if (bUserManagedScrolling)
+            set_user_managed_scrolling();
     }
 
-    virtual void set_user_managed_scrolling() override
+    void set_user_managed_scrolling()
     {
         disable_notify_events();
         //remove the original viewport and replace it with our bodged one which
@@ -16390,13 +16392,13 @@ public:
         return std::make_unique<GtkInstanceFrame>(pFrame, this, false);
     }
 
-    virtual std::unique_ptr<weld::ScrolledWindow> weld_scrolled_window(const OString &id) override
+    virtual std::unique_ptr<weld::ScrolledWindow> weld_scrolled_window(const OString &id, bool bUserManagedScrolling = false) override
     {
         GtkScrolledWindow* pScrolledWindow = GTK_SCROLLED_WINDOW(gtk_builder_get_object(m_pBuilder, id.getStr()));
         if (!pScrolledWindow)
             return nullptr;
         auto_add_parentless_widgets_to_container(GTK_WIDGET(pScrolledWindow));
-        return std::make_unique<GtkInstanceScrolledWindow>(pScrolledWindow, this, false);
+        return std::make_unique<GtkInstanceScrolledWindow>(pScrolledWindow, this, false, bUserManagedScrolling);
     }
 
     virtual std::unique_ptr<weld::Notebook> weld_notebook(const OString &id) override


More information about the Libreoffice-commits mailing list