diff options
Diffstat (limited to 'offapi/com/sun/star/linguistic2')
13 files changed, 448 insertions, 165 deletions
diff --git a/offapi/com/sun/star/linguistic2/Dictionary.idl b/offapi/com/sun/star/linguistic2/Dictionary.idl new file mode 100644 index 000000000000..4687db6af15b --- /dev/null +++ b/offapi/com/sun/star/linguistic2/Dictionary.idl @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: Dictionary.idl,v $ + * $Revision: 1.1.2.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_linguistic2_Dictionary_idl__ +#define __com_sun_star_linguistic2_Dictionary_idl__ + +#ifndef __com_sun_star_linguistic2_XDictionary_idl__ +#include <com/sun/star/linguistic2/XDictionary.idl> +#endif + +#ifndef __com_sun_star_linguistic2_XSearchableDictionary_idl__ +#include <com/sun/star/linguistic2/XSearchableDictionary.idl> +#endif + +#ifndef __com_sun_star_util_XFlushable_idl__ +#include <com/sun/star/util/XFlushable.idl> +#endif + +#ifndef __com_sun_star_frame_XStorable_idl__ +#include <com/sun/star/frame/XStorable.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module linguistic2 { + +//============================================================================= +/** represents a dictionary used for spell checking and hyphenation. + + + @see com::sun::star::linguistic2::DictionaryList + @see com::sun::star::linguistic2::XSearchableDictionaryList + + @since OOo 3.01 +*/ +service Dictionary +{ + /** to access the dictionary functionality. + */ + interface com::sun::star::linguistic2::XDictionary; + + /** provide search for similar words functionality. + */ + [optional] interface com::sun::star::linguistic2::XSearchableDictionary; + + /** to save the dictionary content to file + + <p>storeAsURL and storeToURL are empty implementations since the dictionaries are expected + to be found in specific locations</p> + */ + [optional] interface com::sun::star::frame::XStorable; + +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/linguistic2/LinguProperties.idl b/offapi/com/sun/star/linguistic2/LinguProperties.idl index 27e561c47baa..3d57f7514221 100644 --- a/offapi/com/sun/star/linguistic2/LinguProperties.idl +++ b/offapi/com/sun/star/linguistic2/LinguProperties.idl @@ -64,6 +64,9 @@ published service LinguProperties /** defines whether new German spelling rules should be used for German text or not when doing spellchecking or hyphenation, or using the thesaurus. + + @deprecated + @since OOo 3.01 */ [property] boolean IsGermanPreReform; @@ -139,12 +142,18 @@ published service LinguProperties //------------------------------------------------------------------------- /** indicates whether the markings for incorrectly spelled text should be hidden or not. + + @deprecated + @since OOo 3.01 */ [property] boolean IsSpellHide; //------------------------------------------------------------------------- /** indicates if spellchecking should be performed in all available languages. + + @deprecated + @since OOo 3.01 */ [property] boolean IsSpellInAllLanguages; diff --git a/offapi/com/sun/star/linguistic2/LinguServiceEventFlags.idl b/offapi/com/sun/star/linguistic2/LinguServiceEventFlags.idl index da245aaa5464..7f4d6d3a1524 100644 --- a/offapi/com/sun/star/linguistic2/LinguServiceEventFlags.idl +++ b/offapi/com/sun/star/linguistic2/LinguServiceEventFlags.idl @@ -60,9 +60,11 @@ published constants LinguServiceEventFlags const short HYPHENATE_AGAIN = 4; //------------------------------------------------------------------------- - /** The results for grammar checking may have changed. + /** Request new proofreading of the document + + @since OOo 3.01 */ - const short GRAMMAR_CHECK_AGAIN = 5; + const short PROOFREAD_AGAIN = 8; }; diff --git a/offapi/com/sun/star/linguistic2/Proofreader.idl b/offapi/com/sun/star/linguistic2/Proofreader.idl new file mode 100644 index 000000000000..45bf20e2d700 --- /dev/null +++ b/offapi/com/sun/star/linguistic2/Proofreader.idl @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: Proofreader.idl,v $ + * $Revision: 1.1.2.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_linguistic2_Proofreader_idl__ +#define __com_sun_star_linguistic2_Proofreader_idl__ + +//============================================================================ + +module com { module sun { module star { module linguistic2 { + interface XProofreader; }; +}; }; }; + +//============================================================================ + +module com { module sun { module star { module linguistic2 { + +//============================================================================ + +/** provides a proofreader (often known as grammar checker) for text + + <p>An implementation of this service will receive text and has to identify + the sentence end and report all errors found.</p> + + <p>An implementation of this service is not limited to grammar checking at all. + It might also check style, used terms etc. Basically it can check every + aspect of a single sentence. Since the text provided is always the complete + paragraph it can also choose to analyze the context of the sentence currently + required to be checked. However error reports need to be limited to the + current sentence.</p> + + @since OOo 3.0.1 + */ + +service Proofreader : XProofreader {}; + +//============================================================================ + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/linguistic2/GrammarCheckingIterator.idl b/offapi/com/sun/star/linguistic2/ProofreadingIterator.idl index 58ceccd5970a..382b6da455fd 100644 --- a/offapi/com/sun/star/linguistic2/GrammarCheckingIterator.idl +++ b/offapi/com/sun/star/linguistic2/ProofreadingIterator.idl @@ -6,8 +6,8 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: GrammarCheckingIterator.idl,v $ - * $Revision: 1.3 $ + * $RCSfile: ProofreadingIterator.idl,v $ + * $Revision: 1.1.2.1 $ * * This file is part of OpenOffice.org. * @@ -27,13 +27,13 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef __com_sun_star_linguistic2_GrammarCheckingIterator_idl__ -#define __com_sun_star_linguistic2_GrammarCheckingIterator_idl__ +#ifndef __com_sun_star_linguistic2_ProofreadingIterator_idl__ +#define __com_sun_star_linguistic2_ProofreadingIterator_idl__ //============================================================================ module com { module sun { module star { module linguistic2 { - interface XGrammarCheckingIterator; }; + interface XProofreadingIterator; }; }; }; }; //============================================================================ @@ -42,16 +42,16 @@ module com { module sun { module star { module linguistic2 { //============================================================================ -/** provides a grammar checking iterator +/** provides a proofreading iterator <p>An implementation of this service acts as a mediator between documents - and grammar checkers. It's responsible to process requests to grammar - check text portions.</p> + and proofreaders (often called just grammar checkers). It is responsible to + process requests for proofreading text portions.</p> - @since OOo 3.0 + @since OOo 3.0.1 */ -service GrammarCheckingIterator : XGrammarCheckingIterator {}; +service ProofreadingIterator : XProofreadingIterator {}; //============================================================================ diff --git a/offapi/com/sun/star/linguistic2/GrammarCheckingResult.idl b/offapi/com/sun/star/linguistic2/ProofreadingResult.idl index 892dfb999adc..d00a4ed8f8fb 100644 --- a/offapi/com/sun/star/linguistic2/GrammarCheckingResult.idl +++ b/offapi/com/sun/star/linguistic2/ProofreadingResult.idl @@ -6,8 +6,8 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: GrammarCheckingResult.idl,v $ - * $Revision: 1.4 $ + * $RCSfile: ProofreadingResult.idl,v $ + * $Revision: 1.1.2.2 $ * * This file is part of OpenOffice.org. * @@ -27,8 +27,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef __com_sun_star_linguistic2_GrammarCheckingResult_idl__ -#define __com_sun_star_linguistic2_GrammarCheckingResult_idl__ +#ifndef __com_sun_star_linguistic2_ProofreadingResult_idl__ +#define __com_sun_star_linguistic2_ProofreadingResult_idl__ #ifndef __com_sun_star_text_XFlatParagraph_idl__ #include <com/sun/star/text/XFlatParagraph.idl> @@ -38,13 +38,14 @@ #include <com/sun/star/lang/Locale.idl> #endif -#ifndef __com_sun_star_linguistic2_SingleGrammarError_idl__ -#include <com/sun/star/linguistic2/SingleGrammarError.idl> +#ifndef __com_sun_star_linguistic2_SingleProofreadingError_idl__ +#include <com/sun/star/linguistic2/SingleProofreadingError.idl> +#endif + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_idl_ +#include <com/sun/star/beans/PropertyValue.idl> #endif -//#ifndef __com_sun_star_linguistic2_XGrammarChecker_idl__ -//#include <com/sun/star/linguistic2/XGrammarChecker.idl> -//#endif //============================================================================= @@ -52,13 +53,17 @@ module com { module sun { module star { module linguistic2 { // forward declaration -interface XGrammarChecker; +interface XProofreader; //============================================================================= -struct GrammarCheckingResult +/** holds the results from proofreading a sentence. + + @since OOo 3.01 +*/ +struct ProofreadingResult { // the document ID - long nDocumentId; + string aDocumentIdentifier; // the paragraph that was checked com::sun::star::text::XFlatParagraph xFlatParagraph; @@ -69,17 +74,25 @@ struct GrammarCheckingResult // language used for checking com::sun::star::lang::Locale aLocale; - // the start of sentence position passed to the grammar checker - long nStartOfSentencePos; + // the start of sentence position passed to the proofreader + long nStartOfSentencePosition; - // the end of sentence position found by the grammar checker - long nEndOfSentencePos; + // the end of sentence position found by the proofreader + // That is the index following the character terminating the sentence. + long nBehindEndOfSentencePosition; + + // the start of the next sentence to be checked. + // Basically obtained by skipping all white spaces after the end of sentence position. + long nStartOfNextSentencePosition; // the list of errors - sequence< com::sun::star::linguistic2::SingleGrammarError > aGrammarErrors; + sequence< com::sun::star::linguistic2::SingleProofreadingError > aErrors; + + // a list of properties + sequence< com::sun::star::beans::PropertyValue > aProperties; - // reference to the specific grammar checker implementation that reported the error - com::sun::star::linguistic2::XGrammarChecker xGrammarChecker; + // reference to the specific proofreader implementation that reported the error + com::sun::star::linguistic2::XProofreader xProofreader; }; //============================================================================= diff --git a/offapi/com/sun/star/linguistic2/SingleGrammarError.idl b/offapi/com/sun/star/linguistic2/SingleProofreadingError.idl index 75c1321ffe40..b16ca8711d6e 100644 --- a/offapi/com/sun/star/linguistic2/SingleGrammarError.idl +++ b/offapi/com/sun/star/linguistic2/SingleProofreadingError.idl @@ -6,8 +6,8 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SingleGrammarError.idl,v $ - * $Revision: 1.4 $ + * $RCSfile: SingleProofreadingError.idl,v $ + * $Revision: 1.1.2.2 $ * * This file is part of OpenOffice.org. * @@ -27,19 +27,27 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef __com_sun_star_linguistic2_SingleGrammarError_idl__ -#define __com_sun_star_linguistic2_SingleGrammarError_idl__ +#ifndef __com_sun_star_linguistic2_SingleProofreadingError_idl__ +#define __com_sun_star_linguistic2_SingleProofreadingError_idl__ #ifndef __com_sun_star_lang_Locale_idl__ #include <com/sun/star/lang/Locale.idl> #endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_idl_ +#include <com/sun/star/beans/PropertyValue.idl> +#endif + //============================================================================= module com { module sun { module star { module linguistic2 { //============================================================================= -struct SingleGrammarError +/** holds a single error found by the proofreader. + + @since OOo 3.01 +*/ +struct SingleProofreadingError { // start index of the error text // indicating the text to be replaced if suggestions are applied @@ -49,23 +57,24 @@ struct SingleGrammarError // indicating the text to be replaced if suggestions are applied long nErrorLength; - // definitely wrong, maybe wrong... - long nErrorLevel; - + // as in com.sun.star.text.TextMarkupType long nErrorType; - // short error description text + // the id of the rule that this error is violating + string aRuleIdentifier; + + // short error description text (usually to be displayed in context menu) string aShortComment; - // full error description text + // full error description text (usually to be displayed in dialog) string aFullComment; - // new locale to be applied if the error is just because of a wron language attribute - com::sun::star::lang::Locale aNewLocale; - // a list of correction suggestions - // may be emtpy if only automatic checking was done + // Usually emtpy if only automatic checking was done. sequence< string > aSuggestions; + + // a list of properties + sequence< com::sun::star::beans::PropertyValue > aProperties; }; //============================================================================= diff --git a/offapi/com/sun/star/linguistic2/XDictionary.idl b/offapi/com/sun/star/linguistic2/XDictionary.idl index 703b92f5e1a1..917a651ba9ba 100644 --- a/offapi/com/sun/star/linguistic2/XDictionary.idl +++ b/offapi/com/sun/star/linguistic2/XDictionary.idl @@ -106,7 +106,7 @@ published interface XDictionary : com::sun::star::container::XNamed @returns the number of entries in the dictionary. */ - short getCount(); + long getCount(); //------------------------------------------------------------------------- /** @@ -213,10 +213,15 @@ published interface XDictionary : com::sun::star::container::XNamed //------------------------------------------------------------------------- /** + <p>This function should no longer be used since with the expansion of the + maximum number of allowed entries the result may become unreasonable large!</p> + @returns a sequence with all the entries of the dictionary. @see <type scope="com::sun::star::linguistic2">XDictionaryEntry</type> + @see <type scope="com::sun::star::linguistic2">XSearchableDictionary</type> + @deprecated */ sequence<com::sun::star::linguistic2::XDictionaryEntry> getEntries(); diff --git a/offapi/com/sun/star/linguistic2/XGrammarChecker.idl b/offapi/com/sun/star/linguistic2/XProofreader.idl index be88ca81f7a6..be7e34483239 100644 --- a/offapi/com/sun/star/linguistic2/XGrammarChecker.idl +++ b/offapi/com/sun/star/linguistic2/XProofreader.idl @@ -6,8 +6,8 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XGrammarChecker.idl,v $ - * $Revision: 1.4 $ + * $RCSfile: XProofreader.idl,v $ + * $Revision: 1.1.2.2 $ * * This file is part of OpenOffice.org. * @@ -27,8 +27,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef __com_sun_star_linguistic2_XGrammarChecker_idl__ -#define __com_sun_star_linguistic2_XGrammarChecker_idl__ +#ifndef __com_sun_star_linguistic2_XProofreader_idl__ +#define __com_sun_star_linguistic2_XProofreader_idl__ #ifndef __com_sun_star_uno_XInterface_idl__ #include <com/sun/star/uno/XInterface.idl> @@ -50,8 +50,12 @@ #include <com/sun/star/text/XFlatParagraph.idl> #endif -#ifndef __com_sun_star_linguistic2_GrammarCheckingResult_idl__ -#include <com/sun/star/linguistic2/GrammarCheckingResult.idl> +#ifndef __com_sun_star_linguistic2_ProofreadingResult_idl__ +#include <com/sun/star/linguistic2/ProofreadingResult.idl> +#endif + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_idl_ +#include <com/sun/star/beans/PropertyValue.idl> #endif //============================================================================= @@ -59,7 +63,11 @@ module com { module sun { module star { module linguistic2 { //============================================================================= -interface XGrammarChecker: com::sun::star::linguistic2::XSupportedLocales +/** API for proofreading a text + + @since OOo 3.01 +*/ +interface XProofreader: com::sun::star::linguistic2::XSupportedLocales { //------------------------------------------------------------------------- @@ -69,56 +77,6 @@ interface XGrammarChecker: com::sun::star::linguistic2::XSupportedLocales */ boolean isSpellChecker(); - - //------------------------------------------------------------------------- - /** start checking document. This enables the grammar checker to maintain - state information about the document - - @param nDocId - the Document ID. - - @throws IllegalArgumentException - when any argument is wrong. - */ - void startDocument( [in] long nDocId ) - raises( com::sun::star::lang::IllegalArgumentException ); - - //------------------------------------------------------------------------- - /** start checking paragraph - - @param nDocId - the Document ID. - - @throws IllegalArgumentException - when any argument is wrong. - */ - void startParagraph( [in] long nDocId ) - raises( com::sun::star::lang::IllegalArgumentException ); - - //------------------------------------------------------------------------- - /** end checking paragraph - - @param nDocId - the Document ID. - - @throws IllegalArgumentException - when any argument is wrong. - */ - void endParagraph( [in] long nDocId ) - raises( com::sun::star::lang::IllegalArgumentException ); - - //------------------------------------------------------------------------- - /** end checking document - - @param nDocId - the Document ID. - - @throws IllegalArgumentException - when any argument is wrong. - */ - void endDocument( [in] long nDocId ) - raises( com::sun::star::lang::IllegalArgumentException ); - //------------------------------------------------------------------------- /** start checking @@ -143,32 +101,28 @@ interface XGrammarChecker: com::sun::star::linguistic2::XSupportedLocales @throws IllegalArgumentException when any argument is wrong. */ - GrammarCheckingResult doGrammarChecking( [in] long nDocId, + ProofreadingResult doProofreading( [in] string aDocumentIdentifier, [in] string aText, [in] com::sun::star::lang::Locale aLocale, - [in] long nStartOfSentencePos, - [in] long nSuggestedEndOfSentencePos, - [in] sequence< long > aLanguagePortions, - [in] sequence< com::sun::star::lang::Locale > aLanguagePortionsLocales ) + [in] long nStartOfSentencePosition, + [in] long nSuggestedBehindEndOfSentencePosition, + [in] sequence< com::sun::star::beans::PropertyValue > aProperties ) raises( com::sun::star::lang::IllegalArgumentException ); //------------------------------------------------------------------------- - /** check whether the checker has the options dialog - - @returns - <TRUE/> If it has - <FALSE/> otherwise. + /** disables a specific rule for a given locale. + <p>If the locale is empty the rule should be ignored for all languages.</p> */ - boolean hasOptionsDialog(); + void ignoreRule( [in] string aRuleIdentifier, + [in] com::sun::star::lang::Locale aLocale ) + raises( com::sun::star::lang::IllegalArgumentException ); //------------------------------------------------------------------------- - /** call a dialog in order to display the setting options - - @throws IllegalArgumentException - when any argument is wrong. + /** sets all rules back to their default settings. */ - void runOptionsDialog(); + void resetIgnoreRules(); + }; //============================================================================= diff --git a/offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl b/offapi/com/sun/star/linguistic2/XProofreadingIterator.idl index 10407a083e56..b1536cc3b5be 100644 --- a/offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl +++ b/offapi/com/sun/star/linguistic2/XProofreadingIterator.idl @@ -6,8 +6,8 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XGrammarCheckingIterator.idl,v $ - * $Revision: 1.4 $ + * $RCSfile: XProofreadingIterator.idl,v $ + * $Revision: 1.1.2.2 $ * * This file is part of OpenOffice.org. * @@ -27,8 +27,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef __com_sun_star_linguistic2_XGrammarCheckingIterator_idl__ -#define __com_sun_star_linguistic2_XGrammarCheckingIterator_idl__ +#ifndef __com_sun_star_linguistic2_XProofreadingIterator_idl__ +#define __com_sun_star_linguistic2_XProofreadingIterator_idl__ #ifndef __com_sun_star_uno_XInterface_idl__ #include <com/sun/star/uno/XInterface.idl> @@ -46,16 +46,12 @@ #include <com/sun/star/text/XFlatParagraph.idl> #endif -//#ifndef __com_sun_star_text_XTextDocument_idl__ -//#include <com/sun/star/text/XTextDocument.idl> -//#endif - #ifndef __com_sun_star_lang_Locale_idl__ #include <com/sun/star/lang/Locale.idl> #endif -#ifndef __com_sun_star_linguistic2_GrammarCheckingResult_idl__ -#include <com/sun/star/linguistic2/GrammarCheckingResult.idl> +#ifndef __com_sun_star_linguistic2_ProofreadingResult_idl__ +#include <com/sun/star/linguistic2/ProofreadingResult.idl> #endif //============================================================================= @@ -63,10 +59,14 @@ module com { module sun { module star { module linguistic2 { //============================================================================= -interface XGrammarCheckingIterator: com::sun::star::uno::XInterface +/** API for the proofreading iterator that mediates between the document and the proofreader. + + @since OOo 3.01 +*/ +interface XProofreadingIterator: com::sun::star::uno::XInterface { //------------------------------------------------------------------------- - /** start grammar checking and automatically process the whole text + /** start proofreading and automatically process the whole text @param xDoc the text document. @@ -74,19 +74,15 @@ interface XGrammarCheckingIterator: com::sun::star::uno::XInterface @param xIteratorProvider the flat paragraph iterator provider. - @param bAutomatic - automatic grammar checking. - @throws IllegalArgumentException when any argument is wrong. */ - void startGrammarChecking( [in] com::sun::star::uno::XInterface xDoc, - [in] com::sun::star::text::XFlatParagraphIteratorProvider xIteratorProvider, - [in] boolean bAutomatic ) + void startProofreading( [in] com::sun::star::uno::XInterface xDocument, + [in] com::sun::star::text::XFlatParagraphIteratorProvider xIteratorProvider ) raises( com::sun::star::lang::IllegalArgumentException ); //------------------------------------------------------------------------- - /** start grammar checking from one given position + /** start proofreading from a given position @param xDoc the document. @@ -101,30 +97,19 @@ interface XGrammarCheckingIterator: com::sun::star::uno::XInterface when any argument is wrong. */ - GrammarCheckingResult checkGrammarAtPos( [in] com::sun::star::uno::XInterface xDoc, - [in] com::sun::star::text::XFlatParagraph xFlatPara, - [in] string aText, - [in] com::sun::star::lang::Locale aLocale, - [in] long nStartOfSentencePos, - [in] long nSuggestedEndOfSentencePos, - [in] long nErrorPosInPara ) + ProofreadingResult checkSentenceAtPosition( [in] com::sun::star::uno::XInterface xDocument, + [in] com::sun::star::text::XFlatParagraph xFlatParagraph, + [in] string aText, + [in] com::sun::star::lang::Locale aLocale, + [in] long nStartOfSentencePosition, + [in] long nSuggestedBehindEndOfSentencePosition, + [in] long nErrorPositionInParagraph ) raises( com::sun::star::lang::IllegalArgumentException ); //------------------------------------------------------------------------- - /** get the sentence boundary - - @param nSentenceStartPos - the start index of the sentence. - - @returns - the end position. - - @throws IllegalArgumentException - when any argument is wrong. + /** clears the list of ignored rules for each prrofreader */ - long getEndOfSentence( [in] com::sun::star::text::XFlatParagraph xFlatPara, - [in] long nSentenceStartPos ) - raises( com::sun::star::lang::IllegalArgumentException ); + void resetIgnoreRules(); //------------------------------------------------------------------------- /** checks if the given document is currently being checked @@ -135,8 +120,7 @@ interface XGrammarCheckingIterator: com::sun::star::uno::XInterface @returns if the document is currently being checked. */ - boolean isGrammarChecking( [in] com::sun::star::uno::XInterface xDoc, - [in] boolean bAutomatic ); + boolean isProofreading( [in] com::sun::star::uno::XInterface xDocument ); }; //============================================================================= diff --git a/offapi/com/sun/star/linguistic2/XSearchableDictionary.idl b/offapi/com/sun/star/linguistic2/XSearchableDictionary.idl new file mode 100644 index 000000000000..ddbb8a273255 --- /dev/null +++ b/offapi/com/sun/star/linguistic2/XSearchableDictionary.idl @@ -0,0 +1,74 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XSearchableDictionary.idl,v $ + * $Revision: 1.1.2.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_linguistic2_XSearchableDictionary_idl__ +#define __com_sun_star_linguistic2_XSearchableDictionary_idl__ + +#ifndef __com_sun_star_linguistic2_XDictionary_idl__ +#include <com/sun/star/linguistic2/XDictionary.idl> +#endif + +#ifndef __com_sun_star_linguistic2_XDictionaryEntry_idl__ +#include <com/sun/star/linguistic2/XDictionaryEntry.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module linguistic2 { + +//============================================================================= +/** This interfaces allows to retrieve suggestions for spell checking from a dictionary. + +*/ +interface XSearchableDictionary : com::sun::star::linguistic2::XDictionary +{ + //------------------------------------------------------------------------- + /** search for similar entries in the dictionary. + + @param aWord + the word to find similar written entries for. + + @returns + the list of similar entries found. + + @see <type scope="com::sun::star::linguistic2">XDictionaryEntry</type> + @see <type scope="com::sun::star::linguistic2">XSearchableDictionaryList</type> + @since OOo 3.01 + */ + sequence< com::sun::star::linguistic2::XDictionaryEntry > searchSimilarEntries( [in] string aWord ); + +}; + +//============================================================================= + +}; }; }; }; + +#endif + diff --git a/offapi/com/sun/star/linguistic2/XSetSpellAlternatives.idl b/offapi/com/sun/star/linguistic2/XSetSpellAlternatives.idl new file mode 100644 index 000000000000..8407fbe566c0 --- /dev/null +++ b/offapi/com/sun/star/linguistic2/XSetSpellAlternatives.idl @@ -0,0 +1,77 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XSetSpellAlternatives.idl,v $ + * $Revision: 1.1.2.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_linguistic2_XSetSpellAlternatives_idl__ +#define __com_sun_star_linguistic2_XSetSpellAlternatives_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module linguistic2 { + +//============================================================================= +/** + allows to modify the suggestion list returned by a spell checker. + + <P>Basically this is needed to post-add further suggestions while keeping the + originally returned reference from the spell checker. + E.g. from the user dictionaries.</P> + + @see <type scope="com::sun::star::linguistic2">XSpellAlternatives</type> +*/ +interface XSetSpellAlternatives : com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + /** + set the list of suggestions to be returned. + + @since OOo 3.01 + */ + void setAlternatives( [in] sequence< string > aAlternatives ); + + //------------------------------------------------------------------------- + /** + set the type of error found. + + @see <tyoe scope="com::sun::star::linguistic2">SpellFailure</type> + @since OOo 3.01 + */ + void setFailureType( [in] short nFailureType ); + +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/linguistic2/makefile.mk b/offapi/com/sun/star/linguistic2/makefile.mk index 0e45c31eda7b..6328540ae2ac 100644 --- a/offapi/com/sun/star/linguistic2/makefile.mk +++ b/offapi/com/sun/star/linguistic2/makefile.mk @@ -29,6 +29,7 @@ # #************************************************************************* + PRJ=..$/..$/..$/.. PRJNAME=offapi @@ -47,6 +48,7 @@ IDLFILES=\ ConversionDictionaryType.idl \ ConversionDirection.idl \ ConversionPropertyType.idl \ + Dictionary.idl\ DictionaryEvent.idl\ DictionaryEventFlags.idl\ DictionaryList.idl\ @@ -80,18 +82,21 @@ IDLFILES=\ XLinguServiceManager.idl\ XMeaning.idl\ XPossibleHyphens.idl\ + XSearchableDictionary.idl\ XSearchableDictionaryList.idl\ XSpellAlternatives.idl\ + XSetSpellAlternatives.idl\ XSpellChecker.idl\ XSpellChecker1.idl\ XSupportedLanguages.idl\ XSupportedLocales.idl\ XThesaurus.idl\ - SingleGrammarError.idl\ - GrammarCheckingResult.idl\ - XGrammarChecker.idl\ - XGrammarCheckingIterator.idl\ - GrammarCheckingIterator.idl + SingleProofreadingError.idl\ + ProofreadingResult.idl\ + Proofreader.idl\ + XProofreader.idl\ + XProofreadingIterator.idl\ + ProofreadingIterator.idl # ------------------------------------------------------------------ |