summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/customize/cfg.cxx12
-rw-r--r--cui/source/inc/cfg.hxx1
-rw-r--r--sfx2/source/appl/appserv.cxx13
3 files changed, 21 insertions, 5 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 0531a9ffa725..2099a1b861c6 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -222,13 +222,17 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe
OUString text = static_cast<const SfxStringItem*>(pItem)->GetValue();
if (text.startsWith( ITEM_TOOLBAR_URL ) )
SetCurPageId("toolbars");
+ else if (text.startsWith( ITEM_EVENT_URL) )
+ SetCurPageId("events");
}
#if HAVE_FEATURE_SCRIPTING
- // for the "assign" button in the Basic Macros chooser automatically switch
- // to the keyboard tab in which this macro will be pre-selected for assigning
- // to a keystroke
- if (pInSet->GetItemIfSet(SID_MACROINFO))
+ else if (pInSet->GetItemIfSet(SID_MACROINFO))
+ {
+ // for the "assign" button in the Basic Macros chooser automatically switch
+ // to the keyboard tab in which this macro will be pre-selected for assigning
+ // to a keystroke
SetCurPageId("keyboard");
+ }
#endif
}
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 10ce7d89af7b..0ee8e1ba89fe 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -53,6 +53,7 @@ inline constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME = u"UIName";
inline constexpr OUStringLiteral ITEM_MENUBAR_URL = u"private:resource/menubar/menubar";
inline constexpr OUStringLiteral ITEM_TOOLBAR_URL = u"private:resource/toolbar/";
+inline constexpr OUStringLiteral ITEM_EVENT_URL = u"private:resource/event/";
inline constexpr OUStringLiteral CUSTOM_TOOLBAR_STR = u"custom_toolbar_";
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 17e677277e9f..d20d8c54200d 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -403,14 +403,25 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
SfxItemSetFixed<SID_CONFIG, SID_CONFIG, SID_MACROINFO, SID_MACROINFO> aSet( GetPool() );
+ // SID_CONFIG property will determine the default page shown
if ( pStringItem )
{
aSet.Put( SfxStringItem(
SID_CONFIG, pStringItem->GetValue() ) );
}
+ else if (rReq.GetSlot() == SID_CONFIGEVENT)
+ {
+ aSet.Put( SfxStringItem(
+ SID_CONFIG, "private:resource/event/" ) );
+ }
+ else if (rReq.GetSlot() == SID_TOOLBOXOPTIONS)
+ {
+ aSet.Put( SfxStringItem(
+ SID_CONFIG, "private:resource/toolbar/" ) );
+ }
#if HAVE_FEATURE_SCRIPTING
- // Preselect a macro:
+ // Preselect a macro in the 'keyboard' page
if (auto const item = rReq.GetArg<SfxMacroInfoItem>(SID_MACROINFO)) {
aSet.Put(*item);
}