summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2022-01-27 14:33:56 +0200
committerJustin Luth <jluth@mail.com>2022-01-27 19:39:31 +0100
commit7bd5f80185a349e3660d19b4b4a5d4dd1e2208e3 (patch)
treeb812a1267da31c90c11460458e56d6f88123c48b /sw/source
parent6c28ad0863a8ee1467280d7150e4b5642641a953 (diff)
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 <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/shells/annotsh.cxx5
-rw-r--r--sw/source/uibase/shells/basesh.cxx2
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx5
3 files changed, 12 insertions, 0 deletions
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);