merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / linguistic2 / XLinguServiceManager.idl
blob4c690a0839ba44e426c4cbd05ba1b19035b87321
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XLinguServiceManager.idl,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_linguistic2_XLinguServiceManager_idl__
31 #define __com_sun_star_linguistic2_XLinguServiceManager_idl__
34 #ifndef __com_sun_star_linguistic2_XSpellChecker_idl__
35 #include <com/sun/star/linguistic2/XSpellChecker.idl>
36 #endif
38 #ifndef __com_sun_star_linguistic2_XHyphenator_idl__
39 #include <com/sun/star/linguistic2/XHyphenator.idl>
40 #endif
42 #ifndef __com_sun_star_linguistic2_XThesaurus_idl__
43 #include <com/sun/star/linguistic2/XThesaurus.idl>
44 #endif
46 #ifndef __com_sun_star_lang_XEventListener_idl__
47 #include <com/sun/star/lang/XEventListener.idl>
48 #endif
50 //=============================================================================
52 module com { module sun { module star { module linguistic2 {
54 //=============================================================================
55 /** the basic interface to be used to access linguistic functionality.
57 <P>This interface is used to access spellchecker, hyphenator, and
58 thesaurus functionality.
59 Additionally, it can query what implementations of those services are
60 available (for specific languages or in general).
61 It can select and query which of those implementations should
62 be used for a specific language.</P>
64 <P>
65 For spellchecking and thesaurus, the order in the list defines the order
66 of creation/usage of those services.
67 That is, if the first spellchecker implementation does not recognize
68 the given word as correct, the second service implementation for that
69 language is created and gets queried. If that one fails, the third one
70 gets created and queried and so on.
71 This chain stops if an implementation reports the word as correct or the
72 end of the list is reached, in which case the word is reported as incorrect.
73 </P>
75 <P> For the thesaurus, the behavior is the same when no meaning was found.
76 </P>
78 @see <type scope="com::sun::star::linguistic2">SpellChecker</type>
79 @see <type scope="com::sun::star::linguistic2">Hyphenator</type>
80 @see <type scope="com::sun::star::linguistic2">Thesaurus</type>
82 published interface XLinguServiceManager : com::sun::star::uno::XInterface
84 //-------------------------------------------------------------------------
85 /**
86 @returns
87 the <type scope="com::sun::star::linguistic2">XSpellChecker</type>
88 interface to be used for spellchecking.
90 com::sun::star::linguistic2::XSpellChecker getSpellChecker();
92 //-------------------------------------------------------------------------
93 /**
94 @returns
95 the <type scope="com::sun::star::linguistic2">XHyphenator</type>
96 interface to be used for hyphenation.
98 com::sun::star::linguistic2::XHyphenator getHyphenator();
100 //-------------------------------------------------------------------------
102 @returns
103 the <type scope="com::sun::star::linguistic2">XThesaurus</type>
104 interface to be used for thesaurus functionality.
106 com::sun::star::linguistic2::XThesaurus getThesaurus();
108 //-------------------------------------------------------------------------
109 /** adds a listener to the list of event listeners.
111 <P>The listeners may support one or both of
112 <type scope="com::sun::star::linguistic2">XDictionaryEventListener</type>
113 and
114 <type scope="com::sun::star::linguistic2">XLinguServiceEventListener</type>
115 interfaces.
116 </P>
118 @returns
119 <TRUE/> if the listener was succesfully added, <FALSE/> otherwise.
121 @param xListener
122 the listener to be added.
124 boolean addLinguServiceManagerListener(
125 [in] com::sun::star::lang::XEventListener xListener );
127 //-------------------------------------------------------------------------
128 /** removes a listener from the list of event listeners.
130 @returns
131 <TRUE/> if the listener was succesfully removed, <FALSE/> otherwise.
133 @param xListener
134 the listener to be removed.
136 boolean removeLinguServiceManagerListener(
137 [in] com::sun::star::lang::XEventListener xListener );
139 //-------------------------------------------------------------------------
141 @returns
142 the list of implementation names of the available services.
144 @param aServiceName
145 the name of the service requesting the list of available
146 implementations.
148 @param aLocale
149 the language used to query the list of available implementations.
151 sequence< string > getAvailableServices(
152 [in] string aServiceName,
153 [in] com::sun::star::lang::Locale aLocale );
155 //-------------------------------------------------------------------------
156 /** sets the list of service implementations to be used for a
157 given service and language.
159 @param aServiceName
160 the name of the service to set the list of implementations
161 to be used.
163 @param aLocale
164 the language to set the list.
166 @param aServiceImplNames
167 the name of the service to set the list.
169 void setConfiguredServices(
170 [in] string aServiceName,
171 [in] com::sun::star::lang::Locale aLocale,
172 [in] sequence< string > aServiceImplNames );
174 //-------------------------------------------------------------------------
175 /** queries the list of service implementations to be used for a
176 given service and language.
178 @returns
179 the list of implementation names of the services to be used.
181 @param aServiceName
182 the name of the service to get queried.
184 @param aLocale
185 the language to get queried.
187 sequence< string > getConfiguredServices(
188 [in] string aServiceName,
189 [in] com::sun::star::lang::Locale aLocale );
193 //=============================================================================
195 }; }; }; };
197 #endif