diff options
author | Aron Budea <aron.budea@collabora.com> | 2023-04-30 01:00:33 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-05-04 09:28:17 +0200 |
commit | 88a82f69351842ddd2491564aee8038fc990f63e (patch) | |
tree | 327e479652c23b1b7884be7aba5cc233e1b222b8 | |
parent | 08e111b488c7cddfcacbd66560cf40b060ec4b75 (diff) |
cui, lok: Hide options irrelevant for online in Spelling Options dialog
User-defined Dictionaries part and
Get more dictionaries URL + icon.
Change-Id: I73825a481e1981145abbf36b44485fb1628fbe13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151211
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | cui/source/inc/optlingu.hxx | 1 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 17 | ||||
-rw-r--r-- | cui/uiconfig/ui/optlingupage.ui | 4 |
3 files changed, 17 insertions, 5 deletions
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index 365acfbbb0fb..dbe0b8428718 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -118,6 +118,7 @@ private: std::unique_ptr<weld::Button> m_xLinguDicsDelPB; std::unique_ptr<weld::TreeView> m_xLinguOptionsCLB; std::unique_ptr<weld::Button> m_xLinguOptionsEditPB; + std::unique_ptr<weld::Box> m_xMoreDictsBox; std::unique_ptr<weld::LinkButton> m_xMoreDictsLink; void AddDicBoxEntry( const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx ); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 3e0acc1c05d7..bb597ba9e296 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -31,6 +31,7 @@ #include <tools/urlobj.hxx> #include <tools/diagnose_ex.h> #include <comphelper/dispatchcommand.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <com/sun/star/linguistic2/LinguServiceManager.hpp> #include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp> @@ -845,6 +846,7 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController* , m_xLinguDicsDelPB(m_xBuilder->weld_button("lingudictsdelete")) , m_xLinguOptionsCLB(m_xBuilder->weld_tree_view("linguoptions")) , m_xLinguOptionsEditPB(m_xBuilder->weld_button("linguoptionsedit")) + , m_xMoreDictsBox(m_xBuilder->weld_box("moredictsbox")) , m_xMoreDictsLink(m_xBuilder->weld_link_button("moredictslink")) { m_xLinguModulesCLB->enable_toggle_buttons(weld::ColumnToggleType::Check); @@ -870,7 +872,15 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController* m_xMoreDictsLink->connect_activate_link(LINK(this, SvxLinguTabPage, OnLinkClick)); if (officecfg::Office::Security::Hyperlinks::Open::get() == SvtExtendedSecurityOptions::OPEN_NEVER) - m_xMoreDictsLink->hide(); + m_xMoreDictsBox->hide(); + + if (comphelper::LibreOfficeKit::isActive()) + { + // hide User-defined Dictionaries part + m_xBuilder->weld_frame("dictsframe")->hide(); + // hide Get more dictionaries URL + icon + m_xMoreDictsBox->hide(); + } xProp = LinguMgr::GetLinguPropertySet(); xDicList.set( LinguMgr::GetDictionaryList() ); @@ -1526,9 +1536,10 @@ void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp ) m_xLinguModulesCLB->hide(); m_xLinguModulesEditPB->hide(); - if (officecfg::Office::Security::Hyperlinks::Open::get() != SvtExtendedSecurityOptions::OPEN_NEVER) + if (officecfg::Office::Security::Hyperlinks::Open::get() != SvtExtendedSecurityOptions::OPEN_NEVER && + !comphelper::LibreOfficeKit::isActive()) { - m_xMoreDictsLink->show(); + m_xMoreDictsBox->show(); } } } diff --git a/cui/uiconfig/ui/optlingupage.ui b/cui/uiconfig/ui/optlingupage.ui index 5ae94f81c0b6..13d9b3d059f9 100644 --- a/cui/uiconfig/ui/optlingupage.ui +++ b/cui/uiconfig/ui/optlingupage.ui @@ -231,7 +231,7 @@ </packing> </child> <child> - <object class="GtkFrame"> + <object class="GtkFrame" id="dictsframe"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label-xalign">0</property> @@ -516,7 +516,7 @@ </packing> </child> <child> - <object class="GtkBox"> + <object class="GtkBox" id="moredictsbox"> <property name="visible">True</property> <property name="can-focus">False</property> <child> |