Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / linguistic2 / XSpellChecker.idl
blob8fb1525a7b2350ae7b96588096c7eee8d77f3a13
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef __com_sun_star_linguistic2_XSpellChecker_idl__
20 #define __com_sun_star_linguistic2_XSpellChecker_idl__
22 #include <com/sun/star/linguistic2/XSupportedLocales.idl>
23 #include <com/sun/star/lang/IllegalArgumentException.idl>
24 #include <com/sun/star/linguistic2/XDictionaryList.idl>
25 #include <com/sun/star/linguistic2/XSpellAlternatives.idl>
26 #include <com/sun/star/beans/PropertyValues.idl>
29 module com { module sun { module star { module linguistic2 {
31 /** This interface allows for spell checking.
33 <P>It is possible to simply check if a word, in a specified language,
34 is correct or additionally, if it was misspelled, some proposals
35 how it might be correctly written.</P>
37 @see com::sun::star::linguistic2::XSupportedLocales
39 published interface XSpellChecker : com::sun::star::linguistic2::XSupportedLocales
41 /** checks if a word is spelled correctly in a given language.
43 @returns
44 `TRUE` if the word is spelled correctly using
45 the specified language, `FALSE` otherwise.
47 @param aWord
48 the word to be checked.
50 @param aLocale
51 the Locale (language) to be used.
52 If the Locale is empty, the word is spelled correctly by
53 definition.
55 <P>If <var>aLocale</var> is not supported an
56 IllegalArgumentException exception is raised.</P>
58 @param aProperties
59 provides property values to be used for this function call only.
60 It is usually empty in order to use the default values supplied with
61 the property set.
63 @see com::sun::star::lang::Locale
65 boolean isValid(
66 [in] string aWord,
67 [in] com::sun::star::lang::Locale aLocale,
68 [in] com::sun::star::beans::PropertyValues aProperties )
69 raises( com::sun::star::lang::IllegalArgumentException );
71 /** This method checks if a word is spelled correctly in a given
72 language.
74 @returns
75 `NULL` if <var>aWord</var> is spelled correctly using
76 <var>aLocale</var>. Otherwise, an XSpellAlternatives
77 object with information about the reason of failure and, if available,
78 proposals for spelling alternatives will be returned.
80 @param aWord
81 the word to be checked.
83 @param aLocale
84 the language to be used.
86 <P>If the language is not supported an IllegalArgumentException exception is raised.
88 @param aProperties
89 provides property values to be used for this function call only.
90 It is usually empty in order to use the default values supplied with
91 the property set.
92 exception is raised.</P>
94 @see com::sun::star::linguistic2::XSpellAlternatives
95 @see com::sun::star::lang::Locale
97 com::sun::star::linguistic2::XSpellAlternatives spell(
98 [in] string aWord,
99 [in] com::sun::star::lang::Locale aLocale,
100 [in] com::sun::star::beans::PropertyValues aProperties )
101 raises( com::sun::star::lang::IllegalArgumentException );
106 }; }; }; };
108 #endif
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */