Result of css::ui::ContextChangeEventMultiplexer::get cannot be null
Change-Id: I00fba6c2a79404c824feaa5bb302d37c4158f9a3
This commit is contained in:
@@ -299,7 +299,7 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
|
||||
= ContextChangeEventMultiplexer::get(
|
||||
::comphelper::getProcessComponentContext());
|
||||
|
||||
if(xFrame.is() && xMultiplexer.is())
|
||||
if(xFrame.is())
|
||||
{
|
||||
xMultiplexer->addContextChangeEventListener(
|
||||
pNotebookBar->getContextChangeEventListener(),
|
||||
@@ -326,7 +326,7 @@ void SfxNotebookBar::RemoveListeners(SystemWindow* pSysWindow)
|
||||
= ContextChangeEventMultiplexer::get(
|
||||
::comphelper::getProcessComponentContext());
|
||||
|
||||
if (pSysWindow->GetNotebookBar() && xMultiplexer.is())
|
||||
if (pSysWindow->GetNotebookBar())
|
||||
{
|
||||
xMultiplexer->removeAllContextChangeEventListeners(
|
||||
pSysWindow->GetNotebookBar()->getContextChangeEventListener());
|
||||
|
@@ -164,10 +164,9 @@ void SidebarController::registerSidebarForFrame(SidebarController* pController,
|
||||
css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer (
|
||||
css::ui::ContextChangeEventMultiplexer::get(
|
||||
::comphelper::getProcessComponentContext()));
|
||||
if (xMultiplexer.is())
|
||||
xMultiplexer->addContextChangeEventListener(
|
||||
static_cast<css::ui::XContextChangeEventListener*>(pController),
|
||||
xController);
|
||||
xMultiplexer->addContextChangeEventListener(
|
||||
static_cast<css::ui::XContextChangeEventListener*>(pController),
|
||||
xController);
|
||||
}
|
||||
|
||||
void SidebarController::unregisterSidebarForFrame(SidebarController* pController, const css::uno::Reference<css::frame::XController>& xController)
|
||||
@@ -176,10 +175,9 @@ void SidebarController::unregisterSidebarForFrame(SidebarController* pController
|
||||
css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer (
|
||||
css::ui::ContextChangeEventMultiplexer::get(
|
||||
::comphelper::getProcessComponentContext()));
|
||||
if (xMultiplexer.is())
|
||||
xMultiplexer->removeContextChangeEventListener(
|
||||
static_cast<css::ui::XContextChangeEventListener*>(pController),
|
||||
xController);
|
||||
xMultiplexer->removeContextChangeEventListener(
|
||||
static_cast<css::ui::XContextChangeEventListener*>(pController),
|
||||
xController);
|
||||
}
|
||||
|
||||
void SidebarController::disposeDecks()
|
||||
|
@@ -65,8 +65,7 @@ SidebarPanelBase::SidebarPanelBase (
|
||||
css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer (
|
||||
css::ui::ContextChangeEventMultiplexer::get(
|
||||
::comphelper::getProcessComponentContext()));
|
||||
if (xMultiplexer.is())
|
||||
xMultiplexer->addContextChangeEventListener(this, mxFrame->getController());
|
||||
xMultiplexer->addContextChangeEventListener(this, mxFrame->getController());
|
||||
}
|
||||
if (mpControl != nullptr)
|
||||
{
|
||||
@@ -89,8 +88,7 @@ void SAL_CALL SidebarPanelBase::disposing()
|
||||
css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer (
|
||||
css::ui::ContextChangeEventMultiplexer::get(
|
||||
::comphelper::getProcessComponentContext()));
|
||||
if (xMultiplexer.is())
|
||||
xMultiplexer->removeAllContextChangeEventListeners(this);
|
||||
xMultiplexer->removeAllContextChangeEventListeners(this);
|
||||
mxFrame = nullptr;
|
||||
}
|
||||
}
|
||||
|
@@ -113,7 +113,7 @@ void ParaLRSpacingControl::StateChanged(sal_uInt16 nSID, SfxItemState eState,
|
||||
m_xMultiplexer = css::ui::ContextChangeEventMultiplexer::get(
|
||||
::comphelper::getProcessComponentContext());
|
||||
|
||||
if(m_xFrame.is() && m_xMultiplexer.is())
|
||||
if(m_xFrame.is())
|
||||
m_xMultiplexer->addContextChangeEventListener(this, m_xFrame->getController());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user