sw/source/uibase/lingu/olmenu.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit b7b0cbfafeb9d5b7d49a71cbaea7fd8419be68c5
Author:     Rashesh <[email protected]>
AuthorDate: Sun May 25 13:11:59 2025 +0530
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Mon May 26 07:03:33 2025 +0200

    tdf#166689: sw: only hide "Add To Dictionary" option when using LOKit
    
    Change-Id: I49be5595dc2fa01ddb10d4a280448a1449eab04d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185743
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    Tested-by: Julien Nabet <[email protected]>

diff --git a/sw/source/uibase/lingu/olmenu.cxx 
b/sw/source/uibase/lingu/olmenu.cxx
index 101d970c7f99..add3ac04810f 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -363,8 +363,16 @@ SwSpellPopup::SwSpellPopup(
     }
 
     sal_uInt16 nDiff = nItemId - MN_DICTIONARIES_START;
-    m_xPopupMenu->EnableItem(m_nAddMenuId, nDiff > 2);
-    m_xPopupMenu->EnableItem(m_nAddId, nDiff == 2);
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        m_xPopupMenu->EnableItem(m_nAddMenuId, nDiff > 2);
+        m_xPopupMenu->EnableItem(m_nAddId, nDiff == 2);
+    }
+    else
+    {
+        m_xPopupMenu->EnableItem(m_nAddMenuId, nDiff > 1);
+        m_xPopupMenu->EnableItem(m_nAddId, nDiff == 1);
+    }
 
     //ADD NEW LANGUAGE MENU ITEM
 

Reply via email to