From 917ab85805d8c8cff292c4ba37ee3c1e4a97095d Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Mon, 15 Dec 2008 12:01:46 +0000 Subject: CWS-TOOLING: integrate CWS tl56_DEV300 --- .../com/sun/star/chart/MissingValueTreatment.idl | 53 ------ offapi/com/sun/star/linguistic2/Dictionary.idl | 85 ++++++++++ .../star/linguistic2/GrammarCheckingIterator.idl | 60 ------- .../sun/star/linguistic2/GrammarCheckingResult.idl | 89 ----------- .../com/sun/star/linguistic2/LinguProperties.idl | 9 ++ .../star/linguistic2/LinguServiceEventFlags.idl | 6 +- offapi/com/sun/star/linguistic2/Proofreader.idl | 66 ++++++++ .../sun/star/linguistic2/ProofreadingIterator.idl | 60 +++++++ .../sun/star/linguistic2/ProofreadingResult.idl | 102 ++++++++++++ .../sun/star/linguistic2/SingleGrammarError.idl | 75 --------- .../star/linguistic2/SingleProofreadingError.idl | 84 ++++++++++ offapi/com/sun/star/linguistic2/XDictionary.idl | 7 +- .../com/sun/star/linguistic2/XGrammarChecker.idl | 178 --------------------- .../star/linguistic2/XGrammarCheckingIterator.idl | 146 ----------------- offapi/com/sun/star/linguistic2/XProofreader.idl | 132 +++++++++++++++ .../sun/star/linguistic2/XProofreadingIterator.idl | 130 +++++++++++++++ .../sun/star/linguistic2/XSearchableDictionary.idl | 74 +++++++++ .../sun/star/linguistic2/XSetSpellAlternatives.idl | 77 +++++++++ offapi/com/sun/star/linguistic2/makefile.mk | 15 +- offapi/com/sun/star/text/TextMarkupDescriptor.idl | 73 +++++++++ offapi/com/sun/star/text/TextMarkupType.idl | 8 +- offapi/com/sun/star/text/XMultiTextMarkup.idl | 82 ++++++++++ offapi/com/sun/star/text/makefile.mk | 2 + 23 files changed, 1001 insertions(+), 612 deletions(-) delete mode 100644 offapi/com/sun/star/chart/MissingValueTreatment.idl create mode 100644 offapi/com/sun/star/linguistic2/Dictionary.idl delete mode 100644 offapi/com/sun/star/linguistic2/GrammarCheckingIterator.idl delete mode 100644 offapi/com/sun/star/linguistic2/GrammarCheckingResult.idl create mode 100644 offapi/com/sun/star/linguistic2/Proofreader.idl create mode 100644 offapi/com/sun/star/linguistic2/ProofreadingIterator.idl create mode 100644 offapi/com/sun/star/linguistic2/ProofreadingResult.idl delete mode 100644 offapi/com/sun/star/linguistic2/SingleGrammarError.idl create mode 100644 offapi/com/sun/star/linguistic2/SingleProofreadingError.idl delete mode 100644 offapi/com/sun/star/linguistic2/XGrammarChecker.idl delete mode 100644 offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl create mode 100644 offapi/com/sun/star/linguistic2/XProofreader.idl create mode 100644 offapi/com/sun/star/linguistic2/XProofreadingIterator.idl create mode 100644 offapi/com/sun/star/linguistic2/XSearchableDictionary.idl create mode 100644 offapi/com/sun/star/linguistic2/XSetSpellAlternatives.idl create mode 100644 offapi/com/sun/star/text/TextMarkupDescriptor.idl create mode 100644 offapi/com/sun/star/text/XMultiTextMarkup.idl (limited to 'offapi/com/sun') diff --git a/offapi/com/sun/star/chart/MissingValueTreatment.idl b/offapi/com/sun/star/chart/MissingValueTreatment.idl deleted file mode 100644 index e7ad3e522e3e..000000000000 --- a/offapi/com/sun/star/chart/MissingValueTreatment.idl +++ /dev/null @@ -1,53 +0,0 @@ -/************************************************************************* - * - * 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: MissingValueTreatment.idl,v $ - * $Revision: 1.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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_chart_MissingValueTreatment_idl__ -#define __com_sun_star_chart_MissingValueTreatment_idl__ - - -//============================================================================= - - module com { module sun { module star { module chart { - -//============================================================================= - -/** This specifies how empty or invalid cells in the provided data should be handled when plotted. - */ -published constants MissingValueTreatment -{ - const long LEAVE_GAP = 0; - const long USE_ZERO = 1; - const long CONTINUE = 2; -}; - -//============================================================================= - -}; }; }; }; - -#endif 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 + * + * 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 +#endif + +#ifndef __com_sun_star_linguistic2_XSearchableDictionary_idl__ +#include +#endif + +#ifndef __com_sun_star_util_XFlushable_idl__ +#include +#endif + +#ifndef __com_sun_star_frame_XStorable_idl__ +#include +#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 + +

