sd/source/ui/view/drtxtob1.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+)
New commits: commit 4b675143b4d7f9b9d1bcc76c34d413de35ee56a1 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Fri Oct 11 15:53:33 2024 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Thu Oct 17 20:07:50 2024 +0200 tdf#34804 sd: enable keyboard shortcut for CharColor and CharBackColor A followup patch that adds keyboard shortcut support to Draw/Impress for .uno:Color and .uno:CharBackColor to use recentColor. Change-Id: I1eea3b8330ca3c10e20b13e0fa83c15418eee6a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174828 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 5229e8555aa2..2e6f3000d823 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -31,6 +31,7 @@ #include <svl/itempool.hxx> #include <svl/stritem.hxx> #include <svl/style.hxx> +#include <sfx2/namedcolor.hxx> #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> @@ -690,6 +691,18 @@ SET_ADJUST: Execute( SID_CHAR_DLG, SfxCallMode::ASYNCHRON ); break; case SID_ATTR_CHAR_COLOR: + case SID_ATTR_CHAR_BACK_COLOR: + { + const sal_uInt16 nEEWhich + = aEditAttr.GetPool()->GetWhichIDFromSlotID(nSlot); + const std::optional<NamedColor>& oColor + = mpViewShell->GetDocSh()->GetRecentColor(nSlot); + if (oColor.has_value()) + { + const model::ComplexColor& rCol = (*oColor).getComplexColor(); + aNewAttr.Put(SvxColorItem(rCol.getFinalColor(), rCol, nEEWhich)); + } + } break; // #i35937# removed need for FN_NUM_BULLET_ON handling }