diff options
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/ToolBarManager.cxx | 67 |
2 files changed, 34 insertions, 37 deletions
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index f1a4a66c1e..8741a2c913 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -662,7 +662,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName ) ::sd::DrawDocShell* pCurrentDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); - SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst([](const SfxObjectShell*){return true;}, false); + SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst(); while( pSfxDocShell ) { ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( pSfxDocShell ); @@ -691,7 +691,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName ) maDocList.push_back( aInfo ); } - pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, [](const SfxObjectShell*){return true;}, false ); + pSfxDocShell = SfxObjectShell::GetNext(*pSfxDocShell); } } mxLbDocs->set_active(nPos); diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 4be073bac6..4fcb995298 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -1044,47 +1044,44 @@ void ToolBarRules::SelectionHasChanged ( mpToolBarManager->ResetToolBars(ToolBarManager::ToolBarGroup::Function); - if (!sfx2::SfxNotebookBar::IsActive()) + switch (rView.GetContext()) { - switch (rView.GetContext()) - { - case SdrViewContext::Graphic: - if (!bTextEdit) - mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, - ToolbarId::Draw_Graf_Toolbox); - break; - - case SdrViewContext::Media: - if (!bTextEdit) - mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, - ToolbarId::Draw_Media_Toolbox); - break; + case SdrViewContext::Graphic: + if (!bTextEdit) + mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, + ToolbarId::Draw_Graf_Toolbox); + break; - case SdrViewContext::Table: + case SdrViewContext::Media: + if (!bTextEdit) mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, - ToolbarId::Draw_Table_Toolbox); - bTextEdit = true; - break; + ToolbarId::Draw_Media_Toolbox); + break; - case SdrViewContext::Standard: - default: - if (!bTextEdit) + case SdrViewContext::Table: + mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, + ToolbarId::Draw_Table_Toolbox); + bTextEdit = true; + break; + + case SdrViewContext::Standard: + default: + if (!bTextEdit) + { + switch(rViewShell.GetShellType()) { - switch(rViewShell.GetShellType()) - { - case ::sd::ViewShell::ST_IMPRESS: - case ::sd::ViewShell::ST_DRAW: - case ::sd::ViewShell::ST_NOTES: - case ::sd::ViewShell::ST_HANDOUT: - mpToolBarManager->SetToolBar(ToolBarManager::ToolBarGroup::Function, - ToolBarManager::msDrawingObjectToolBar); - break; - default: - break; - } - break; + case ::sd::ViewShell::ST_IMPRESS: + case ::sd::ViewShell::ST_DRAW: + case ::sd::ViewShell::ST_NOTES: + case ::sd::ViewShell::ST_HANDOUT: + mpToolBarManager->SetToolBar(ToolBarManager::ToolBarGroup::Function, + ToolBarManager::msDrawingObjectToolBar); + break; + default: + break; } - } + break; + } } if( bTextEdit ) |