storeAsURL and storeToURL are empty implementations since the dictionaries are expected + to be found in specific locations

+ */ + [optional] interface com::sun::star::frame::XStorable; + +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/linguistic2/GrammarCheckingIterator.idl b/offapi/com/sun/star/linguistic2/GrammarCheckingIterator.idl deleted file mode 100644 index 58ceccd5970a..000000000000 --- a/offapi/com/sun/star/linguistic2/GrammarCheckingIterator.idl +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************* - * - * 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: GrammarCheckingIterator.idl,v $ - * $Revision: 1.3 $ - * - * 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_linguistic2_GrammarCheckingIterator_idl__ -#define __com_sun_star_linguistic2_GrammarCheckingIterator_idl__ - -//============================================================================ - -module com { module sun { module star { module linguistic2 { - interface XGrammarCheckingIterator; }; -}; }; }; - -//============================================================================ - -module com { module sun { module star { module linguistic2 { - -//============================================================================ - -/** provides a grammar checking iterator - -

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.

- - @since OOo 3.0 - */ - -service GrammarCheckingIterator : XGrammarCheckingIterator {}; - -//============================================================================ - -}; }; }; }; - -#endif diff --git a/offapi/com/sun/star/linguistic2/GrammarCheckingResult.idl b/offapi/com/sun/star/linguistic2/GrammarCheckingResult.idl deleted file mode 100644 index 892dfb999adc..000000000000 --- a/offapi/com/sun/star/linguistic2/GrammarCheckingResult.idl +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************* - * - * 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: GrammarCheckingResult.idl,v $ - * $Revision: 1.4 $ - * - * 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 - * - * 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_text_XFlatParagraph_idl__ -#include -#endif - -#ifndef __com_sun_star_lang_Locale_idl__ -#include -#endif - -#ifndef __com_sun_star_linguistic2_SingleGrammarError_idl__ -#include -#endif - -//#ifndef __com_sun_star_linguistic2_XGrammarChecker_idl__ -//#include -//#endif - - -//============================================================================= - -module com { module sun { module star { module linguistic2 { - -// forward declaration -interface XGrammarChecker; - -//============================================================================= -struct GrammarCheckingResult -{ - // the document ID - long nDocumentId; - - // the paragraph that was checked - com::sun::star::text::XFlatParagraph xFlatParagraph; - - // text that was checked (the paragraphs content may have changed meanwhile!) - string aText; - - // language used for checking - com::sun::star::lang::Locale aLocale; - - // the start of sentence position passed to the grammar checker - long nStartOfSentencePos; - - // the end of sentence position found by the grammar checker - long nEndOfSentencePos; - - // the list of errors - sequence< com::sun::star::linguistic2::SingleGrammarError > aGrammarErrors; - - // reference to the specific grammar checker implementation that reported the error - com::sun::star::linguistic2::XGrammarChecker xGrammarChecker; -}; - -//============================================================================= - -}; }; }; }; - -#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 + * + * 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 + +

An implementation of this service will receive text and has to identify + the sentence end and report all errors found.

+ +

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.

