sw/source/uibase/shells/textsh.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 70dcaba59e12cf2adb680a32246b5314af93a9de
Author:     Szymon Kłos <[email protected]>
AuthorDate: Tue May 13 08:45:08 2025 +0000
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Wed May 14 03:58:46 2025 +0200

    lok: open sidebar when formula is inserted
    
    to insert various math elements we need sidebar,
    in LOK case when it was closed it was hard for an user to
    discover it's features
    
    Change-Id: I1e378d932d42bee637f14842279b44edf33dacb1
    (cherry picked from commit f774b9901013e0e5ff735f3f9601cc85b7f09725)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185257
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/sw/source/uibase/shells/textsh.cxx 
b/sw/source/uibase/shells/textsh.cxx
index 51e17e41fa4b..ed749d9a0ea5 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -20,11 +20,13 @@
 #include <config_features.h>
 
 #include <hintids.hxx>
+#include <comphelper/lok.hxx>
 #include <comphelper/string.hxx>
 #include <svl/globalnameitem.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/frmdescr.hxx>
 #include <sfx2/objface.hxx>
+#include <sfx2/sidebar/Sidebar.hxx>
 #include <sfx2/viewfrm.hxx>
 
 #include <i18nutil/transliteration.hxx>
@@ -418,6 +420,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
 
     case FN_INSERT_SMA:
         {
+            // if sidebar is closed - open to show elements deck
+            if (comphelper::LibreOfficeKit::isActive())
+                sfx2::sidebar::Sidebar::Setup(u"");
+
             // #i34343# Inserting a math object into an autocompletion crashes
             // the suggestion has to be removed before
             GetView().GetEditWin().StopQuickHelp();

Reply via email to