merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / linguistic2 / XLinguServiceManager.idl
blob15b8acc6322aacc4c949585270b03b8258f52890
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_linguistic2_XLinguServiceManager_idl__
28 #define __com_sun_star_linguistic2_XLinguServiceManager_idl__
31 #ifndef __com_sun_star_linguistic2_XSpellChecker_idl__
32 #include <com/sun/star/linguistic2/XSpellChecker.idl>
33 #endif
35 #ifndef __com_sun_star_linguistic2_XHyphenator_idl__
36 #include <com/sun/star/linguistic2/XHyphenator.idl>
37 #endif
39 #ifndef __com_sun_star_linguistic2_XThesaurus_idl__
40 #include <com/sun/star/linguistic2/XThesaurus.idl>
41 #endif
43 #ifndef __com_sun_star_lang_XEventListener_idl__
44 #include <com/sun/star/lang/XEventListener.idl>
45 #endif
47 //=============================================================================
49 module com { module sun { module star { module linguistic2 {
51 //=============================================================================
52 /** the basic interface to be used to access linguistic functionality.
54 <P>This interface is used to access spellchecker, hyphenator, and
55 thesaurus functionality.
56 Additionally, it can query what implementations of those services are
57 available (for specific languages or in general).
58 It can select and query which of those implementations should
59 be used for a specific language.</P>
61 <P>
62 For spellchecking and thesaurus, the order in the list defines the order
63 of creation/usage of those services.
64 That is, if the first spellchecker implementation does not recognize
65 the given word as correct, the second service implementation for that
66 language is created and gets queried. If that one fails, the third one
67 gets created and queried and so on.
68 This chain stops if an implementation reports the word as correct or the
69 end of the list is reached, in which case the word is reported as incorrect.
70 </P>
72 <P> For the thesaurus, the behavior is the same when no meaning was found.
73 </P>
75 @see <type scope="com::sun::star::linguistic2">SpellChecker</type>
76 @see <type scope="com::sun::star::linguistic2">Hyphenator</type>
77 @see <type scope="com::sun::star::linguistic2">Thesaurus</type>
79 published interface XLinguServiceManager : com::sun::star::uno::XInterface
81 //-------------------------------------------------------------------------
82 /**
83 @returns
84 the <type scope="com::sun::star::linguistic2">XSpellChecker</type>
85 interface to be used for spellchecking.
87 com::sun::star::linguistic2::XSpellChecker getSpellChecker();
89 //-------------------------------------------------------------------------
90 /**
91 @returns
92 the <type scope="com::sun::star::linguistic2">XHyphenator</type>
93 interface to be used for hyphenation.
95 com::sun::star::linguistic2::XHyphenator getHyphenator();
97 //-------------------------------------------------------------------------
98 /**
99 @returns
100 the <type scope="com::sun::star::linguistic2">XThesaurus</type>
101 interface to be used for thesaurus functionality.
103 com::sun::star::linguistic2::XThesaurus getThesaurus();
105 //-------------------------------------------------------------------------
106 /** adds a listener to the list of event listeners.
108 <P>The listeners may support one or both of
109 <type scope="com::sun::star::linguistic2">XDictionaryEventListener</type>
111 <type scope="com::sun::star::linguistic2">XLinguServiceEventListener</type>
112 interfaces.
113 </P>
115 @returns
116 <TRUE/> if the listener was succesfully added, <FALSE/> otherwise.
118 @param xListener
119 the listener to be added.
121 boolean addLinguServiceManagerListener(
122 [in] com::sun::star::lang::XEventListener xListener );
124 //-------------------------------------------------------------------------
125 /** removes a listener from the list of event listeners.
127 @returns
128 <TRUE/> if the listener was succesfully removed, <FALSE/> otherwise.
130 @param xListener
131 the listener to be removed.
133 boolean removeLinguServiceManagerListener(
134 [in] com::sun::star::lang::XEventListener xListener );
136 //-------------------------------------------------------------------------
138 @returns
139 the list of implementation names of the available services.
141 @param aServiceName
142 the name of the service requesting the list of available
143 implementations.
145 @param aLocale
146 the language used to query the list of available implementations.
148 sequence< string > getAvailableServices(
149 [in] string aServiceName,
150 [in] com::sun::star::lang::Locale aLocale );
152 //-------------------------------------------------------------------------
153 /** sets the list of service implementations to be used for a
154 given service and language.
156 @param aServiceName
157 the name of the service to set the list of implementations
158 to be used.
160 @param aLocale
161 the language to set the list.
163 @param aServiceImplNames
164 the name of the service to set the list.
166 void setConfiguredServices(
167 [in] string aServiceName,
168 [in] com::sun::star::lang::Locale aLocale,
169 [in] sequence< string > aServiceImplNames );
171 //-------------------------------------------------------------------------
172 /** queries the list of service implementations to be used for a
173 given service and language.
175 @returns
176 the list of implementation names of the services to be used.
178 @param aServiceName
179 the name of the service to get queried.
181 @param aLocale
182 the language to get queried.
184 sequence< string > getConfiguredServices(
185 [in] string aServiceName,
186 [in] com::sun::star::lang::Locale aLocale );
190 //=============================================================================
192 }; }; }; };
194 #endif