diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2013-04-25 10:51:17 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:22 +0100 |
commit | f14674e3f1fca1b881412f0429979a5761bfb2d6 (patch) | |
tree | d4955bba453258283c0fcc13238465284a962805 /sfx2/source/sidebar/SidebarController.cxx | |
parent | 6c4b11e3a366b16796ce31761ce15119233c640c (diff) |
Related: #i121420# apply context dependent Show Menu Commands...
according given panel configurations
(cherry picked from commit c4a3b967b0ba367b219ac181fe2ed24a64e3c224)
Change-Id: Ib2b3161c70112032659e712556641a46f43edcd0
Diffstat (limited to 'sfx2/source/sidebar/SidebarController.cxx')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 12fc4ca9980d..c4584422856c 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -454,14 +454,18 @@ void SidebarController::SwitchToDeck ( // Panel does not yet exist. Create it. aNewPanels[nWriteIndex] = CreatePanel( rPanelContexDescriptor.msId, - mpCurrentDeck->GetPanelParentWindow(), - rPanelContexDescriptor.msMenuCommand); + mpCurrentDeck->GetPanelParentWindow()); bHasPanelSetChanged = true; } if (aNewPanels[nWriteIndex] != NULL) { // Depending on the context we have to collapse the panel. aNewPanels[nWriteIndex]->SetExpanded(rPanelContexDescriptor.mbIsInitiallyVisible); + // Depending on the context we have to apply the show menu functor. + aNewPanels[nWriteIndex]->SetShowMenuFunctor( + rPanelContexDescriptor.msMenuCommand.getLength()>0 + ? ::boost::bind(&SidebarController::ShowDetailMenu,this,rPanelContexDescriptor.msMenuCommand) + : ::boost::function<void(void)>() ); ++nWriteIndex; } @@ -536,8 +540,7 @@ bool SidebarController::ArePanelSetsEqual ( SharedPanel SidebarController::CreatePanel ( const OUString& rsPanelId, - ::Window* pParentWindow, - const OUString& rsMenuCommand) + ::Window* pParentWindow ) { const PanelDescriptor* pPanelDescriptor = ResourceManager::Instance().GetPanelDescriptor(rsPanelId); if (pPanelDescriptor == NULL) @@ -547,10 +550,7 @@ SharedPanel SidebarController::CreatePanel ( SharedPanel pPanel (new Panel( *pPanelDescriptor, pParentWindow, - ::boost::bind(&Deck::RequestLayout, mpCurrentDeck.get()), - rsMenuCommand.getLength()>0 - ? ::boost::bind(&SidebarController::ShowDetailMenu,this,rsMenuCommand) - : ::boost::function<void(void)>())); + ::boost::bind(&Deck::RequestLayout, mpCurrentDeck.get()) ) ); // Create the XUIElement. Reference<ui::XUIElement> xUIElement (CreateUIElement( |