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 .
19 #ifndef __com_sun_star_linguistic2_XLinguServiceManager_idl__
20 #define __com_sun_star_linguistic2_XLinguServiceManager_idl__
23 #include
<com
/sun
/star
/linguistic2
/XSpellChecker.idl
>
24 #include
<com
/sun
/star
/linguistic2
/XHyphenator.idl
>
25 #include
<com
/sun
/star
/linguistic2
/XThesaurus.idl
>
26 #include
<com
/sun
/star
/lang
/XEventListener.idl
>
29 module com
{ module sun
{ module star
{ module linguistic2
{
31 /** the basic interface to be used to access linguistic functionality.
33 <P>This interface is used to access spell checker, hyphenator, and
34 thesaurus functionality.
35 Additionally, it can query what implementations of those services are
36 available (for specific languages or in general).
37 It can select and query which of those implementations should
38 be used for a specific language.</P>
41 For spell checking and thesaurus, the order in the list defines the order
42 of creation/usage of those services.
43 That is, if the first spell checker implementation does not recognize
44 the given word as correct, the second service implementation for that
45 language is created and gets queried. If that one fails, the third one
46 gets created and queried and so on.
47 This chain stops if an implementation reports the word as correct or the
48 end of the list is reached, in which case the word is reported as incorrect.
51 <P> For the thesaurus, the behavior is the same when no meaning was found.
54 @see com::sun::star::linguistic2::SpellChecker
55 @see com::sun::star::linguistic2::Hyphenator
56 @see com::sun::star::linguistic2::Thesaurus
58 published
interface XLinguServiceManager
: com
::sun
::star
::uno
::XInterface
62 the com::sun::star::linguistic2::XSpellChecker
63 interface to be used for spell checking.
65 com
::sun
::star
::linguistic2
::XSpellChecker getSpellChecker
();
69 the com::sun::star::linguistic2::XHyphenator
70 interface to be used for hyphenation.
72 com
::sun
::star
::linguistic2
::XHyphenator getHyphenator
();
76 the com::sun::star::linguistic2::XThesaurus
77 interface to be used for thesaurus functionality.
79 com
::sun
::star
::linguistic2
::XThesaurus getThesaurus
();
81 /** adds a listener to the list of event listeners.
83 <P>The listeners may support one or both of
84 com::sun::star::linguistic2::XDictionaryEventListener
86 com::sun::star::linguistic2::XLinguServiceEventListener
91 `TRUE` if the listener was successfully added, `FALSE` otherwise.
94 the listener to be added.
96 boolean addLinguServiceManagerListener
(
97 [in] com
::sun
::star
::lang
::XEventListener xListener
);
99 /** removes a listener from the list of event listeners.
102 `TRUE` if the listener was successfully removed, `FALSE` otherwise.
105 the listener to be removed.
107 boolean removeLinguServiceManagerListener
(
108 [in] com
::sun
::star
::lang
::XEventListener xListener
);
112 the list of implementation names of the available services.
115 the name of the service requesting the list of available
119 the language used to query the list of available implementations.
121 sequence
< string > getAvailableServices
(
122 [in] string aServiceName
,
123 [in] com
::sun
::star
::lang
::Locale aLocale
);
125 /** sets the list of service implementations to be used for a
126 given service and language.
129 the name of the service to set the list of implementations
133 the language to set the list.
135 @param aServiceImplNames
136 the name of the service to set the list.
138 void setConfiguredServices
(
139 [in] string aServiceName
,
140 [in] com
::sun
::star
::lang
::Locale aLocale
,
141 [in] sequence
< string > aServiceImplNames
);
143 /** queries the list of service implementations to be used for a
144 given service and language.
147 the list of implementation names of the services to be used.
150 the name of the service to get queried.
153 the language to get queried.
155 sequence
< string > getConfiguredServices
(
156 [in] string aServiceName
,
157 [in] com
::sun
::star
::lang
::Locale aLocale
);
166 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */