diff options
Diffstat (limited to 'sfx2/source/sidebar/SidebarController.cxx')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index eb2554df744d..807403248053 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -188,13 +188,13 @@ void SAL_CALL SidebarController::disposing (void) if (mxReadOnlyModeDispatch.is()) mxReadOnlyModeDispatch->removeStatusListener(this, Tools::GetURL(gsReadOnlyCommandName)); - if (mpSplitWindow != NULL) + if (mpSplitWindow != nullptr) { mpSplitWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler)); mpSplitWindow = NULL; } - if (mpParentWindow != NULL) + if (mpParentWindow != nullptr) { mpParentWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler)); mpParentWindow = NULL; @@ -737,7 +737,7 @@ Reference<ui::XUIElement> SidebarController::CreateUIElement ( ::comphelper::NamedValueCollection aCreationArguments; aCreationArguments.put("Frame", makeAny(mxFrame)); aCreationArguments.put("ParentWindow", makeAny(rxWindow)); - SfxDockingWindow* pSfxDockingWindow = dynamic_cast<SfxDockingWindow*>(mpParentWindow); + SfxDockingWindow* pSfxDockingWindow = dynamic_cast<SfxDockingWindow*>(mpParentWindow.get()); if (pSfxDockingWindow != NULL) aCreationArguments.put("SfxBindings", makeAny(sal_uInt64(&pSfxDockingWindow->GetBindings()))); aCreationArguments.put("Theme", Theme::GetPropertySet()); @@ -802,7 +802,7 @@ IMPL_LINK(SidebarController, WindowEventHandler, VclWindowEvent*, pEvent) break; } } - else if (pEvent->GetWindow()==mpSplitWindow && mpSplitWindow!=NULL) + else if (pEvent->GetWindow()==mpSplitWindow && mpSplitWindow!=nullptr) { switch (pEvent->GetId()) { @@ -1060,7 +1060,7 @@ void SidebarController::RestrictWidth (sal_Int32 nWidth) SfxSplitWindow* pSplitWindow = GetSplitWindow(); if (pSplitWindow != NULL) { - const sal_uInt16 nId (pSplitWindow->GetItemId(mpParentWindow)); + const sal_uInt16 nId (pSplitWindow->GetItemId(mpParentWindow.get())); const sal_uInt16 nSetId (pSplitWindow->GetSet(nId)); pSplitWindow->SetItemSizeRange( nSetId, @@ -1071,17 +1071,17 @@ void SidebarController::RestrictWidth (sal_Int32 nWidth) SfxSplitWindow* SidebarController::GetSplitWindow (void) { - if (mpParentWindow != NULL) + if (mpParentWindow != nullptr) { SfxSplitWindow* pSplitWindow = dynamic_cast<SfxSplitWindow*>(mpParentWindow->GetParent()); if (pSplitWindow != mpSplitWindow) { - if (mpSplitWindow != NULL) + if (mpSplitWindow != nullptr) mpSplitWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler)); mpSplitWindow = pSplitWindow; - if (mpSplitWindow != NULL) + if (mpSplitWindow != nullptr) mpSplitWindow->AddEventListener(LINK(this, SidebarController, WindowEventHandler)); } return mpSplitWindow; @@ -1092,7 +1092,7 @@ SfxSplitWindow* SidebarController::GetSplitWindow (void) void SidebarController::UpdateCloseIndicator (const bool bCloseAfterDrag) { - if (mpParentWindow == NULL) + if (mpParentWindow == nullptr) return; if (bCloseAfterDrag) |