tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / include / editeng / unolingu.hxx
blob2aec6db1a6300d95ccd7832557399f396246b45f
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 INCLUDED_EDITENG_UNOLINGU_HXX
21 #define INCLUDED_EDITENG_UNOLINGU_HXX
23 #include <rtl/ustring.hxx>
24 #include <rtl/ref.hxx>
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <editeng/editengdllapi.h>
28 namespace com::sun::star::linguistic2 { class XDictionary; }
29 namespace com::sun::star::linguistic2 { class XHyphenator; }
30 namespace com::sun::star::linguistic2 { class XLinguProperties; }
31 namespace com::sun::star::linguistic2 { class XLinguServiceManager2; }
32 namespace com::sun::star::linguistic2 { class XSearchableDictionaryList; }
33 namespace com::sun::star::linguistic2 { class XSpellChecker1; }
34 namespace com::sun::star::linguistic2 { class XThesaurus; }
36 class LinguMgrExitLstnr;
38 namespace weld { class Window; }
39 namespace linguistic { enum class DictionaryError; }
42 class EDITENG_DLLPUBLIC LinguMgr
44 friend class LinguMgrExitLstnr;
46 static css::uno::Reference< css::linguistic2::XLinguServiceManager2 > xLngSvcMgr;
47 static css::uno::Reference< css::linguistic2::XSpellChecker1 > xSpell;
48 static css::uno::Reference< css::linguistic2::XHyphenator > xHyph;
49 static css::uno::Reference< css::linguistic2::XThesaurus > xThes;
50 static css::uno::Reference< css::linguistic2::XSearchableDictionaryList > xDicList;
51 static css::uno::Reference< css::linguistic2::XLinguProperties > xProp;
53 static css::uno::Reference< css::linguistic2::XDictionary > xIgnoreAll;
54 static css::uno::Reference< css::linguistic2::XDictionary > xChangeAll;
56 static rtl::Reference<LinguMgrExitLstnr> pExitLstnr;
57 static bool bExiting;
59 static css::uno::Reference< css::linguistic2::XSpellChecker1 > GetSpell();
60 static css::uno::Reference< css::linguistic2::XHyphenator > GetHyph();
61 static css::uno::Reference< css::linguistic2::XThesaurus > GetThes();
62 static css::uno::Reference< css::linguistic2::XSearchableDictionaryList > GetDicList();
63 static css::uno::Reference< css::linguistic2::XLinguProperties > GetProp();
64 static css::uno::Reference< css::linguistic2::XDictionary > GetStandard();
65 static css::uno::Reference< css::linguistic2::XDictionary > GetIgnoreAll();
66 static css::uno::Reference< css::linguistic2::XDictionary > GetChangeAll();
68 LinguMgr(const LinguMgr &) = delete;
69 LinguMgr & operator = (const LinguMgr &) = delete;
71 public:
73 static css::uno::Reference< css::linguistic2::XSpellChecker1 > GetSpellChecker();
74 static css::uno::Reference< css::linguistic2::XHyphenator > GetHyphenator();
75 static css::uno::Reference< css::linguistic2::XThesaurus > GetThesaurus();
76 static css::uno::Reference< css::linguistic2::XSearchableDictionaryList > GetDictionaryList();
77 static css::uno::Reference< css::linguistic2::XLinguProperties > GetLinguPropertySet();
79 static css::uno::Reference< css::linguistic2::XLinguServiceManager2 > GetLngSvcMgr();
81 static css::uno::Reference< css::linguistic2::XDictionary > GetStandardDic();
82 static css::uno::Reference< css::linguistic2::XDictionary > GetIgnoreAllList();
83 static css::uno::Reference< css::linguistic2::XDictionary > GetChangeAllList();
87 namespace com::sun::star::linguistic2 {
88 class XHyphenatedWord;
92 struct SvxAlternativeSpelling
94 OUString aReplacement;
95 sal_Int16 nChangedPos,
96 nChangedLength;
97 bool bIsAltSpelling;
99 inline SvxAlternativeSpelling();
102 inline SvxAlternativeSpelling::SvxAlternativeSpelling() :
103 nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(false)
108 EDITENG_DLLPUBLIC SvxAlternativeSpelling SvxGetAltSpelling(
109 const css::uno::Reference< css::linguistic2::XHyphenatedWord > & rHyphWord );
112 class EDITENG_DLLPUBLIC SvxDicListChgClamp
114 private:
115 css::uno::Reference<
116 css::linguistic2::XSearchableDictionaryList > xDicList;
118 SvxDicListChgClamp(const SvxDicListChgClamp &) = delete;
119 SvxDicListChgClamp & operator = (const SvxDicListChgClamp &) = delete;
121 public:
122 SvxDicListChgClamp( css::uno::Reference<
123 css::linguistic2::XSearchableDictionaryList > xDicList );
124 ~SvxDicListChgClamp();
127 EDITENG_DLLPUBLIC short SvxDicError(weld::Window *pParent, linguistic::DictionaryError nError);
130 #endif
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */