summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-11-18 14:33:39 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-11-24 11:22:07 +0100
commit87778faba8c8e7378872119d98a9f1c383aef1fd (patch)
tree1e43cd4372dc6cc665e8e01ee6d4b061f3698a66 /sw
parenta2b8286a5c74fbf37dd2d45daf45358e36dd7698 (diff)
SpellingPopup: lok: Hide unusable items for online
MN_EXPLANATION_LINK is some link, but it's exectued internally, which means the the link would be executed on the serves side and not on the client's browser. m_nCorrectMenuId is a sub menu which allows to specify new autocorrect rules. Since m_nAddId is also disabled, I expect that extending the dictionaries / autocorrect rule might be a problem for online. Change-Id: Id6e8ed078f90a4f25a335a3ab5ec0e3056db648d Reviewed-on: https://gerrit.libreoffice.org/83596 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index e08c5f4a2804..566fb9b933d6 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -298,11 +298,13 @@ SwSpellPopup::SwSpellPopup(
vcl::CommandInfoProvider::GetPopupLabelForCommand(".uno:SpellingAndGrammarDialog", aModuleName));
m_xPopupMenu->SetItemText(m_nCorrectDialogId,
vcl::CommandInfoProvider::GetPopupLabelForCommand(".uno:AutoCorrectDlg", aModuleName));
+
if (comphelper::LibreOfficeKit::isActive())
{
m_xPopupMenu->HideItem(m_nCorrectDialogId);
m_xPopupMenu->HideItem(m_nAddId);
m_xPopupMenu->HideItem(m_nAddMenuId);
+ m_xPopupMenu->HideItem(m_nCorrectMenuId);
}
sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos(m_nIgnoreWordId);
m_xPopupMenu->InsertItem(MN_IGNORE_SELECTION, aIgnoreSelection, MenuItemBits::NONE, OString(), nItemPos);
@@ -580,6 +582,11 @@ SwSpellPopup::SwSpellPopup(
m_xPopupMenu->RemoveDisabledEntries(true, true);
SvtLinguConfig().SetProperty( UPN_IS_GRAMMAR_INTERACTIVE, uno::makeAny( true ));
+
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ m_xPopupMenu->HideItem(MN_EXPLANATION_LINK);
+ }
}
SwSpellPopup::~SwSpellPopup() {}