[Libreoffice-commits] core.git: framework/source

Henry Castro hcastro at collabora.com
Wed Nov 15 12:24:42 UTC 2017


 framework/source/uielement/langselectionstatusbarcontroller.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5f3216b952a1203af3c2c7c4ff88484f05427da8
Author: Henry Castro <hcastro at collabora.com>
Date:   Wed Nov 15 00:02:49 2017 -0400

    sc: disable context menu of the language status bar item
    
    Change-Id: Ifa4de8abff37179aca57b3890337f2475e5775eb
    Reviewed-on: https://gerrit.libreoffice.org/44745
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

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() )


More information about the Libreoffice-commits mailing list