related tdf#11173 TextCharacterSpacingControl sw annot: goto position tab
The kerning button on the sidebar very unhelpfully
did nothing at all in draw text (like textboxes).
It should have brought the user directly to the "position" tab
where the kerning property can be found.
Change-Id: I83687c732cc45bb28a835e878d0c91f10fb713ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129046
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi
index b335fb9..ff720d2 100644
--- a/sw/sdi/_annotsh.sdi
+++ b/sw/sdi/_annotsh.sdi
@@ -326,6 +326,13 @@ interface _Annotation
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
SID_CHAR_DLG_POSITION
[
ExecMethod = Exec ;
StateMethod = GetState ;
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
SID_ATTR_CHAR_WEIGHT // api:
[
ExecMethod = Exec ;
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 61b6650..95880f3 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -449,6 +449,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
break;
}
case SID_CHAR_DLG_EFFECT:
case SID_CHAR_DLG_POSITION:
case SID_CHAR_DLG:
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -474,6 +475,10 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
pDlg->SetCurPageId("fonteffects");
}
if (nSlot == SID_CHAR_DLG_POSITION)
{
pDlg->SetCurPageId("position");
}
else if (pItem)
{
pDlg->SetCurPageId(OUStringToOString(pItem->GetValue(), RTL_TEXTENCODING_UTF8));
@@ -582,6 +587,11 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
m_rView.GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_EFFECT);
}
else if (nEEWhich == EE_CHAR_KERNING)
{
m_rView.GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
}
tools::Rectangle aOutRect = pOLV->GetOutputArea();
if (tools::Rectangle() != aOutRect && aNewAttr.Count())