+ + @since OOo 3.0.1 + */ + +service Proofreader : XProofreader {}; + +//============================================================================ + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/linguistic2/ProofreadingIterator.idl b/offapi/com/sun/star/linguistic2/ProofreadingIterator.idl new file mode 100644 index 000000000000..382b6da455fd --- /dev/null +++ b/offapi/com/sun/star/linguistic2/ProofreadingIterator.idl @@ -0,0 +1,60 @@ +/************************************************************************* + * + * 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: ProofreadingIterator.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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_linguistic2_ProofreadingIterator_idl__ +#define __com_sun_star_linguistic2_ProofreadingIterator_idl__ + +//============================================================================ + +module com { module sun { module star { module linguistic2 { + interface XProofreadingIterator; }; +}; }; }; + +//============================================================================ + +module com { module sun { module star { module linguistic2 { + +//============================================================================ + +/** provides a proofreading iterator + +

An implementation of this service acts as a mediator between documents + and proofreaders (often called just grammar checkers). It is responsible to + process requests for proofreading text portions.

+ + @since OOo 3.0.1 + */ + +service ProofreadingIterator : XProofreadingIterator {}; + +//============================================================================ + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/linguistic2/ProofreadingResult.idl b/offapi/com/sun/star/linguistic2/ProofreadingResult.idl new file mode 100644 index 000000000000..d00a4ed8f8fb --- /dev/null +++ b/offapi/com/sun/star/linguistic2/ProofreadingResult.idl @@ -0,0 +1,102 @@ +/************************************************************************* + * + * 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: ProofreadingResult.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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_linguistic2_ProofreadingResult_idl__ +#define __com_sun_star_linguistic2_ProofreadingResult_idl__ + +#ifndef __com_sun_star_text_XFlatParagraph_idl__ +#include +#endif + +#ifndef __com_sun_star_lang_Locale_idl__ +#include +#endif + +#ifndef __com_sun_star_linguistic2_SingleProofreadingError_idl__ +#include +#endif + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_idl_ +#include +#endif + + + +//============================================================================= + +module com { module sun { module star { module linguistic2 { + +// forward declaration +interface XProofreader; + +//============================================================================= +/** holds the results from proofreading a sentence. + + @since OOo 3.01 +*/ +struct ProofreadingResult +{ + // the document ID + string aDocumentIdentifier; + + // the paragraph that was checked + com::sun::star::text::XFlatParagraph xFlatParagraph; + + // text that was checked (the paragraphs content may have changed meanwhile!) + string aText; + + // language used for checking + com::sun::star::lang::Locale aLocale; + + // the start of sentence position passed to the proofreader + long nStartOfSentencePosition; + + // 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::SingleProofreadingError > aErrors; + + // a list of properties + sequence< com::sun::star::beans::PropertyValue > aProperties; + + // reference to the specific proofreader implementation that reported the error + com::sun::star::linguistic2::XProofreader xProofreader; +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/linguistic2/SingleGrammarError.idl b/offapi/com/sun/star/linguistic2/SingleGrammarError.idl deleted file mode 100644 index 75c1321ffe40..000000000000 --- a/offapi/com/sun/star/linguistic2/SingleGrammarError.idl +++ /dev/null @@ -1,75 +0,0 @@ -/************************************************************************* - * - * 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: SingleGrammarError.idl,v $ - * $Revision: 1.4 $ - * - * 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 - * - * 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_lang_Locale_idl__ -#include -#endif - -//============================================================================= - -module com { module sun { module star { module linguistic2 { - -//============================================================================= -struct SingleGrammarError -{ - // start index of the error text - // indicating the text to be replaced if suggestions are applied - long nErrorStart; - - // the length of the error text - // indicating the text to be replaced if suggestions are applied - long nErrorLength; - - // definitely wrong, maybe wrong... - long nErrorLevel; - - long nErrorType; - - // short error description text - string aShortComment; - - // full error description text - 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 - sequence< string > aSuggestions; -}; - -//============================================================================= - -}; }; }; }; - -#endif diff --git a/offapi/com/sun/star/linguistic2/SingleProofreadingError.idl b/offapi/com/sun/star/linguistic2/SingleProofreadingError.idl new file mode 100644 index 000000000000..b16ca8711d6e --- /dev/null +++ b/offapi/com/sun/star/linguistic2/SingleProofreadingError.idl @@ -0,0 +1,84 @@ +/************************************************************************* + * + * 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: SingleProofreadingError.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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_linguistic2_SingleProofreadingError_idl__ +#define __com_sun_star_linguistic2_SingleProofreadingError_idl__ + +#ifndef __com_sun_star_lang_Locale_idl__ +#include +#endif + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_idl_ +#include +#endif + +//============================================================================= + +module com { module sun { module star { module linguistic2 { + +//============================================================================= +/** 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 + long nErrorStart; + + // the length of the error text + // indicating the text to be replaced if suggestions are applied + long nErrorLength; + + // as in com.sun.star.text.TextMarkupType + long nErrorType; + + // 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 (usually to be displayed in dialog) + string aFullComment; + + // a list of correction suggestions + // Usually emtpy if only automatic checking was done. + sequence< string > aSuggestions; + + // a list of properties + sequence< com::sun::star::beans::PropertyValue > aProperties; +}; + +//============================================================================= + +}; }; }; }; + +#endif 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 //------------------------------------------------------------------------- /** +

