bump product version to 4.1.6.2
[LibreOffice.git] / sfx2 / source / menu / thessubmenu.hxx
blob2a12c6ae1728e512acfca27fd01c28549966f23d
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 .
21 #ifndef _THESSUBMENU_HXX_
22 #define _THESSUBMENU_HXX_
24 #include <com/sun/star/linguistic2/XThesaurus.hpp>
25 #include <com/sun/star/linguistic2/XLinguServiceManager2.hpp>
27 #include <vcl/menu.hxx>
28 #include <sfx2/mnuitem.hxx>
30 class SfxThesSubMenuHelper
32 css::uno::Reference< css::linguistic2::XLinguServiceManager2 > m_xLngMgr;
33 css::uno::Reference< css::linguistic2::XThesaurus > m_xThesarus;
35 private:
37 // don't use copy constructor and assignment operator
38 SfxThesSubMenuHelper( const SfxThesSubMenuHelper & );
39 SfxThesSubMenuHelper & operator = ( const SfxThesSubMenuHelper & );
41 public:
42 SfxThesSubMenuHelper();
43 ~SfxThesSubMenuHelper();
45 static OUString GetText( const String &rLookUpString, xub_StrLen nDelimPos );
47 // returns the Locale to be used for the selected text when the thesaurus is to be called
48 static void GetLocale( css::lang::Locale /*out */ &rLocale, const String &rLookUpString, xub_StrLen nDelimPos );
50 // returns true if the locale is upported by the theasaurus
51 bool IsSupportedLocale( const css::lang::Locale & rLocale ) const;
53 // get the first nMax Synonym entries, even if different meanings need to be evaluated
54 bool GetMeanings( std::vector< OUString > & rSynonyms, const OUString & rWord, const css::lang::Locale & rLocale, sal_Int16 nMaxSynonms );
56 String GetThesImplName( const css::lang::Locale &rLocale ) const;
61 #endif
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */