diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2008-07-16 12:53:10 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2008-07-16 12:53:10 +0000 |
commit | dd965316e90d8ff89919f60d038d5cc40d03208f (patch) | |
tree | 589dd18a1bb870b17bdd5e3584462e9da34cbac2 /offapi/com/sun/star/linguistic2 | |
parent | 46d9d4b1872fa2afcf27de21a5f3c9c336768081 (diff) |
INTEGRATION: CWS tl55 (1.3.44); FILE MERGED
2008/06/07 15:23:35 tl 1.3.44.1: #i85999# grammar checking framework
Diffstat (limited to 'offapi/com/sun/star/linguistic2')
-rw-r--r-- | offapi/com/sun/star/linguistic2/SingleGrammarError.idl | 23 | ||||
-rw-r--r-- | offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl | 32 |
2 files changed, 30 insertions, 25 deletions
diff --git a/offapi/com/sun/star/linguistic2/SingleGrammarError.idl b/offapi/com/sun/star/linguistic2/SingleGrammarError.idl index 6d24382db..656eb3fc4 100644 --- a/offapi/com/sun/star/linguistic2/SingleGrammarError.idl +++ b/offapi/com/sun/star/linguistic2/SingleGrammarError.idl @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SingleGrammarError.idl,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -30,10 +30,6 @@ #ifndef __com_sun_star_linguistic2_SingleGrammarError_idl__ #define __com_sun_star_linguistic2_SingleGrammarError_idl__ -#ifndef __com_sun_star_linguistic2_XGrammarChecker_idl__ -#include <com/sun/star/linguistic2/XGrammarChecker.idl> -#endif - #ifndef __com_sun_star_lang_Locale_idl__ #include <com/sun/star/lang/Locale.idl> #endif @@ -51,29 +47,24 @@ struct SingleGrammarError // the length of the error text // indicating the text to be replaced if suggestions are applied - long nErrorLen; - - long nErrorType; + long nErrorLength; // definitely wrong, maybe wrong... long nErrorLevel; - // the sentence boundary - //long nEndOfSentencePos; - - // link to specific implementation that reported the error - com::sun::star::linguistic2::XGrammarChecker xGC; + long nErrorType; - // error text + // short error description text string aShortComment; - // error text + // full error description text string aFullComment; - // language + // 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 sequence< string > aSuggestions; }; diff --git a/offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl b/offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl index 889c8f114..3783eaf63 100644 --- a/offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl +++ b/offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: XGrammarCheckingIterator.idl,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -46,8 +46,16 @@ #include <com/sun/star/text/XFlatParagraph.idl> #endif -#ifndef __com_sun_star_text_XTextDocument_idl__ -#include <com/sun/star/text/XTextDocument.idl> +//#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> #endif //============================================================================= @@ -86,16 +94,20 @@ interface XGrammarCheckingIterator: com::sun::star::uno::XInterface @param xStartPara the single flat paragraph to be checked. - @param nPosInPara + @param nErrorPosInPara the given index. @throws IllegalArgumentException when any argument is wrong. */ - void checkGrammarAtPos( [in] com::sun::star::uno::XInterface xDoc, - [in] com::sun::star::text::XFlatParagraph xStartPara, - [in] long nPosInPara ) + 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 ) raises( com::sun::star::lang::IllegalArgumentException ); //------------------------------------------------------------------------- @@ -110,7 +122,8 @@ interface XGrammarCheckingIterator: com::sun::star::uno::XInterface @throws IllegalArgumentException when any argument is wrong. */ - long getEndOfSentence( [in] long nSentenceStartPos ) + long getEndOfSentence( [in] com::sun::star::text::XFlatParagraph xFlatPara, + [in] long nSentenceStartPos ) raises( com::sun::star::lang::IllegalArgumentException ); //------------------------------------------------------------------------- @@ -122,7 +135,8 @@ interface XGrammarCheckingIterator: com::sun::star::uno::XInterface @returns if the document is currently being checked. */ - boolean isChecking( [in] com::sun::star::uno::XInterface xDoc ); + boolean isGrammarChecking( [in] com::sun::star::uno::XInterface xDoc, + [in] boolean bAutomatic ); }; //============================================================================= |