diff options
author | Henry Castro <hcastro@collabora.com> | 2017-11-15 00:02:49 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2017-11-15 13:24:00 +0100 |
commit | 5f3216b952a1203af3c2c7c4ff88484f05427da8 (patch) | |
tree | 615b96cc378d2b3357710a93dcaaa095fb44a13b /framework | |
parent | 5f4938d89d641681346001746f3762dffcb831b4 (diff) |
sc: disable context menu of the language status bar item
Change-Id: Ifa4de8abff37179aca57b3890337f2475e5775eb
Reviewed-on: https://gerrit.libreoffice.org/44745
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/langselectionstatusbarcontroller.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index d898d10db9c5..12321574436b 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -34,6 +34,7 @@ #include <sal/types.h> #include <com/sun/star/awt/MenuItemStyle.hpp> #include <com/sun/star/document/XDocumentLanguages.hpp> +#include <com/sun/star/frame/ModuleManager.hpp> #include <i18nlangtag/mslangid.hxx> #include <com/sun/star/i18n/ScriptType.hpp> @@ -285,7 +286,8 @@ void SAL_CALL LangSelectionStatusbarController::statusChanged( const FeatureStat if ( m_bDisposed ) return; - m_bShowMenu = true; + const Reference<XModuleManager> xModuleManager = ModuleManager::create( m_xContext ); + m_bShowMenu = xModuleManager->identify(m_xFrame) == "com.sun.star.text.TextDocument"; m_nScriptType = SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX; //set the default value if ( m_xStatusbarItem.is() ) |