Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / offapi / com / sun / star / linguistic2 / XLinguServiceManager.idl
bloba89c55862b7db80455c423583b566e56c5ed4e57
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 .
22 module com { module sun { module star { module linguistic2 {
24 /** the basic interface to be used to access linguistic functionality.
26 <P>This interface is used to access spell checker, hyphenator, and
27 thesaurus functionality.
28 Additionally, it can query what implementations of those services are
29 available (for specific languages or in general).
30 It can select and query which of those implementations should
31 be used for a specific language.</P>
33 <P>
34 For spell checking and thesaurus, the order in the list defines the order
35 of creation/usage of those services.
36 That is, if the first spell checker implementation does not recognize
37 the given word as correct, the second service implementation for that
38 language is created and gets queried. If that one fails, the third one
39 gets created and queried and so on.
40 This chain stops if an implementation reports the word as correct or the
41 end of the list is reached, in which case the word is reported as incorrect.
42 </P>
44 <P> For the thesaurus, the behavior is the same when no meaning was found.
45 </P>
47 @see com::sun::star::linguistic2::SpellChecker
48 @see com::sun::star::linguistic2::Hyphenator
49 @see com::sun::star::linguistic2::Thesaurus
51 published interface XLinguServiceManager : com::sun::star::uno::XInterface
53 /**
54 @returns
55 the com::sun::star::linguistic2::XSpellChecker
56 interface to be used for spell checking.
58 com::sun::star::linguistic2::XSpellChecker getSpellChecker();
60 /**
61 @returns
62 the com::sun::star::linguistic2::XHyphenator
63 interface to be used for hyphenation.
65 com::sun::star::linguistic2::XHyphenator getHyphenator();
67 /**
68 @returns
69 the com::sun::star::linguistic2::XThesaurus
70 interface to be used for thesaurus functionality.
72 com::sun::star::linguistic2::XThesaurus getThesaurus();
74 /** adds a listener to the list of event listeners.
76 <P>The listeners may support one or both of
77 com::sun::star::linguistic2::XDictionaryEventListener
78 and
79 com::sun::star::linguistic2::XLinguServiceEventListener
80 interfaces.
81 </P>
83 @returns
84 `TRUE` if the listener was successfully added, `FALSE` otherwise.
86 @param xListener
87 the listener to be added.
89 boolean addLinguServiceManagerListener(
90 [in] com::sun::star::lang::XEventListener xListener );
92 /** removes a listener from the list of event listeners.
94 @returns
95 `TRUE` if the listener was successfully removed, `FALSE` otherwise.
97 @param xListener
98 the listener to be removed.
100 boolean removeLinguServiceManagerListener(
101 [in] com::sun::star::lang::XEventListener xListener );
104 @returns
105 the list of implementation names of the available services.
107 @param aServiceName
108 the name of the service requesting the list of available
109 implementations.
111 @param aLocale
112 the language used to query the list of available implementations.
114 sequence< string > getAvailableServices(
115 [in] string aServiceName,
116 [in] com::sun::star::lang::Locale aLocale );
118 /** sets the list of service implementations to be used for a
119 given service and language.
121 @param aServiceName
122 the name of the service to set the list of implementations
123 to be used.
125 @param aLocale
126 the language to set the list.
128 @param aServiceImplNames
129 the name of the service to set the list.
131 void setConfiguredServices(
132 [in] string aServiceName,
133 [in] com::sun::star::lang::Locale aLocale,
134 [in] sequence< string > aServiceImplNames );
136 /** queries the list of service implementations to be used for a
137 given service and language.
139 @returns
140 the list of implementation names of the services to be used.
142 @param aServiceName
143 the name of the service to get queried.
145 @param aLocale
146 the language to get queried.
148 sequence< string > getConfiguredServices(
149 [in] string aServiceName,
150 [in] com::sun::star::lang::Locale aLocale );
155 }; }; }; };
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */