1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir#ifndef __com_sun_star_linguistic2_XSpellChecker_idl__ 28*cdf0e10cSrcweir#define __com_sun_star_linguistic2_XSpellChecker_idl__ 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir#ifndef __com_sun_star_linguistic2_XSupportedLocales_idl__ 31*cdf0e10cSrcweir#include <com/sun/star/linguistic2/XSupportedLocales.idl> 32*cdf0e10cSrcweir#endif 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 35*cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl> 36*cdf0e10cSrcweir#endif 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir#ifndef __com_sun_star_linguistic2_XDictionaryList_idl__ 39*cdf0e10cSrcweir#include <com/sun/star/linguistic2/XDictionaryList.idl> 40*cdf0e10cSrcweir#endif 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir#ifndef __com_sun_star_linguistic2_XSpellAlternatives_idl__ 43*cdf0e10cSrcweir#include <com/sun/star/linguistic2/XSpellAlternatives.idl> 44*cdf0e10cSrcweir#endif 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_idl_ 47*cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValues.idl> 48*cdf0e10cSrcweir#endif 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir//============================================================================= 52*cdf0e10cSrcweir 53*cdf0e10cSrcweirmodule com { module sun { module star { module linguistic2 { 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir//============================================================================= 56*cdf0e10cSrcweir/** This interface allows for spellchecking. 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir <P>It is possible to simply check if a word, in a specified language, 59*cdf0e10cSrcweir is correct or additionally, if it was misspelled, some proposals 60*cdf0e10cSrcweir how it might be correctly written.</P> 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir @see <type scope="com::sun::star::linguistic2">XSupportedLocales</type> 63*cdf0e10cSrcweir*/ 64*cdf0e10cSrcweirpublished interface XSpellChecker : com::sun::star::linguistic2::XSupportedLocales 65*cdf0e10cSrcweir{ 66*cdf0e10cSrcweir //------------------------------------------------------------------------- 67*cdf0e10cSrcweir /** checks if a word is spelled correctly in a given language. 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir @returns 70*cdf0e10cSrcweir <TRUE/> if the word is spelled correctly using 71*cdf0e10cSrcweir the specified language, <FALSE/> otherwise. 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir @param aWord 74*cdf0e10cSrcweir the word to be checked. 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir @param aLocale 77*cdf0e10cSrcweir the Locale (language) to be used. 78*cdf0e10cSrcweir If the Locale is empty, the word is spelled correctly by 79*cdf0e10cSrcweir definition. 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir <P>If <var>aLocale</var> is not supported an 82*cdf0e10cSrcweir IllegalArgumentException exception is raised.</P> 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir @param aProperties 85*cdf0e10cSrcweir provides property values to be used for this function call only. 86*cdf0e10cSrcweir It is usually empty in order to use the default values supplied with 87*cdf0e10cSrcweir the property set. 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir @see <type scope="com::sun::star::lang">Locale</type> 90*cdf0e10cSrcweir */ 91*cdf0e10cSrcweir boolean isValid( 92*cdf0e10cSrcweir [in] string aWord, 93*cdf0e10cSrcweir [in] com::sun::star::lang::Locale aLocale, 94*cdf0e10cSrcweir [in] com::sun::star::beans::PropertyValues aProperties ) 95*cdf0e10cSrcweir raises( com::sun::star::lang::IllegalArgumentException ); 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir //------------------------------------------------------------------------- 98*cdf0e10cSrcweir /** This method checks if a word is spelled correctly in a given 99*cdf0e10cSrcweir language. 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir @returns 102*cdf0e10cSrcweir <NULL/> if <var>aWord</var> is spelled correctly using 103*cdf0e10cSrcweir <var>aLocale</var>. Otherwise, an XSpellAlternatives 104*cdf0e10cSrcweir object with information about the reason of failure and, if available, 105*cdf0e10cSrcweir proposals for spelling alternatives will be returned. 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir @param aWord 108*cdf0e10cSrcweir the word to be checked. 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir @param aLocale 111*cdf0e10cSrcweir the language to be used. 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir <P>If the language is not supported an IllegalArgumentException exception is raised. 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir @param aProperties 116*cdf0e10cSrcweir provides property values to be used for this function call only. 117*cdf0e10cSrcweir It is usually empty in order to use the default values supplied with 118*cdf0e10cSrcweir the property set. 119*cdf0e10cSrcweir exception is raised.</P> 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir @see <type scope="com::sun::star::linguistic2">XSpellAlternatives</type> 122*cdf0e10cSrcweir @see <type scope="com::sun::star::lang">Locale</type> 123*cdf0e10cSrcweir */ 124*cdf0e10cSrcweir com::sun::star::linguistic2::XSpellAlternatives spell( 125*cdf0e10cSrcweir [in] string aWord, 126*cdf0e10cSrcweir [in] com::sun::star::lang::Locale aLocale, 127*cdf0e10cSrcweir [in] com::sun::star::beans::PropertyValues aProperties ) 128*cdf0e10cSrcweir raises( com::sun::star::lang::IllegalArgumentException ); 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir}; 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir//============================================================================= 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir}; }; }; }; 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir#endif 137*cdf0e10cSrcweir 138