sfx2: Pass SfxDockingWindow's SfxBindings param by ref

With the refactoring from previous commits in place, it's
clear that all callers pass a non-null SfxBindings*
param.
Switch the param to a reference, to make that clear
and prepare for further refactoring.

Change-Id: Id9f1487dba4b84860f9afa52ff9ffb4dd7b1d2c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208387
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2026-07-23 23:21:34 +02:00
parent b8cee3464f
commit a81cc28ba6
18 changed files with 33 additions and 33 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ MediaPlayer::~MediaPlayer()
SFX_IMPL_DOCKINGWINDOW_WITHID( MediaPlayer, SID_AVMEDIA_PLAYER ) SFX_IMPL_DOCKINGWINDOW_WITHID( MediaPlayer, SID_AVMEDIA_PLAYER )
MediaFloater::MediaFloater(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent) MediaFloater::MediaFloater(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent)
: SfxDockingWindow(&rBindings, pCW, pParent, : SfxDockingWindow(rBindings, pCW, pParent,
WB_CLOSEABLE | WB_MOVEABLE | WB_SIZEABLE | WB_DOCKABLE) WB_CLOSEABLE | WB_MOVEABLE | WB_SIZEABLE | WB_DOCKABLE)
, mpMediaWindow(new MediaWindow(this, true)) , mpMediaWindow(new MediaWindow(this, true))
{ {
+6 -9
View File
@@ -73,15 +73,12 @@ protected:
SAL_DLLPRIVATE SfxChildWindow* GetChildWindow_Impl() { return m_pMgr; } SAL_DLLPRIVATE SfxChildWindow* GetChildWindow_Impl() { return m_pMgr; }
public: public:
SfxDockingWindow( SfxBindings *pBindings, SfxDockingWindow(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent,
SfxChildWindow *pCW, WinBits nWinBits);
vcl::Window* pParent, SfxDockingWindow(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent,
WinBits nWinBits); const OUString& rID, const OUString& rUIXMLDescription);
SfxDockingWindow( SfxBindings *pBindings, virtual ~SfxDockingWindow() override;
SfxChildWindow *pCW,
vcl::Window* pParent,
const OUString& rID, const OUString& rUIXMLDescription );
virtual ~SfxDockingWindow() override;
virtual void dispose() override; virtual void dispose() override;
void Initialize(SfxChildWinInfo& rInfo); void Initialize(SfxChildWinInfo& rInfo);
+1 -1
View File
@@ -121,7 +121,7 @@ void SdDisplay::SetDrawingArea(weld::DrawingArea* pDrawingArea)
* AnimationWindow - FloatingWindow * AnimationWindow - FloatingWindow
*/ */
AnimationWindow::AnimationWindow(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent) AnimationWindow::AnimationWindow(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent)
: SfxDockingWindow(&rBindings, pCW, pParent, u"DockingAnimation"_ustr, : SfxDockingWindow(rBindings, pCW, pParent, u"DockingAnimation"_ustr,
u"modules/simpress/ui/dockinganimation.ui"_ustr) u"modules/simpress/ui/dockinganimation.ui"_ustr)
, m_xCtlDisplay(new SdDisplay) , m_xCtlDisplay(new SdDisplay)
, m_xCtlDisplayWin(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *m_xCtlDisplay)) , m_xCtlDisplayWin(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *m_xCtlDisplay))
+1 -1
View File
@@ -37,7 +37,7 @@ namespace sd
{ {
//= TitledDockingWindow //= TitledDockingWindow
TitledDockingWindow::TitledDockingWindow(SfxBindings& rBindings, SfxChildWindow* i_pChildWindow, vcl::Window* i_pParent, const OUString& rsTitle ) TitledDockingWindow::TitledDockingWindow(SfxBindings& rBindings, SfxChildWindow* i_pChildWindow, vcl::Window* i_pParent, const OUString& rsTitle )
:SfxDockingWindow(&rBindings, i_pChildWindow, i_pParent, WB_MOVEABLE|WB_CLOSEABLE|WB_DOCKABLE|WB_HIDE|WB_3DLOOK ) :SfxDockingWindow(rBindings, i_pChildWindow, i_pParent, WB_MOVEABLE|WB_CLOSEABLE|WB_DOCKABLE|WB_HIDE|WB_3DLOOK )
,m_aToolbox( VclPtr<ToolBox>::Create(this) ) ,m_aToolbox( VclPtr<ToolBox>::Create(this) )
,m_aContentWindow( VclPtr<vcl::Window>::Create(this, WB_DIALOGCONTROL) ) ,m_aContentWindow( VclPtr<vcl::Window>::Create(this, WB_DIALOGCONTROL) )
,m_aBorder( 3, 1, 3, 3 ) ,m_aBorder( 3, 1, 3, 3 )
@@ -29,7 +29,7 @@ using namespace css;
DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings& rBindings, DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings& rBindings,
SfxChildWindow* pChildWindow, SfxChildWindow* pChildWindow,
vcl::Window* pParent) vcl::Window* pParent)
: SfxDockingWindow(&rBindings, pChildWindow, pParent, u"DevelopmentTool"_ustr, : SfxDockingWindow(rBindings, pChildWindow, pParent, u"DevelopmentTool"_ustr,
u"sfx/ui/developmenttool.ui"_ustr) u"sfx/ui/developmenttool.ui"_ustr)
, mpObjectInspectorWidgets(new ObjectInspectorWidgets(m_xBuilder)) , mpObjectInspectorWidgets(new ObjectInspectorWidgets(m_xBuilder))
, mpDocumentModelTreeView(m_xBuilder->weld_tree_view(u"leftside_treeview_id"_ustr)) , mpDocumentModelTreeView(m_xBuilder->weld_tree_view(u"leftside_treeview_id"_ustr))
+8 -7
View File
@@ -231,7 +231,7 @@ SfxChildWinInfo SfxDockingWrapper::GetInfo() const
SfxTitleDockingWindow::SfxTitleDockingWindow(SfxBindings& rBindings, SfxChildWindow* pChildWin, SfxTitleDockingWindow::SfxTitleDockingWindow(SfxBindings& rBindings, SfxChildWindow* pChildWin,
vcl::Window* pParent, WinBits nBits) vcl::Window* pParent, WinBits nBits)
: SfxDockingWindow(&rBindings, pChildWin, pParent, nBits) : SfxDockingWindow(rBindings, pChildWin, pParent, nBits)
, m_pWrappedWindow(nullptr) , m_pWrappedWindow(nullptr)
{ {
} }
@@ -754,10 +754,10 @@ void SfxDockingWindow::Resizing( Size& /*rSize*/ )
Constructor for the SfxDockingWindow class. A SfxChildWindow will be Constructor for the SfxDockingWindow class. A SfxChildWindow will be
required because the docking is implemented in Sfx through SfxChildWindows. required because the docking is implemented in Sfx through SfxChildWindows.
*/ */
SfxDockingWindow::SfxDockingWindow(SfxBindings* pBindinx, SfxChildWindow* pCW, vcl::Window* pParent, SfxDockingWindow::SfxDockingWindow(SfxBindings& rBindings, SfxChildWindow* pCW,
WinBits nWinBits) vcl::Window* pParent, WinBits nWinBits)
: ResizableDockingWindow(pParent, nWinBits) : ResizableDockingWindow(pParent, nWinBits)
, m_pBindings(pBindinx) , m_pBindings(&rBindings)
, m_pMgr(pCW) , m_pMgr(pCW)
{ {
m_pImpl.reset(new SfxDockingWindow_Impl(this)); m_pImpl.reset(new SfxDockingWindow_Impl(this));
@@ -766,10 +766,11 @@ SfxDockingWindow::SfxDockingWindow(SfxBindings* pBindinx, SfxChildWindow* pCW, v
/** Constructor for the SfxDockingWindow class. A SfxChildWindow will be /** Constructor for the SfxDockingWindow class. A SfxChildWindow will be
required because the docking is implemented in Sfx through SfxChildWindows. required because the docking is implemented in Sfx through SfxChildWindows.
*/ */
SfxDockingWindow::SfxDockingWindow(SfxBindings* pBindinx, SfxChildWindow* pCW, vcl::Window* pParent, SfxDockingWindow::SfxDockingWindow(SfxBindings& rBindings, SfxChildWindow* pCW,
const OUString& rID, const OUString& rUIXMLDescription) vcl::Window* pParent, const OUString& rID,
const OUString& rUIXMLDescription)
: ResizableDockingWindow(pParent) : ResizableDockingWindow(pParent)
, m_pBindings(pBindinx) , m_pBindings(&rBindings)
, m_pMgr(pCW) , m_pMgr(pCW)
{ {
m_xBuilder = Application::CreateInterimBuilder(m_xBox, rUIXMLDescription, true); m_xBuilder = Application::CreateInterimBuilder(m_xBox, rUIXMLDescription, true);
+1 -1
View File
@@ -37,7 +37,7 @@ void SfxNavigatorWrapper::Initialize()
SfxNavigator::SfxNavigator(SfxBindings& rBindings, SfxChildWindow* pChildWin, vcl::Window* pParent, SfxNavigator::SfxNavigator(SfxBindings& rBindings, SfxChildWindow* pChildWin, vcl::Window* pParent,
SfxChildWinInfo& rInfo) SfxChildWinInfo& rInfo)
: SfxDockingWindow(&rBindings, pChildWin, pParent, u"Navigator"_ustr, : SfxDockingWindow(rBindings, pChildWin, pParent, u"Navigator"_ustr,
u"sfx/ui/navigator.ui"_ustr) u"sfx/ui/navigator.ui"_ustr)
{ {
SetText(SfxResId(STR_SID_NAVIGATOR)); SetText(SfxResId(STR_SID_NAVIGATOR));
+1 -1
View File
@@ -85,7 +85,7 @@ bool SfxPartChildWnd_Impl::QueryClose()
SfxPartDockWnd_Impl::SfxPartDockWnd_Impl(SfxBindings& rBindings, SfxChildWindow* pChildWin, SfxPartDockWnd_Impl::SfxPartDockWnd_Impl(SfxBindings& rBindings, SfxChildWindow* pChildWin,
vcl::Window* pParent, WinBits nBits) vcl::Window* pParent, WinBits nBits)
: SfxDockingWindow(&rBindings, pChildWin, pParent, nBits) : SfxDockingWindow(rBindings, pChildWin, pParent, nBits)
{ {
css::uno::Reference < css::frame::XFrame2 > xFrame = css::frame::Frame::create( css::uno::Reference < css::frame::XFrame2 > xFrame = css::frame::Frame::create(
::comphelper::getProcessComponentContext() ); ::comphelper::getProcessComponentContext() );
+1 -1
View File
@@ -25,7 +25,7 @@ void SfxQuickFindWrapper::Initialize() { SetHideNotDelete(true); }
SfxQuickFind::SfxQuickFind(SfxBindings& rBindings, SfxChildWindow* pChildWin, vcl::Window* pParent, SfxQuickFind::SfxQuickFind(SfxBindings& rBindings, SfxChildWindow* pChildWin, vcl::Window* pParent,
SfxChildWinInfo& rInfo) SfxChildWinInfo& rInfo)
: SfxDockingWindow(&rBindings, pChildWin, pParent, u"QuickFind"_ustr, : SfxDockingWindow(rBindings, pChildWin, pParent, u"QuickFind"_ustr,
u"sfx/ui/quickfind.ui"_ustr) u"sfx/ui/quickfind.ui"_ustr)
{ {
SetText(SfxResId(STR_SID_QUICKFIND)); SetText(SfxResId(STR_SID_QUICKFIND));
+1 -1
View File
@@ -43,7 +43,7 @@ namespace sfx2::sidebar {
SidebarDockingWindow::SidebarDockingWindow(SfxBindings& rSfxBindings, SidebarDockingWindow::SidebarDockingWindow(SfxBindings& rSfxBindings,
SidebarChildWindow& rChildWindow, SidebarChildWindow& rChildWindow,
vcl::Window* pParentWindow, WinBits nBits) vcl::Window* pParentWindow, WinBits nBits)
: SfxDockingWindow(&rSfxBindings, &rChildWindow, pParentWindow, nBits) : SfxDockingWindow(rSfxBindings, &rChildWindow, pParentWindow, nBits)
, mbIsReadyToDrag(false) , mbIsReadyToDrag(false)
{ {
// Get the XFrame from the bindings. // Get the XFrame from the bindings.
+1 -1
View File
@@ -957,7 +957,7 @@ void SmEditController::StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemStat
/**************************************************************************/ /**************************************************************************/
SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings& rBindings_, SfxChildWindow* pChildWindow, SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings& rBindings_, SfxChildWindow* pChildWindow,
vcl::Window* pParent) vcl::Window* pParent)
: SfxDockingWindow(&rBindings_, pChildWindow, pParent, u"EditWindow"_ustr, : SfxDockingWindow(rBindings_, pChildWindow, pParent, u"EditWindow"_ustr,
u"modules/smath/ui/editwindow.ui"_ustr) u"modules/smath/ui/editwindow.ui"_ustr)
, m_xEdit(new SmEditWindow(*this, *m_xBuilder)) , m_xEdit(new SmEditWindow(*this, *m_xBuilder))
, aController(*m_xEdit, SID_TEXT, rBindings_) , aController(*m_xEdit, SID_TEXT, rBindings_)
+1 -1
View File
@@ -351,7 +351,7 @@ SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 n
} }
SvxBmpMask::SvxBmpMask(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent) SvxBmpMask::SvxBmpMask(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent)
: SfxDockingWindow(&rBindings, pCW, pParent, u"DockingColorReplace"_ustr, : SfxDockingWindow(rBindings, pCW, pParent, u"DockingColorReplace"_ustr,
u"svx/ui/dockingcolorreplace.ui"_ustr) u"svx/ui/dockingcolorreplace.ui"_ustr)
, m_xTbxPipette(m_xBuilder->weld_toolbar(u"toolbar"_ustr)) , m_xTbxPipette(m_xBuilder->weld_toolbar(u"toolbar"_ustr))
, m_xCtlPipette(new BmpColorWindow) , m_xCtlPipette(new BmpColorWindow)
+1 -1
View File
@@ -175,7 +175,7 @@ SvxFontWorkChildWindow::SvxFontWorkChildWindow(vcl::Window* _pParent, sal_uInt16
// Floating Window to the attribution of text effects // Floating Window to the attribution of text effects
SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings& rBindings, SfxChildWindow* pCW, SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings& rBindings, SfxChildWindow* pCW,
vcl::Window* _pParent) vcl::Window* _pParent)
: SfxDockingWindow(&rBindings, pCW, _pParent, u"DockingFontwork"_ustr, : SfxDockingWindow(rBindings, pCW, _pParent, u"DockingFontwork"_ustr,
u"svx/ui/dockingfontwork.ui"_ustr) u"svx/ui/dockingfontwork.ui"_ustr)
, m_rBindings(rBindings) , m_rBindings(rBindings)
, m_aInputIdle("SvxFontWorkDialog Input") , m_aInputIdle("SvxFontWorkDialog Input")
+1 -1
View File
@@ -84,7 +84,7 @@ namespace {
} }
Svx3DWin::Svx3DWin(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent) Svx3DWin::Svx3DWin(SfxBindings& rBindings, SfxChildWindow* pCW, vcl::Window* pParent)
: SfxDockingWindow(&rBindings, pCW, pParent, u"Docking3DEffects"_ustr, : SfxDockingWindow(rBindings, pCW, pParent, u"Docking3DEffects"_ustr,
u"svx/ui/docking3deffects.ui"_ustr) u"svx/ui/docking3deffects.ui"_ustr)
, m_xBtnGeo(m_xBuilder->weld_toggle_button(u"geometry"_ustr)) , m_xBtnGeo(m_xBuilder->weld_toggle_button(u"geometry"_ustr))
+4 -2
View File
@@ -2023,8 +2023,10 @@ namespace svxform
} }
} }
DataNavigator::DataNavigator(SfxBindings& rBindings, SfxChildWindow* _pMgr, vcl::Window* _pParent) DataNavigator::DataNavigator(SfxBindings& rBindings, SfxChildWindow* _pMgr,
: SfxDockingWindow(&rBindings, _pMgr, _pParent, u"DataNavigator"_ustr, u"svx/ui/datanavigator.ui"_ustr) vcl::Window* _pParent)
: SfxDockingWindow(rBindings, _pMgr, _pParent, u"DataNavigator"_ustr,
u"svx/ui/datanavigator.ui"_ustr)
, SfxControllerItem(SID_FM_DATANAVIGATOR_CONTROL, rBindings) , SfxControllerItem(SID_FM_DATANAVIGATOR_CONTROL, rBindings)
, m_xDataWin(new DataNavigatorWindow(this, *m_xBuilder, &rBindings)) , m_xDataWin(new DataNavigatorWindow(this, *m_xBuilder, &rBindings))
{ {
+1 -1
View File
@@ -1724,7 +1724,7 @@ void FmFilterNavigator::DeleteSelection()
FmFilterNavigatorWin::FmFilterNavigatorWin(SfxBindings& rBindings, SfxChildWindow* _pMgr, FmFilterNavigatorWin::FmFilterNavigatorWin(SfxBindings& rBindings, SfxChildWindow* _pMgr,
vcl::Window* _pParent) vcl::Window* _pParent)
: SfxDockingWindow(&rBindings, _pMgr, _pParent, u"FilterNavigator"_ustr, : SfxDockingWindow(rBindings, _pMgr, _pParent, u"FilterNavigator"_ustr,
u"svx/ui/filternavigator.ui"_ustr) u"svx/ui/filternavigator.ui"_ustr)
, SfxControllerItem(SID_FM_FILTER_NAVIGATOR_CONTROL, rBindings) , SfxControllerItem(SID_FM_FILTER_NAVIGATOR_CONTROL, rBindings)
, m_xNavigatorTree(new FmFilterNavigator(this, m_xBuilder->weld_tree_view(u"treeview"_ustr))) , m_xNavigatorTree(new FmFilterNavigator(this, m_xBuilder->weld_tree_view(u"treeview"_ustr)))
+1 -1
View File
@@ -396,7 +396,7 @@ namespace svxform
NavigatorFrame::NavigatorFrame(SfxBindings& rBindings, SfxChildWindow* _pMgr, NavigatorFrame::NavigatorFrame(SfxBindings& rBindings, SfxChildWindow* _pMgr,
vcl::Window* _pParent) vcl::Window* _pParent)
: SfxDockingWindow(&rBindings, _pMgr, _pParent, u"FormNavigator"_ustr, u"svx/ui/formnavigator.ui"_ustr) : SfxDockingWindow(rBindings, _pMgr, _pParent, u"FormNavigator"_ustr, u"svx/ui/formnavigator.ui"_ustr)
, SfxControllerItem(SID_FM_FMEXPLORER_CONTROL, rBindings) , SfxControllerItem(SID_FM_FMEXPLORER_CONTROL, rBindings)
, m_xNavigatorTree(new NavigatorTree(m_xBuilder->weld_tree_view(u"treeview"_ustr))) , m_xNavigatorTree(new NavigatorTree(m_xBuilder->weld_tree_view(u"treeview"_ustr)))
{ {
+1 -1
View File
@@ -180,7 +180,7 @@ constexpr sal_uInt16 gnRightSlot = SID_ATTR_LINE_COLOR;
SvxColorDockingWindow::SvxColorDockingWindow(SfxBindings& rBindings, SfxChildWindow* pCW, SvxColorDockingWindow::SvxColorDockingWindow(SfxBindings& rBindings, SfxChildWindow* pCW,
vcl::Window* _pParent) vcl::Window* _pParent)
: SfxDockingWindow(&rBindings, pCW, _pParent, u"DockingColorWindow"_ustr, : SfxDockingWindow(rBindings, pCW, _pParent, u"DockingColorWindow"_ustr,
u"svx/ui/dockingcolorwindow.ui"_ustr) u"svx/ui/dockingcolorwindow.ui"_ustr)
, m_pColorSet( , m_pColorSet(
new SvxColorValueSet_docking(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true))) new SvxColorValueSet_docking(m_xBuilder->weld_scrolled_window(u"valuesetwin"_ustr, true)))