diff options
Diffstat (limited to 'sfx2/source/sidebar/SidebarController.cxx')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 807403248053..9f78d5896f1a 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -292,7 +292,7 @@ void SidebarController::NotifyResize (void) { if (mpTabBar == 0) { - OSL_ASSERT(mpTabBar!=0); + OSL_ASSERT(mpTabBar!=nullptr); return; } @@ -621,10 +621,12 @@ void SidebarController::SwitchToDeck ( } else { - iPanel = ::std::find_if( - rCurrentPanels.begin(), - rCurrentPanels.end(), - ::boost::bind(&Panel::HasIdPredicate, _1, ::boost::cref(rPanelContexDescriptor.msId))); + for (auto a = rCurrentPanels.begin(); a != rCurrentPanels.end(); ++a) + { + iPanel = a; + if ((*iPanel)->HasIdPredicate(rPanelContexDescriptor.msId)) + break; + } } if (iPanel != rCurrentPanels.end()) { @@ -643,7 +645,7 @@ void SidebarController::SwitchToDeck ( rContext); bHasPanelSetChanged = true; } - if (aNewPanels[nWriteIndex] != 0) + if (aNewPanels[nWriteIndex] != nullptr) { // Depending on the context we have to change the command // for the "more options" dialog. @@ -684,7 +686,7 @@ void SidebarController::SwitchToDeck ( UpdateTitleBarIcons(); } -SharedPanel SidebarController::CreatePanel ( +Panel* SidebarController::CreatePanel ( const OUString& rsPanelId, vcl::Window* pParentWindow, const bool bIsInitiallyExpanded, @@ -692,15 +694,15 @@ SharedPanel SidebarController::CreatePanel ( { const PanelDescriptor* pPanelDescriptor = ResourceManager::Instance().GetPanelDescriptor(rsPanelId); if (pPanelDescriptor == NULL) - return SharedPanel(); + return NULL; // Create the panel which is the parent window of the UIElement. - SharedPanel pPanel (new Panel( + Panel *pPanel = new Panel( *pPanelDescriptor, pParentWindow, bIsInitiallyExpanded, ::boost::bind(&Deck::RequestLayout, mpCurrentDeck.get()), - ::boost::bind(&SidebarController::GetCurrentContext, this))); + ::boost::bind(&SidebarController::GetCurrentContext, this)); // Create the XUIElement. Reference<ui::XUIElement> xUIElement (CreateUIElement( @@ -715,7 +717,7 @@ SharedPanel SidebarController::CreatePanel ( } else { - pPanel.reset(); + pPanel = NULL; } return pPanel; |