/src/libreoffice/include/editeng/unolingu.hxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | * |
9 | | * This file incorporates work covered by the following license notice: |
10 | | * |
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 . |
18 | | */ |
19 | | |
20 | | #ifndef INCLUDED_EDITENG_UNOLINGU_HXX |
21 | | #define INCLUDED_EDITENG_UNOLINGU_HXX |
22 | | |
23 | | #include <rtl/ustring.hxx> |
24 | | #include <rtl/ref.hxx> |
25 | | #include <com/sun/star/uno/Reference.hxx> |
26 | | #include <editeng/editengdllapi.h> |
27 | | |
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; } |
35 | | |
36 | | class LinguMgrExitLstnr; |
37 | | |
38 | | namespace weld { class Window; } |
39 | | namespace linguistic { enum class DictionaryError; } |
40 | | |
41 | | |
42 | | class EDITENG_DLLPUBLIC LinguMgr |
43 | | { |
44 | | friend class LinguMgrExitLstnr; |
45 | | |
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; |
52 | | |
53 | | static css::uno::Reference< css::linguistic2::XDictionary > xIgnoreAll; |
54 | | static css::uno::Reference< css::linguistic2::XDictionary > xChangeAll; |
55 | | |
56 | | static rtl::Reference<LinguMgrExitLstnr> pExitLstnr; |
57 | | static bool bExiting; |
58 | | |
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(); |
67 | | |
68 | | LinguMgr(const LinguMgr &) = delete; |
69 | | LinguMgr & operator = (const LinguMgr &) = delete; |
70 | | |
71 | | public: |
72 | | |
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(); |
78 | | |
79 | | static css::uno::Reference< css::linguistic2::XLinguServiceManager2 > GetLngSvcMgr(); |
80 | | |
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(); |
84 | | }; |
85 | | |
86 | | |
87 | | namespace com::sun::star::linguistic2 { |
88 | | class XHyphenatedWord; |
89 | | } |
90 | | |
91 | | |
92 | | struct SvxAlternativeSpelling |
93 | | { |
94 | | OUString aReplacement; |
95 | | sal_Int16 nChangedPos, |
96 | | nChangedLength; |
97 | | bool bIsAltSpelling; |
98 | | |
99 | | inline SvxAlternativeSpelling(); |
100 | | }; |
101 | | |
102 | | inline SvxAlternativeSpelling::SvxAlternativeSpelling() : |
103 | 0 | nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(false) |
104 | 0 | { |
105 | 0 | } |
106 | | |
107 | | |
108 | | EDITENG_DLLPUBLIC SvxAlternativeSpelling SvxGetAltSpelling( |
109 | | const css::uno::Reference< css::linguistic2::XHyphenatedWord > & rHyphWord ); |
110 | | |
111 | | |
112 | | class EDITENG_DLLPUBLIC SvxDicListChgClamp |
113 | | { |
114 | | private: |
115 | | css::uno::Reference< |
116 | | css::linguistic2::XSearchableDictionaryList > xDicList; |
117 | | |
118 | | SvxDicListChgClamp(const SvxDicListChgClamp &) = delete; |
119 | | SvxDicListChgClamp & operator = (const SvxDicListChgClamp &) = delete; |
120 | | |
121 | | public: |
122 | | SvxDicListChgClamp( css::uno::Reference< |
123 | | css::linguistic2::XSearchableDictionaryList > xDicList ); |
124 | | ~SvxDicListChgClamp(); |
125 | | }; |
126 | | |
127 | | EDITENG_DLLPUBLIC short SvxDicError(weld::Window *pParent, linguistic::DictionaryError nError); |
128 | | |
129 | | |
130 | | #endif |
131 | | |
132 | | |
133 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |