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 .
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>
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.
44 <P> For the thesaurus, the behavior is the same when no meaning was found.
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
55 the com::sun::star::linguistic2::XSpellChecker
56 interface to be used for spell checking.
58 com
::sun
::star
::linguistic2
::XSpellChecker getSpellChecker
();
62 the com::sun::star::linguistic2::XHyphenator
63 interface to be used for hyphenation.
65 com
::sun
::star
::linguistic2
::XHyphenator getHyphenator
();
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
79 com::sun::star::linguistic2::XLinguServiceEventListener
84 `TRUE` if the listener was successfully added, `FALSE` otherwise.
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.
95 `TRUE` if the listener was successfully removed, `FALSE` otherwise.
98 the listener to be removed.
100 boolean removeLinguServiceManagerListener
(
101 [in] com
::sun
::star
::lang
::XEventListener xListener
);
105 the list of implementation names of the available services.
108 the name of the service requesting the list of available
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.
122 the name of the service to set the list of implementations
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.
140 the list of implementation names of the services to be used.
143 the name of the service to get queried.
146 the language to get queried.
148 sequence
< string > getConfiguredServices
(
149 [in] string aServiceName
,
150 [in] com
::sun
::star
::lang
::Locale aLocale
);
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */