sfx2/source/dialog/templdlg.cxx |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit db91a60d77a5bd54c818eddad977ad2e813ba974
Author:     Szymon Kłos <[email protected]>
AuthorDate: Tue Dec 16 12:17:48 2025 +0000
Commit:     Szymon Kłos <[email protected]>
CommitDate: Fri Jan 2 17:13:56 2026 +0100

    lok: show new style from selection in sidebar
    
    - not all options are working yet, show only "new form selection"
    
    Change-Id: I5d2321c67eac3ec77fe4f5781b190bfd8ee65434
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195707
    (cherry picked from commit 4debae98eab4bc525f517aacb70e47dbd367fff4)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196419
    Reviewed-by: Szymon Kłos <[email protected]>
    Tested-by: Jenkins

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index bf56e5a2c197..4a1e875bc1f7 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -812,13 +812,20 @@ 
SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(SfxBindings* pB, SfxTemplatePanel
     // shown/hidden in SfxTemplateDialog_Impl::ReplaceUpdateButtonByMenu()
     m_xActionTbR->set_item_help_id(u"new"_ustr, HID_TEMPLDLG_NEWBYEXAMPLE);
     m_xActionTbR->set_item_help_id(u"newmenu"_ustr, HID_TEMPLDLG_NEWBYEXAMPLE);
-    m_xActionTbR->set_item_menu(u"newmenu"_ustr, m_xToolMenu.get());
-    m_xToolMenu->connect_activate(LINK(this, SfxTemplateDialog_Impl, 
ToolMenuSelectHdl));
     m_xActionTbR->set_item_help_id(u"update"_ustr, 
HID_TEMPLDLG_UPDATEBYEXAMPLE);
 
     // Features not working in LOK yet
     if (comphelper::LibreOfficeKit::isActive())
-        m_xActionTbR->hide();
+    {
+        m_xActionTbR->set_item_visible(u"watercan"_ustr, false);
+        m_xActionTbR->set_item_visible(u"newmenu"_ustr, false);
+        m_xActionTbR->set_item_visible(u"update"_ustr, false);
+    }
+    else
+    {
+        m_xActionTbR->set_item_menu(u"newmenu"_ustr, m_xToolMenu.get());
+        m_xToolMenu->connect_activate(LINK(this, SfxTemplateDialog_Impl, 
ToolMenuSelectHdl));
+    }
 
     Initialize();
 }
@@ -865,6 +872,10 @@ void SfxTemplateDialog_Impl::InsertFamilyItem(sal_uInt16 
nId, const SfxStyleFami
 
 void SfxTemplateDialog_Impl::ReplaceUpdateButtonByMenu()
 {
+    // in LOK we don't support all options yet
+    if (comphelper::LibreOfficeKit::isActive())
+        return;
+
     m_xActionTbR->set_item_visible(u"update"_ustr, false);
     m_xActionTbR->set_item_visible(u"new"_ustr, false);
     m_xActionTbR->set_item_visible(u"newmenu"_ustr, true);

Reply via email to