starmath: Pass SmCmdBoxWindow's SfxBindings param by ref
Change-Id: Ia7d8d49605a0f501f5420a39c03fb99711310107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208378 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -202,9 +202,7 @@ class SmCmdBoxWindow final : public SfxDockingWindow
|
||||
virtual void ToggleFloatingMode() override;
|
||||
|
||||
public:
|
||||
SmCmdBoxWindow(SfxBindings *pBindings,
|
||||
SfxChildWindow *pChildWindow,
|
||||
Window *pParent);
|
||||
SmCmdBoxWindow(SfxBindings& rBindings, SfxChildWindow* pChildWindow, Window* pParent);
|
||||
|
||||
virtual ~SmCmdBoxWindow () override;
|
||||
virtual void dispose() override;
|
||||
|
||||
@@ -127,7 +127,7 @@ void Test::setUp()
|
||||
m_pDispatcher.reset(new SfxDispatcher(pViewFrame));
|
||||
m_aBindings.SetDispatcher(m_pDispatcher.get());
|
||||
m_aBindings.EnterRegistrations();
|
||||
m_pSmCmdBoxWindow.reset(VclPtr<SmCmdBoxWindow>::Create(&m_aBindings, nullptr, nullptr));
|
||||
m_pSmCmdBoxWindow.reset(VclPtr<SmCmdBoxWindow>::Create(m_aBindings, nullptr, nullptr));
|
||||
m_aBindings.LeaveRegistrations();
|
||||
m_pViewShell = m_pSmCmdBoxWindow->GetView();
|
||||
CPPUNIT_ASSERT_MESSAGE("Should have a SmViewShell", m_pViewShell);
|
||||
|
||||
@@ -955,11 +955,12 @@ void SmEditController::StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemStat
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWindow,
|
||||
vcl::Window *pParent)
|
||||
: SfxDockingWindow(pBindings_, pChildWindow, pParent, u"EditWindow"_ustr, u"modules/smath/ui/editwindow.ui"_ustr)
|
||||
SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings& rBindings_, SfxChildWindow* pChildWindow,
|
||||
vcl::Window* pParent)
|
||||
: SfxDockingWindow(&rBindings_, pChildWindow, pParent, u"EditWindow"_ustr,
|
||||
u"modules/smath/ui/editwindow.ui"_ustr)
|
||||
, m_xEdit(new SmEditWindow(*this, *m_xBuilder))
|
||||
, aController(*m_xEdit, SID_TEXT, *pBindings_)
|
||||
, aController(*m_xEdit, SID_TEXT, rBindings_)
|
||||
, bExiting(false)
|
||||
, aInitialFocusTimer("SmCmdBoxWindow aInitialFocusTimer")
|
||||
{
|
||||
@@ -1149,7 +1150,7 @@ SmCmdBoxWrapper::SmCmdBoxWrapper(vcl::Window* pParentWindow, sal_uInt16 nId, Sfx
|
||||
SfxChildWinInfo& rInfo)
|
||||
: SfxChildWindow(pParentWindow, nId)
|
||||
{
|
||||
VclPtrInstance<SmCmdBoxWindow> pDialog(&rBindings, this, pParentWindow);
|
||||
VclPtrInstance<SmCmdBoxWindow> pDialog(rBindings, this, pParentWindow);
|
||||
SetWindow(pDialog);
|
||||
// make window docked to the bottom initially (after first start)
|
||||
SetAlignment(SfxChildAlignment::BOTTOM);
|
||||
|
||||
Reference in New Issue
Block a user