bump product version to 4.1.6.2
[LibreOffice.git] / framework / inc / uielement / langselectionstatusbarcontroller.hxx
blob71896ef18a4b1feb74db9139f99db35020295b79
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __FRAMEWORK_UIELEMENT_LANGSELECTIONSTATUSBARCONTROLLER_HXX_
21 #define __FRAMEWORK_UIELEMENT_LANGSELECTIONSTATUSBARCONTROLLER_HXX_
23 #include <macros/generic.hxx>
24 #include <macros/xinterface.hxx>
25 #include <macros/xtypeprovider.hxx>
26 #include <macros/xserviceinfo.hxx>
27 #include <stdtypes.h>
28 #include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
29 #include <svtools/statusbarcontroller.hxx>
30 #include <rtl/ustring.hxx>
32 #include "helper/mischelper.hxx"
34 #include <set>
36 class SvtLanguageTable;
39 // component helper namespace
40 namespace framework {
42 class LangSelectionStatusbarController : public svt::StatusbarController
44 public:
45 explicit LangSelectionStatusbarController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
47 // XServiceInfo
48 DECLARE_XSERVICEINFO
50 // XInitialization
51 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
53 // XStatusListener
54 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
56 // XStatusbarController
57 virtual void SAL_CALL command( const ::com::sun::star::awt::Point& aPos,
58 ::sal_Int32 nCommand,
59 ::sal_Bool bMouseEvent,
60 const ::com::sun::star::uno::Any& aData ) throw (::com::sun::star::uno::RuntimeException);
61 virtual void SAL_CALL click( const ::com::sun::star::awt::Point& aPos ) throw (::com::sun::star::uno::RuntimeException);
63 private:
64 virtual ~LangSelectionStatusbarController() {}
65 LangSelectionStatusbarController(LangSelectionStatusbarController &); // not defined
66 void operator =(LangSelectionStatusbarController &); // not defined
69 sal_Bool m_bShowMenu; // if the menu is to be displayed or not (depending on the selected object/text)
70 sal_Int16 m_nScriptType; // the flags for the different script types available in the selection, LATIN = 0x0001, ASIAN = 0x0002, COMPLEX = 0x0004
71 OUString m_aCurLang; // the language of the current selection, "*" if there are more than one languages
72 OUString m_aKeyboardLang; // the keyboard language
73 OUString m_aGuessedTextLang; // the 'guessed' language for the selection, "" if none could be guessed
74 LanguageGuessingHelper m_aLangGuessHelper;
76 void LangMenu( const ::com::sun::star::awt::Point& aPos ) throw (::com::sun::star::uno::RuntimeException);
79 } // framework namespace
81 #endif // __FRAMEWORK_UIELEMENT_LANGSELECTIONSTATUSBARCONTROLLER_HXX_
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */