sd/source/ui/view/ToolBarManager.cxx | 67 ++++++++++++++++------------------- 1 file changed, 32 insertions(+), 35 deletions(-)
New commits: commit df737dc40e47322f1d6f2a3a3fbd08373125eafd Author: Justin Luth <[email protected]> AuthorDate: Wed May 22 17:50:55 2024 -0400 Commit: Christian Lohmaier <[email protected]> CommitDate: Tue Jun 4 12:29:53 2024 +0200 Revert "tdf#126095 sd notebookbar: don't force table/media toolbar" This reverts my 24.2 commit e58e251756ecb0312cb6891d4df23e17ef8f6fcb. Unintended side affect in Draw (not Writer) sidebar. Change-Id: I948263c1e8be1202e0504f109d84ce4469ddf45d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167970 Reviewed-by: Justin Luth <[email protected]> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167973 (cherry picked from commit 5777b30375df6b34568cf88cc3701513635eace1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168325 Reviewed-by: Ilmari Lauhakangas <[email protected]> Tested-by: Christian Lohmaier <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 4be073bac612..4fcb99529871 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 )
