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 <com/sun/star/uno/Reference.hxx>
25 #include <editeng/editengdllapi.h>
27 namespace com::sun::star::linguistic2
{ class XDictionary
; }
28 namespace com::sun::star::linguistic2
{ class XHyphenator
; }
29 namespace com::sun::star::linguistic2
{ class XLinguProperties
; }
30 namespace com::sun::star::linguistic2
{ class XLinguServiceManager2
; }
31 namespace com::sun::star::linguistic2
{ class XSearchableDictionaryList
; }
32 namespace com::sun::star::linguistic2
{ class XSpellChecker1
; }
33 namespace com::sun::star::linguistic2
{ class XThesaurus
; }
35 class LinguMgrExitLstnr
;
37 namespace weld
{ class Window
; }
38 namespace linguistic
{ enum class DictionaryError
; }
41 class EDITENG_DLLPUBLIC LinguMgr
43 friend class LinguMgrExitLstnr
;
45 static css::uno::Reference
< css::linguistic2::XLinguServiceManager2
> xLngSvcMgr
;
46 static css::uno::Reference
< css::linguistic2::XSpellChecker1
> xSpell
;
47 static css::uno::Reference
< css::linguistic2::XHyphenator
> xHyph
;
48 static css::uno::Reference
< css::linguistic2::XThesaurus
> xThes
;
49 static css::uno::Reference
< css::linguistic2::XSearchableDictionaryList
> xDicList
;
50 static css::uno::Reference
< css::linguistic2::XLinguProperties
> xProp
;
52 static css::uno::Reference
< css::linguistic2::XDictionary
> xIgnoreAll
;
53 static css::uno::Reference
< css::linguistic2::XDictionary
> xChangeAll
;
55 static LinguMgrExitLstnr
*pExitLstnr
;
58 static css::uno::Reference
< css::linguistic2::XSpellChecker1
> GetSpell();
59 static css::uno::Reference
< css::linguistic2::XHyphenator
> GetHyph();
60 static css::uno::Reference
< css::linguistic2::XThesaurus
> GetThes();
61 static css::uno::Reference
< css::linguistic2::XSearchableDictionaryList
> GetDicList();
62 static css::uno::Reference
< css::linguistic2::XLinguProperties
> GetProp();
63 static css::uno::Reference
< css::linguistic2::XDictionary
> GetStandard();
64 static css::uno::Reference
< css::linguistic2::XDictionary
> GetIgnoreAll();
65 static css::uno::Reference
< css::linguistic2::XDictionary
> GetChangeAll();
67 LinguMgr(const LinguMgr
&) = delete;
68 LinguMgr
& operator = (const LinguMgr
&) = delete;
72 static css::uno::Reference
< css::linguistic2::XSpellChecker1
> GetSpellChecker();
73 static css::uno::Reference
< css::linguistic2::XHyphenator
> GetHyphenator();
74 static css::uno::Reference
< css::linguistic2::XThesaurus
> GetThesaurus();
75 static css::uno::Reference
< css::linguistic2::XSearchableDictionaryList
> GetDictionaryList();
76 static css::uno::Reference
< css::linguistic2::XLinguProperties
> GetLinguPropertySet();
78 static css::uno::Reference
< css::linguistic2::XLinguServiceManager2
> GetLngSvcMgr();
80 static css::uno::Reference
< css::linguistic2::XDictionary
> GetStandardDic();
81 static css::uno::Reference
< css::linguistic2::XDictionary
> GetIgnoreAllList();
82 static css::uno::Reference
< css::linguistic2::XDictionary
> GetChangeAllList();
86 namespace com::sun::star::linguistic2
{
87 class XHyphenatedWord
;
91 struct SvxAlternativeSpelling
93 OUString aReplacement
;
94 sal_Int16 nChangedPos
,
98 inline SvxAlternativeSpelling();
101 inline SvxAlternativeSpelling::SvxAlternativeSpelling() :
102 nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(false)
107 EDITENG_DLLPUBLIC SvxAlternativeSpelling
SvxGetAltSpelling(
108 const css::uno::Reference
< css::linguistic2::XHyphenatedWord
> & rHyphWord
);
111 class EDITENG_DLLPUBLIC SvxDicListChgClamp
115 css::linguistic2::XSearchableDictionaryList
> xDicList
;
117 SvxDicListChgClamp(const SvxDicListChgClamp
&) = delete;
118 SvxDicListChgClamp
& operator = (const SvxDicListChgClamp
&) = delete;
121 SvxDicListChgClamp( css::uno::Reference
<
122 css::linguistic2::XSearchableDictionaryList
> const &rxDicList
);
123 ~SvxDicListChgClamp();
126 EDITENG_DLLPUBLIC
short SvxDicError(weld::Window
*pParent
, linguistic::DictionaryError nError
);
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */