1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XLinguServiceManager.idl,v $
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
>
38 #ifndef __com_sun_star_linguistic2_XHyphenator_idl__
39 #include
<com
/sun
/star
/linguistic2
/XHyphenator.idl
>
42 #ifndef __com_sun_star_linguistic2_XThesaurus_idl__
43 #include
<com
/sun
/star
/linguistic2
/XThesaurus.idl
>
46 #ifndef __com_sun_star_lang_XEventListener_idl__
47 #include
<com
/sun
/star
/lang
/XEventListener.idl
>
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>
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.
75 <P> For the thesaurus, the behavior is the same when no meaning was found.
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 //-------------------------------------------------------------------------
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 //-------------------------------------------------------------------------
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 //-------------------------------------------------------------------------
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>
114 <type scope="com::sun::star::linguistic2">XLinguServiceEventListener</type>
119 <TRUE/> if the listener was succesfully added, <FALSE/> otherwise.
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.
131 <TRUE/> if the listener was succesfully removed, <FALSE/> otherwise.
134 the listener to be removed.
136 boolean removeLinguServiceManagerListener
(
137 [in] com
::sun
::star
::lang
::XEventListener xListener
);
139 //-------------------------------------------------------------------------
142 the list of implementation names of the available services.
145 the name of the service requesting the list of available
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.
160 the name of the service to set the list of implementations
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.
179 the list of implementation names of the services to be used.
182 the name of the service to get queried.
185 the language to get queried.
187 sequence
< string > getConfiguredServices
(
188 [in] string aServiceName
,
189 [in] com
::sun
::star
::lang
::Locale aLocale
);
193 //=============================================================================