summaryrefslogtreecommitdiff
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-23 15:38:43 +0100
commitb5fc479359a14a5b9a1b634f02a9a18e80ae3d0c (patch)
tree8f14f5e3dedb5fc6836469c8ed8ae36d91a33d8d
parentc2f58bc25cedf8a13a978b52a5bf012809fc38ed (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
-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() {}