diff options
author | Justin Luth <jluth@mail.com> | 2024-05-22 17:50:55 -0400 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2024-06-04 12:29:53 +0200 |
commit | df737dc40e47322f1d6f2a3a3fbd08373125eafd (patch) | |
tree | b480368b42eff0202386cb3550ad181c28dd606f /sd/source/ui | |
parent | 982cf82f52935057ac94334a608f6dde99e6c1da (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
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 <ilmari.lauhakangas@libreoffice.org>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/view/ToolBarManager.cxx | 67 |
1 files changed, 32 insertions, 35 deletions
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 ) |