include/svx/svxids.hrc | 1 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 5 ++ svx/sdi/svx.sdi | 19 ++++++++++ sw/sdi/_textsh.sdi | 5 ++ sw/source/uibase/shells/basesh.cxx | 9 +++- sw/source/uibase/shells/textsh1.cxx | 3 + 6 files changed, 40 insertions(+), 2 deletions(-)
New commits: commit c73670326ce5b571c31d43721729a05a11563b01 Author: Justin Luth <[email protected]> AuthorDate: Thu Jan 27 13:15:15 2022 +0200 Commit: Justin Luth <[email protected]> CommitDate: Thu Jan 27 18:34:37 2022 +0100 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 <[email protected]> Reviewed-by: Justin Luth <[email protected]> diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 467a96ef421a..f4623b6e0e77 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -958,6 +958,7 @@ class SvxViewLayoutItem; #define SID_CELL_FORMAT_BORDER ( SID_SVX_START + 1132 ) #define SID_CHAR_DLG_EFFECT ( SID_SVX_START + 1133 ) +#define SID_CHAR_DLG_POSITION ( SID_SVX_START + 1134 ) #define FN_SVX_SET_NUMBER ( SID_SVX_START + 1136 ) #define FN_SVX_SET_BULLET ( SID_SVX_START + 1137 ) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index d97996d34f44..9cea6ad4deef 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -6676,6 +6676,11 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 <value xml:lang="en-US">Character Font Effects...</value> </prop> </node> + <node oor:name=".uno:FontPositionDialog" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Character Font Position...</value> + </prop> + </node> <node oor:name=".uno:FormatMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">F~ormat</value> diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 84f959fc4e1b..2ea903df9edf 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -3008,6 +3008,25 @@ SfxVoidItem FontEffectsDialog SID_CHAR_DLG_EFFECT ] +SfxVoidItem FontPositionDialog SID_CHAR_DLG_POSITION +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerItem; + Asynchron; + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Format; +] + + SvxFontHeightItem FontHeight SID_ATTR_CHAR_FONTHEIGHT [ diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index 38359c593471..c30d3b2057ea 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -1531,6 +1531,11 @@ interface BaseText ExecMethod = Execute ; DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] + SID_CHAR_DLG_POSITION + [ + ExecMethod = Execute ; + DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; + ] SID_CHAR_DLG_FOR_PARAGRAPH [ ExecMethod = Execute ; 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 ); }
