From 884802163a07064683b6b2637c0601692f507a18 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Thu, 23 Nov 2023 20:50:09 -0500 Subject: related tdf#56258 sw sidebar SetOutline: do something without dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sidebar gained SetOutline in 7.6 with commit 3fd0b4053763aa91b0004c523e96e7d390c7b58e. In the TOOLBAR, there is special code that tells the main button to show the locale list outline choices - just like the dropdown does. However, none of that code comes into play in the sidebar, so add a special case to handle that situation. It is easy to launch the dialog, focused on the outlinenum page. Better yet would be to figure out how to launch the popup window that the dropdown opens - so they do the same thing... Change-Id: I3d6eeafaa8bdb45cfacc42e221820d664419e0e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159934 Tested-by: Jenkins CollaboraOffice Reviewed-by: Justin Luth Reviewed-by: Szymon Kłos (cherry picked from commit f384dc0476e4730d3ccb7a7f56eae8452bce133a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160326 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas --- sw/source/uibase/shells/txtnum.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx index 412f603dcb32..250a12ea3585 100644 --- a/sw/source/uibase/shells/txtnum.cxx +++ b/sw/source/uibase/shells/txtnum.cxx @@ -310,6 +310,14 @@ void SwTextShell::ExecSetNumber(SfxRequest const &rReq) GetShell().SetCurNumRule( aNewNumRule, bCreateNewList ); } } + else if (nSlot == FN_SVX_SET_OUTLINE) + { + // no outline provided: launch dialog to request a specific outline + SfxBindings& rBindings = GetView().GetViewFrame().GetBindings(); + const SfxStringItem aPage(FN_PARAM_1, "outlinenum"); + const SfxPoolItem* aItems[] = { &aPage, nullptr }; + rBindings.Execute(SID_OUTLINE_BULLET, aItems); + } } break; -- cgit