1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
;
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;
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
,
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
116 css::linguistic2::XSearchableDictionaryList
> xDicList
;
118 SvxDicListChgClamp(const SvxDicListChgClamp
&) = delete;
119 SvxDicListChgClamp
& operator = (const SvxDicListChgClamp
&) = delete;
122 SvxDicListChgClamp( css::uno::Reference
<
123 css::linguistic2::XSearchableDictionaryList
> xDicList
);
124 ~SvxDicListChgClamp();
127 EDITENG_DLLPUBLIC
short SvxDicError(weld::Window
*pParent
, linguistic::DictionaryError nError
);
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */