summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2022-01-27 13:15:15 +0200
committerJustin Luth <jluth@mail.com>2022-01-27 18:34:37 +0100
commitc73670326ce5b571c31d43721729a05a11563b01 (patch)
treedecd85c18cb540e2f94fce4ba2113590b1f4d760 /sw/source
parenta951590bfb8d161096d87dbc953552f653318e92 (diff)
related tdf#111733 TextCharacterSpacingControl sw: goto position tab
The kerning button on the sidebar very unhelpfully launches the character properties dialog at the last-used tab, instead of bringing the user directly to the "position" tab where the kerning (.uno:Spacing) property can be found. Notes: -sw draw text (eg. textbox) does nothing - no dialog at all -sw comments also do nothing -sc does nothing -sd does nothing Somehow the sidebar is calling SID_ATTR_CHAR_KERNING, but I can't find out where. In any case, I have to change this SID_ATTR_CHAR_KERNING into SID_CHAR_DLG_POSITION for these "do nothing" situations. That can happen in separate commits for each situation. I basically copied SID_CHAR_DLG_EFFECTS which is explicitly called in underline's "more options", so it is used a bit differently. Change-Id: I833d54da3664b9c01325130a2c36bbbe90b2b878 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129043 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/basesh.cxx9
-rw-r--r--sw/source/uibase/shells/textsh1.cxx3
2 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 3e13df5ec568..b2f8abd694fb 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2173,12 +2173,12 @@ SwBaseShell::~SwBaseShell()
void SwBaseShell::ExecTextCtrl( SfxRequest& rReq )
{
const SfxItemSet *pArgs = rReq.GetArgs();
+ const sal_uInt16 nSlot = rReq.GetSlot();
if( pArgs)
{
SwWrtShell &rSh = GetShell();
std::unique_ptr<SvxScriptSetItem> pSSetItem;
- sal_uInt16 nSlot = rReq.GetSlot();
SfxItemPool& rPool = rSh.GetAttrPool();
sal_uInt16 nWhich = rPool.GetWhich( nSlot );
SvtScriptType nScripts = SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX;
@@ -2292,7 +2292,12 @@ void SwBaseShell::ExecTextCtrl( SfxRequest& rReq )
}
}
else
- GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG );
+ {
+ if (nSlot == SID_ATTR_CHAR_KERNING)
+ GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG_POSITION);
+ else
+ GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG);
+ }
rReq.Done();
}
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 0436659b20a0..4677237aeb76 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -164,6 +164,8 @@ static void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,
pDlg->SetCurPageId("hyperlink");
else if (nSlot == SID_CHAR_DLG_EFFECT)
pDlg->SetCurPageId("fonteffects");
+ else if (nSlot == SID_CHAR_DLG_POSITION)
+ pDlg->SetCurPageId("position");
else if (nSlot == SID_CHAR_DLG_FOR_PARAGRAPH)
pDlg->SetCurPageId("font");
else if (pReq)
@@ -946,6 +948,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case SID_CHAR_DLG:
case SID_CHAR_DLG_EFFECT:
+ case SID_CHAR_DLG_POSITION:
{
sw_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
}