diff options
author | Justin Luth <jluth@mail.com> | 2024-05-22 17:50:55 -0400 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2024-05-23 02:26:26 +0200 |
commit | cdbd4139790383052f004def482f32fdec604fbb (patch) | |
tree | a0a9f1ca9c2a86f408f2c1b539cc1dc3e32db5ef | |
parent | fe5b4257d852b937652d55f2272ed535835d85c5 (diff) |
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 <jluth@mail.com>
Tested-by: Jenkins
-rw-r--r-- | sd/source/ui/view/ToolBarManager.cxx | 71 |
1 files changed, 34 insertions, 37 deletions
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 5296b7bd94ef..afb5c135e1d6 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -1045,49 +1045,46 @@ 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); - mpToolBarManager->SetToolBar(ToolBarManager::ToolBarGroup::Permanent, - ToolBarManager::msToolBar); - 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); + mpToolBarManager->SetToolBar(ToolBarManager::ToolBarGroup::Permanent, + ToolBarManager::msToolBar); + break; + default: + break; } - } + break; + } } if( bTextEdit ) |