sw/source/uibase/shells/annotsh.cxx | 5 +++++ sw/source/uibase/shells/basesh.cxx | 2 ++ sw/source/uibase/shells/drwtxtex.cxx | 5 +++++ 3 files changed, 12 insertions(+)
New commits: commit 7bd5f80185a349e3660d19b4b4a5d4dd1e2208e3 Author: Justin Luth <justin_l...@sil.org> AuthorDate: Thu Jan 27 14:33:56 2022 +0200 Commit: Justin Luth <jl...@mail.com> CommitDate: Thu Jan 27 19:39:31 2022 +0100 sw uno:Color: directly goto CHAR_DLG fonteffects tab .uno:Color started the character properties dialog, but opened whatever tab was last opened, and not the font-effects tab where color settings are found. This is related to tdf#111733. In terms of draw text (like textboxes) and comments it did nothing at all, so I fixed that too. I found this looking for other possible uses for CHAR_DLG_POSITION or CHAR_DLG_EFFECTS. I didn't find any pre-defined menu where this could be seen, but a customized menu adding the right "Font Color" (uno:Color) demonstrates the difference. There might be more EFFECTS, but this was the only one I found. Change-Id: If80f14e00d1a2ebae850a885df06fc556f77903a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129044 Tested-by: Justin Luth <jl...@mail.com> Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index b05fedf7c5ae..dd5a01adb62f 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -31,6 +31,7 @@ #include <sfx2/objface.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/bindings.hxx> +#include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> #include <editeng/eeitem.hxx> #include <editeng/flstitem.hxx> @@ -577,6 +578,10 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) { aNewAttr.Put(pNewAttrs->Get(nWhich).CloneSetWhich(nEEWhich)); } + else if (nEEWhich == EE_CHAR_COLOR) + { + m_rView.GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT); + } tools::Rectangle aOutRect = pOLV->GetOutputArea(); if (tools::Rectangle() != aOutRect && aNewAttr.Count()) diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index b2f8abd694fb..15780ee57c6e 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2295,6 +2295,8 @@ void SwBaseShell::ExecTextCtrl( SfxRequest& rReq ) { if (nSlot == SID_ATTR_CHAR_KERNING) GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_POSITION); + else if (nSlot == SID_ATTR_CHAR_COLOR) + GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT); else GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG); } diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index e94dbae0b0b8..068a9be9feca 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -636,6 +636,11 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) aNewAttr.Put(pNewAttrs->Get(nWhich).CloneSetWhich(nEEWhich)); } + else if (nEEWhich == EE_CHAR_COLOR) + { + GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT); + } + SetAttrToMarked(aNewAttr);