This function should no longer be used since with the expansion of the + maximum number of allowed entries the result may become unreasonable large!

+ @returns a sequence with all the entries of the dictionary. @see XDictionaryEntry + @see XSearchableDictionary + @deprecated */ sequence getEntries(); diff --git a/offapi/com/sun/star/linguistic2/XGrammarChecker.idl b/offapi/com/sun/star/linguistic2/XGrammarChecker.idl deleted file mode 100644 index be88ca81f7a6..000000000000 --- a/offapi/com/sun/star/linguistic2/XGrammarChecker.idl +++ /dev/null @@ -1,178 +0,0 @@ -/************************************************************************* - * - * 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: XGrammarChecker.idl,v $ - * $Revision: 1.4 $ - * - * 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 - * - * 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_uno_XInterface_idl__ -#include -#endif - -#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ -#include -#endif - -#ifndef __com_sun_star_lang_Locale_idl__ -#include -#endif - -#ifndef __com_sun_star_linguistic2_XSupportedLocales_idl__ -#include -#endif - -#ifndef __com_sun_star_text_XFlatParagraph_idl__ -#include -#endif - -#ifndef __com_sun_star_linguistic2_GrammarCheckingResult_idl__ -#include -#endif - -//============================================================================= - -module com { module sun { module star { module linguistic2 { - -//============================================================================= -interface XGrammarChecker: com::sun::star::linguistic2::XSupportedLocales -{ - - //------------------------------------------------------------------------- - /** whether is the text checked by the spellchecker - - @returns true if it is also a spell checker - */ - 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 - - @param nDocId - the Document ID. - - @param rFlatParaText - the flat text to be checked. - - @param xFlatPara - the flat paragraph to be checked. - - @param aLocale - Language used in the text. - - @param nStartOfSentencePos - Start Index of the text. - - @param nSuggestedSentenceEndPos - Probable end position of the text. - - @throws IllegalArgumentException - when any argument is wrong. - */ - GrammarCheckingResult doGrammarChecking( [in] long nDocId, - [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 ) - raises( com::sun::star::lang::IllegalArgumentException ); - - //------------------------------------------------------------------------- - /** check whether the checker has the options dialog - - @returns - If it has - otherwise. - - */ - boolean hasOptionsDialog(); - - //------------------------------------------------------------------------- - /** call a dialog in order to display the setting options - - @throws IllegalArgumentException - when any argument is wrong. - */ - void runOptionsDialog(); -}; - -//============================================================================= - -}; }; }; }; - -#endif diff --git a/offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl b/offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl deleted file mode 100644 index 10407a083e56..000000000000 --- a/offapi/com/sun/star/linguistic2/XGrammarCheckingIterator.idl +++ /dev/null @@ -1,146 +0,0 @@ -/************************************************************************* - * - * 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: XGrammarCheckingIterator.idl,v $ - * $Revision: 1.4 $ - * - * 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 - * - * 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_uno_XInterface_idl__ -#include -#endif - -#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ -#include -#endif - -#ifndef __com_sun_star_text_XFlatParagraphIteratorProvider_idl__ -#include -#endif - -#ifndef __com_sun_star_text_XFlatParagraph_idl__ -#include -#endif - -//#ifndef __com_sun_star_text_XTextDocument_idl__ -//#include -//#endif - -#ifndef __com_sun_star_lang_Locale_idl__ -#include -#endif - -#ifndef __com_sun_star_linguistic2_GrammarCheckingResult_idl__ -#include -#endif - -//============================================================================= - -module com { module sun { module star { module linguistic2 { - -//============================================================================= -interface XGrammarCheckingIterator: com::sun::star::uno::XInterface -{ - //------------------------------------------------------------------------- - /** start grammar checking and automatically process the whole text - - @param xDoc - the text document. - - @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 ) - raises( com::sun::star::lang::IllegalArgumentException ); - - //------------------------------------------------------------------------- - /** start grammar checking from one given position - - @param xDoc - the document. - - @param xStartPara - the single flat paragraph to be checked. - - @param nErrorPosInPara - the given index. - - @throws IllegalArgumentException - 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 ) - 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. - */ - long getEndOfSentence( [in] com::sun::star::text::XFlatParagraph xFlatPara, - [in] long nSentenceStartPos ) - raises( com::sun::star::lang::IllegalArgumentException ); - - //------------------------------------------------------------------------- - /** checks if the given document is currently being checked - - @param xDoc - the document. - - @returns - if the document is currently being checked. - */ - boolean isGrammarChecking( [in] com::sun::star::uno::XInterface xDoc, - [in] boolean bAutomatic ); -}; - -//============================================================================= - -}; }; }; }; - -#endif diff --git a/offapi/com/sun/star/linguistic2/XProofreader.idl b/offapi/com/sun/star/linguistic2/XProofreader.idl new file mode 100644 index 000000000000..be7e34483239 --- /dev/null +++ b/offapi/com/sun/star/linguistic2/XProofreader.idl @@ -0,0 +1,132 @@ +/************************************************************************* + * + * 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: XProofreader.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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_linguistic2_XProofreader_idl__ +#define __com_sun_star_linguistic2_XProofreader_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include +#endif + +#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ +#include +#endif + +#ifndef __com_sun_star_lang_Locale_idl__ +#include +#endif + +#ifndef __com_sun_star_linguistic2_XSupportedLocales_idl__ +#include +#endif + +#ifndef __com_sun_star_text_XFlatParagraph_idl__ +#include +#endif + +#ifndef __com_sun_star_linguistic2_ProofreadingResult_idl__ +#include +#endif + +#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_idl_ +#include +#endif + +//============================================================================= + +module com { module sun { module star { module linguistic2 { + +//============================================================================= +/** API for proofreading a text + + @since OOo 3.01 +*/ +interface XProofreader: com::sun::star::linguistic2::XSupportedLocales +{ + + //------------------------------------------------------------------------- + /** whether is the text checked by the spellchecker + + @returns true if it is also a spell checker + */ + boolean isSpellChecker(); + + //------------------------------------------------------------------------- + /** start checking + + @param nDocId + the Document ID. + + @param rFlatParaText + the flat text to be checked. + + @param xFlatPara + the flat paragraph to be checked. + + @param aLocale + Language used in the text. + + @param nStartOfSentencePos + Start Index of the text. + + @param nSuggestedSentenceEndPos + Probable end position of the text. + + @throws IllegalArgumentException + when any argument is wrong. + */ + ProofreadingResult doProofreading( [in] string aDocumentIdentifier, + [in] string aText, + [in] com::sun::star::lang::Locale aLocale, + [in] long nStartOfSentencePosition, + [in] long nSuggestedBehindEndOfSentencePosition, + [in] sequence< com::sun::star::beans::PropertyValue > aProperties ) + raises( com::sun::star::lang::IllegalArgumentException ); + + //------------------------------------------------------------------------- + /** disables a specific rule for a given locale. + +

If the locale is empty the rule should be ignored for all languages.

+ */ + void ignoreRule( [in] string aRuleIdentifier, + [in] com::sun::star::lang::Locale aLocale ) + raises( com::sun::star::lang::IllegalArgumentException ); + + //------------------------------------------------------------------------- + /** sets all rules back to their default settings. + */ + void resetIgnoreRules(); + +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/linguistic2/XProofreadingIterator.idl b/offapi/com/sun/star/linguistic2/XProofreadingIterator.idl new file mode 100644 index 000000000000..b1536cc3b5be --- /dev/null +++ b/offapi/com/sun/star/linguistic2/XProofreadingIterator.idl @@ -0,0 +1,130 @@ +/************************************************************************* + * + * 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: XProofreadingIterator.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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_linguistic2_XProofreadingIterator_idl__ +#define __com_sun_star_linguistic2_XProofreadingIterator_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include +#endif + +#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ +#include +#endif + +#ifndef __com_sun_star_text_XFlatParagraphIteratorProvider_idl__ +#include +#endif + +#ifndef __com_sun_star_text_XFlatParagraph_idl__ +#include +#endif + +#ifndef __com_sun_star_lang_Locale_idl__ +#include +#endif + +#ifndef __com_sun_star_linguistic2_ProofreadingResult_idl__ +#include +#endif + +//============================================================================= + +module com { module sun { module star { module linguistic2 { + +//============================================================================= +/** 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 proofreading and automatically process the whole text + + @param xDoc + the text document. + + @param xIteratorProvider + the flat paragraph iterator provider. + + @throws IllegalArgumentException + when any argument is wrong. + */ + void startProofreading( [in] com::sun::star::uno::XInterface xDocument, + [in] com::sun::star::text::XFlatParagraphIteratorProvider xIteratorProvider ) + raises( com::sun::star::lang::IllegalArgumentException ); + + //------------------------------------------------------------------------- + /** start proofreading from a given position + + @param xDoc + the document. + + @param xStartPara + the single flat paragraph to be checked. + + @param nErrorPosInPara + the given index. + + @throws IllegalArgumentException + when any argument is wrong. + */ + + 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 ); + + //------------------------------------------------------------------------- + /** clears the list of ignored rules for each prrofreader + */ + void resetIgnoreRules(); + + //------------------------------------------------------------------------- + /** checks if the given document is currently being checked + + @param xDoc + the document. + + @returns + if the document is currently being checked. + */ + boolean isProofreading( [in] com::sun::star::uno::XInterface xDocument ); +}; + +//============================================================================= + +}; }; }; }; + +#endif 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 + * + * 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 +#endif + +#ifndef __com_sun_star_linguistic2_XDictionaryEntry_idl__ +#include +#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 XDictionaryEntry + @see XSearchableDictionaryList + @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 + * + * 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 +#endif + + +//============================================================================= + +module com { module sun { module star { module linguistic2 { + +//============================================================================= +/** + allows to modify the suggestion list returned by a spell checker. + +

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.

+ + @see XSpellAlternatives +*/ +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 SpellFailure + @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 # ------------------------------------------------------------------ diff --git a/offapi/com/sun/star/text/TextMarkupDescriptor.idl b/offapi/com/sun/star/text/TextMarkupDescriptor.idl new file mode 100644 index 000000000000..d9e5ca4c5349 --- /dev/null +++ b/offapi/com/sun/star/text/TextMarkupDescriptor.idl @@ -0,0 +1,73 @@ +/************************************************************************* + * + * 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: TextMarkupDescriptor.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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_text_TextMarkupDescriptor_idl__ +#define __com_sun_star_text_TextMarkupDescriptor_idl__ + +#ifndef __com_sun_star_container_XStringKeyMap_idl__ +#include +#endif + +#ifndef __com_sun_star_text_TextMarkupType_idl__ +#include +#endif + + +//============================================================================= + +module com { module sun { module star { module text { + +//============================================================================= + +/** A descriptor for a single text markup. + + @since OOo 3.0.1 + */ + +struct TextMarkupDescriptor +{ + /// Type of text markup see TextMarkupType + long nType; + + /// A string used to identify the caller + string aIdentifier; + + /// Start of the markup range + long nOffset; + + /// Length of the markup range + long nLength; + + /// contains additional information about the markup + com::sun::star::container::XStringKeyMap xMarkupInfoContainer; +}; + +}; }; }; }; +#endif diff --git a/offapi/com/sun/star/text/TextMarkupType.idl b/offapi/com/sun/star/text/TextMarkupType.idl index 2f266cfba653..7d59b3cc9e8f 100644 --- a/offapi/com/sun/star/text/TextMarkupType.idl +++ b/offapi/com/sun/star/text/TextMarkupType.idl @@ -50,14 +50,16 @@ constants TextMarkupType /// Markup originates from spell checking. const long SPELLCHECK = 1; - /// Markup originates from grammar checking. - const long GRAMMAR = 2; + /// Markup originates from proofreading + /// @since OOo 3.0.1 + const long PROOFREADING = 2; /// Markup originates from smart tag checking. const long SMARTTAG = 3; - /// Markup originates from grammar checking. + /// Markup originates from proofreading /// An inivisible markup used to identify sentence boundaries. + /// @since OOo 3.0.1 const long SENTENCE = 4; }; diff --git a/offapi/com/sun/star/text/XMultiTextMarkup.idl b/offapi/com/sun/star/text/XMultiTextMarkup.idl new file mode 100644 index 000000000000..661038152bb4 --- /dev/null +++ b/offapi/com/sun/star/text/XMultiTextMarkup.idl @@ -0,0 +1,82 @@ +/************************************************************************* + * + * 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: XMultiTextMarkup.idl,v $ + * $Revision: 1.1.2.4 $ + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_text_XMultiTextMarkup_idl__ +#define __com_sun_star_text_XMultiTextMarkup_idl__ + +#ifndef __com_sun_star_container_XStringKeyMap_idl__ +#include +#endif + +#ifndef __com_sun_star_text_TextMarkupDescriptor_idl__ +#include +#endif + +#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ +#include +#endif + +//============================================================================= + +module com { module sun { module star { module text { + +//============================================================================= + +/** provides functionality to apply multiple text markups in one call. + + @since OOo 3.0.1 + */ + +interface XMultiTextMarkup +{ + //------------------------------------------------------------------------- + /** submits multiple new markup ranges. + +

The main use of this function will probably be for proofreading to + allow for setting the markup of all found errors in a sentence in a single + call. For this the sequence needs to provide the markups for all errors along + with the markup for the identified sentence boundaries. + The order of those entries is arbitrary.

+ + @param aMarkups + a sequence of single text markups. + + @see som::sun::star:text::XTextMarkup + @see som::sun::star:text::TextMarkupType + + */ + void commitMultiTextMarkup( + [in] sequence< com::sun::star::text::TextMarkupDescriptor > aMarkups ) + raises( com::sun::star::lang::IllegalArgumentException ); +}; + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/text/makefile.mk b/offapi/com/sun/star/text/makefile.mk index 735b501b8c6a..18ad6abbe2a1 100644 --- a/offapi/com/sun/star/text/makefile.mk +++ b/offapi/com/sun/star/text/makefile.mk @@ -169,6 +169,7 @@ IDLFILES=\ TextGraphicObjects.idl\ TextGridMode.idl\ TextLayoutCursor.idl\ + TextMarkupDescriptor.idl\ TextMarkupType.idl \ TextPageStyle.idl\ TextPortion.idl\ @@ -249,6 +250,7 @@ IDLFILES=\ XTextFramesSupplier.idl\ XTextGraphicObjectsSupplier.idl\ XTextMarkup.idl\ + XMultiTextMarkup.idl\ XTextRange.idl\ XTextRangeCompare.idl\ XTextRangeMover.idl\ -- cgit