1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_linguistic2_XProofreadingIterator_idl__ 24#define __com_sun_star_linguistic2_XProofreadingIterator_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 31#include <com/sun/star/lang/IllegalArgumentException.idl> 32#endif 33 34#ifndef __com_sun_star_text_XFlatParagraphIteratorProvider_idl__ 35#include <com/sun/star/text/XFlatParagraphIteratorProvider.idl> 36#endif 37 38#ifndef __com_sun_star_text_XFlatParagraph_idl__ 39#include <com/sun/star/text/XFlatParagraph.idl> 40#endif 41 42#ifndef __com_sun_star_lang_Locale_idl__ 43#include <com/sun/star/lang/Locale.idl> 44#endif 45 46#ifndef __com_sun_star_linguistic2_ProofreadingResult_idl__ 47#include <com/sun/star/linguistic2/ProofreadingResult.idl> 48#endif 49 50//============================================================================= 51 52module com { module sun { module star { module linguistic2 { 53 54//============================================================================= 55/** API for the proofreading iterator that mediates between the document and the proofreader. 56 57 @since OpenOffice 3.0.1 58*/ 59interface XProofreadingIterator: com::sun::star::uno::XInterface 60{ 61 //------------------------------------------------------------------------- 62 /** start proofreading and automatically process the whole text 63 64 @param xDoc 65 the text document. 66 67 @param xIteratorProvider 68 the flat paragraph iterator provider. 69 70 @throws IllegalArgumentException 71 when any argument is wrong. 72 */ 73 void startProofreading( [in] com::sun::star::uno::XInterface xDocument, 74 [in] com::sun::star::text::XFlatParagraphIteratorProvider xIteratorProvider ) 75 raises( com::sun::star::lang::IllegalArgumentException ); 76 77 //------------------------------------------------------------------------- 78 /** start proofreading from a given position 79 80 @param xDoc 81 the document. 82 83 @param xStartPara 84 the single flat paragraph to be checked. 85 86 @param nErrorPosInPara 87 the given index. 88 89 @throws IllegalArgumentException 90 when any argument is wrong. 91 */ 92 93 ProofreadingResult checkSentenceAtPosition( [in] com::sun::star::uno::XInterface xDocument, 94 [in] com::sun::star::text::XFlatParagraph xFlatParagraph, 95 [in] string aText, 96 [in] com::sun::star::lang::Locale aLocale, 97 [in] long nStartOfSentencePosition, 98 [in] long nSuggestedBehindEndOfSentencePosition, 99 [in] long nErrorPositionInParagraph ) 100 raises( com::sun::star::lang::IllegalArgumentException ); 101 102 //------------------------------------------------------------------------- 103 /** clears the list of ignored rules for each prrofreader 104 */ 105 void resetIgnoreRules(); 106 107 //------------------------------------------------------------------------- 108 /** checks if the given document is currently being checked 109 110 @param xDoc 111 the document. 112 113 @returns 114 if the document is currently being checked. 115 */ 116 boolean isProofreading( [in] com::sun::star::uno::XInterface xDocument ); 117}; 118 119//============================================================================= 120 121}; }; }; }; 122 123#endif 124