1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_linguistic2_XSpellChecker_idl__
24#define __com_sun_star_linguistic2_XSpellChecker_idl__
25
26#ifndef __com_sun_star_linguistic2_XSupportedLocales_idl__
27#include <com/sun/star/linguistic2/XSupportedLocales.idl>
28#endif
29
30#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
31#include <com/sun/star/lang/IllegalArgumentException.idl>
32#endif
33
34#ifndef __com_sun_star_linguistic2_XDictionaryList_idl__
35#include <com/sun/star/linguistic2/XDictionaryList.idl>
36#endif
37
38#ifndef __com_sun_star_linguistic2_XSpellAlternatives_idl__
39#include <com/sun/star/linguistic2/XSpellAlternatives.idl>
40#endif
41
42#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_idl_
43#include <com/sun/star/beans/PropertyValues.idl>
44#endif
45
46
47//=============================================================================
48
49module com { module sun { module star { module linguistic2 {
50
51//=============================================================================
52/** This interface allows for spellchecking.
53
54	<P>It is possible to simply check if a word, in a specified language,
55	is correct or additionally, if it was misspelled, some proposals
56	how it might be correctly written.</P>
57
58    @see    <type scope="com::sun::star::linguistic2">XSupportedLocales</type>
59*/
60published interface XSpellChecker : com::sun::star::linguistic2::XSupportedLocales
61{
62	//-------------------------------------------------------------------------
63	/** checks if a word is spelled correctly in a given language.
64
65		@returns
66			<TRUE/> if the word is spelled correctly using
67	 		the specified language, <FALSE/> otherwise.
68
69		@param	aWord
70			the word to be checked.
71
72		@param aLocale
73			the Locale (language) to be used.
74			If the Locale is empty, the word is spelled correctly by
75			definition.
76
77			<P>If <var>aLocale</var> is not supported an
78			IllegalArgumentException exception is raised.</P>
79
80		@param aProperties
81			provides property values to be used for this function call only.
82			It is usually empty in order to use the default values supplied with
83			the property set.
84
85        @see    <type scope="com::sun::star::lang">Locale</type>
86	*/
87	boolean isValid(
88			[in] string aWord,
89			[in] com::sun::star::lang::Locale aLocale,
90			[in] com::sun::star::beans::PropertyValues aProperties )
91		raises( com::sun::star::lang::IllegalArgumentException );
92
93	//-------------------------------------------------------------------------
94	/** This method checks if a word is spelled correctly in a given
95		language.
96
97		@returns
98			<NULL/> if <var>aWord</var> is spelled correctly using
99	 		<var>aLocale</var>. Otherwise, an XSpellAlternatives
100	 		object with information about the reason of failure and, if available,
101	 		proposals for spelling alternatives will be returned.
102
103		@param	aWord
104			the word to be checked.
105
106		@param aLocale
107			the language to be used.
108
109			<P>If the language is not supported an IllegalArgumentException exception is raised.
110
111		@param aProperties
112			provides property values to be used for this function call only.
113			It is usually empty in order to use the default values supplied with
114			the property set.
115		exception is raised.</P>
116
117        @see    <type scope="com::sun::star::linguistic2">XSpellAlternatives</type>
118        @see    <type scope="com::sun::star::lang">Locale</type>
119	*/
120	com::sun::star::linguistic2::XSpellAlternatives spell(
121			[in] string aWord,
122			[in] com::sun::star::lang::Locale aLocale,
123			[in] com::sun::star::beans::PropertyValues aProperties )
124		raises( com::sun::star::lang::IllegalArgumentException );
125
126};
127
128//=============================================================================
129
130}; }; }; };
131
132#endif
133
134