1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
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.
14 *
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).
20 *
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.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_linguistic2_XSpellChecker_idl__
28#define __com_sun_star_linguistic2_XSpellChecker_idl__
29
30#ifndef __com_sun_star_linguistic2_XSupportedLocales_idl__
31#include <com/sun/star/linguistic2/XSupportedLocales.idl>
32#endif
33
34#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
35#include <com/sun/star/lang/IllegalArgumentException.idl>
36#endif
37
38#ifndef __com_sun_star_linguistic2_XDictionaryList_idl__
39#include <com/sun/star/linguistic2/XDictionaryList.idl>
40#endif
41
42#ifndef __com_sun_star_linguistic2_XSpellAlternatives_idl__
43#include <com/sun/star/linguistic2/XSpellAlternatives.idl>
44#endif
45
46#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_idl_
47#include <com/sun/star/beans/PropertyValues.idl>
48#endif
49
50
51//=============================================================================
52
53module com { module sun { module star { module linguistic2 {
54
55//=============================================================================
56/** This interface allows for spellchecking.
57
58	<P>It is possible to simply check if a word, in a specified language,
59	is correct or additionally, if it was misspelled, some proposals
60	how it might be correctly written.</P>
61
62    @see    <type scope="com::sun::star::linguistic2">XSupportedLocales</type>
63*/
64published interface XSpellChecker : com::sun::star::linguistic2::XSupportedLocales
65{
66	//-------------------------------------------------------------------------
67	/** checks if a word is spelled correctly in a given language.
68
69		@returns
70			<TRUE/> if the word is spelled correctly using
71	 		the specified language, <FALSE/> otherwise.
72
73		@param	aWord
74			the word to be checked.
75
76		@param aLocale
77			the Locale (language) to be used.
78			If the Locale is empty, the word is spelled correctly by
79			definition.
80
81			<P>If <var>aLocale</var> is not supported an
82			IllegalArgumentException exception is raised.</P>
83
84		@param aProperties
85			provides property values to be used for this function call only.
86			It is usually empty in order to use the default values supplied with
87			the property set.
88
89        @see    <type scope="com::sun::star::lang">Locale</type>
90	*/
91	boolean isValid(
92			[in] string aWord,
93			[in] com::sun::star::lang::Locale aLocale,
94			[in] com::sun::star::beans::PropertyValues aProperties )
95		raises( com::sun::star::lang::IllegalArgumentException );
96
97	//-------------------------------------------------------------------------
98	/** This method checks if a word is spelled correctly in a given
99		language.
100
101		@returns
102			<NULL/> if <var>aWord</var> is spelled correctly using
103	 		<var>aLocale</var>. Otherwise, an XSpellAlternatives
104	 		object with information about the reason of failure and, if available,
105	 		proposals for spelling alternatives will be returned.
106
107		@param	aWord
108			the word to be checked.
109
110		@param aLocale
111			the language to be used.
112
113			<P>If the language is not supported an IllegalArgumentException exception is raised.
114
115		@param aProperties
116			provides property values to be used for this function call only.
117			It is usually empty in order to use the default values supplied with
118			the property set.
119		exception is raised.</P>
120
121        @see    <type scope="com::sun::star::linguistic2">XSpellAlternatives</type>
122        @see    <type scope="com::sun::star::lang">Locale</type>
123	*/
124	com::sun::star::linguistic2::XSpellAlternatives spell(
125			[in] string aWord,
126			[in] com::sun::star::lang::Locale aLocale,
127			[in] com::sun::star::beans::PropertyValues aProperties )
128		raises( com::sun::star::lang::IllegalArgumentException );
129
130};
131
132//=============================================================================
133
134}; }; }; };
135
136#endif
137
138