diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-10-13 16:53:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-10-14 07:44:45 +0200 |
commit | 9b227506a5fd3e84d4aa877fc6459996546348ba (patch) | |
tree | c22bb1480bc3253a19a6a2f15e9c9ea2dcc74a09 /sfx2/source | |
parent | a09c5c69e3b5fbf448cae1d6c476f39067e40023 (diff) |
Start to fix the "BASIC Macros" dialog's "Assign..." button
c79212479f42cadd39173e77acc5e6446480ff05 "Fix a misuse of two-argument std
string_view rfind" found that e.g. in Writer "Tools - Macros - Organize Macros -
Basic...", in "Macro From" select "My Macros - Standard - Module1" and in
"Existing Macros in: Module 1" select "Main", then "Assign..." had apparently
rotten over time and brought up the "Customize" dialog's default "Menus" tab.
With this fix, it now brings up the "Customize" dialog's "Keyboard" tab, in the
"Category" tree list selects the appropriate "Module1" line, and in the
"Function" list shows all the corresponding functions (just "Main" in this
case).
It doesn't yet select the appropriate line ("Main") in the "Function" list,
though. That apparently needs further fixing.
Change-Id: Ia5b9ef88d29e01f4f5e22ce3aec20f5fc22b5d45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141303
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index d6c8fdefb028..e3aefbe4b18a 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -77,6 +77,7 @@ #include <sfx2/request.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/bindings.hxx> +#include <sfx2/minfitem.hxx> #include <sfx2/msg.hxx> #include <sfx2/objface.hxx> #include <sfx2/objsh.hxx> @@ -400,13 +401,17 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) const SfxStringItem* pStringItem = rReq.GetArg<SfxStringItem>(SID_CONFIG); - SfxItemSetFixed<SID_CONFIG, SID_CONFIG> aSet( GetPool() ); + SfxItemSetFixed<SID_CONFIG, SID_CONFIG, SID_MACROINFO, SID_MACROINFO> aSet( GetPool() ); if ( pStringItem ) { aSet.Put( SfxStringItem( SID_CONFIG, pStringItem->GetValue() ) ); } + // Preselect a macro: + if (auto const item = rReq.GetArg<SfxMacroInfoItem>(SID_MACROINFO)) { + aSet.Put(*item); + } Reference <XFrame> xFrame(GetRequestFrame(rReq)); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCustomizeTabDialog(rReq.GetFrameWeld(), |