Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / linguistic2 / XSpellChecker.idl
blob501343f9454e8d51109c256dc2d1c3d4ae7d3a03
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: XSpellChecker.idl,v $
10 * $Revision: 1.11 $
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_XSpellChecker_idl__
31 #define __com_sun_star_linguistic2_XSpellChecker_idl__
33 #ifndef __com_sun_star_linguistic2_XSupportedLocales_idl__
34 #include <com/sun/star/linguistic2/XSupportedLocales.idl>
35 #endif
37 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
38 #include <com/sun/star/lang/IllegalArgumentException.idl>
39 #endif
41 #ifndef __com_sun_star_linguistic2_XDictionaryList_idl__
42 #include <com/sun/star/linguistic2/XDictionaryList.idl>
43 #endif
45 #ifndef __com_sun_star_linguistic2_XSpellAlternatives_idl__
46 #include <com/sun/star/linguistic2/XSpellAlternatives.idl>
47 #endif
49 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_idl_
50 #include <com/sun/star/beans/PropertyValues.idl>
51 #endif
54 //=============================================================================
56 module com { module sun { module star { module linguistic2 {
58 //=============================================================================
59 /** This interface allows for spellchecking.
61 <P>It is possible to simply check if a word, in a specified language,
62 is correct or additionally, if it was misspelled, some proposals
63 how it might be correctly written.</P>
65 @see <type scope="com::sun::star::linguistic2">XSupportedLocales</type>
67 published interface XSpellChecker : com::sun::star::linguistic2::XSupportedLocales
69 //-------------------------------------------------------------------------
70 /** checks if a word is spelled correctly in a given language.
72 @returns
73 <TRUE/> if the word is spelled correctly using
74 the specified language, <FALSE/> otherwise.
76 @param aWord
77 the word to be checked.
79 @param aLocale
80 the Locale (language) to be used.
81 If the Locale is empty, the word is spelled correctly by
82 definition.
84 <P>If <var>aLocale</var> is not supported an
85 IllegalArgumentException exception is raised.</P>
87 @param aProperties
88 provides property values to be used for this function call only.
89 It is usually empty in order to use the default values supplied with
90 the property set.
92 @see <type scope="com::sun::star::lang">Locale</type>
94 boolean isValid(
95 [in] string aWord,
96 [in] com::sun::star::lang::Locale aLocale,
97 [in] com::sun::star::beans::PropertyValues aProperties )
98 raises( com::sun::star::lang::IllegalArgumentException );
100 //-------------------------------------------------------------------------
101 /** This method checks if a word is spelled correctly in a given
102 language.
104 @returns
105 <NULL/> if <var>aWord</var> is spelled correctly using
106 <var>aLocale</var>. Otherwise, an XSpellAlternatives
107 object with information about the reason of failure and, if available,
108 proposals for spelling alternatives will be returned.
110 @param aWord
111 the word to be checked.
113 @param aLocale
114 the language to be used.
116 <P>If the language is not supported an IllegalArgumentException exception is raised.
118 @param aProperties
119 provides property values to be used for this function call only.
120 It is usually empty in order to use the default values supplied with
121 the property set.
122 exception is raised.</P>
124 @see <type scope="com::sun::star::linguistic2">XSpellAlternatives</type>
125 @see <type scope="com::sun::star::lang">Locale</type>
127 com::sun::star::linguistic2::XSpellAlternatives spell(
128 [in] string aWord,
129 [in] com::sun::star::lang::Locale aLocale,
130 [in] com::sun::star::beans::PropertyValues aProperties )
131 raises( com::sun::star::lang::IllegalArgumentException );
135 //=============================================================================
137 }; }; }; };
139 #endif