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_XProofreader_idl__
24#define __com_sun_star_linguistic2_XProofreader_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_lang_Locale_idl__
35#include <com/sun/star/lang/Locale.idl>
36#endif
37
38#ifndef __com_sun_star_linguistic2_XSupportedLocales_idl__
39#include <com/sun/star/linguistic2/XSupportedLocales.idl>
40#endif
41
42#ifndef __com_sun_star_text_XFlatParagraph_idl__
43#include <com/sun/star/text/XFlatParagraph.idl>
44#endif
45
46#ifndef __com_sun_star_linguistic2_ProofreadingResult_idl__
47#include <com/sun/star/linguistic2/ProofreadingResult.idl>
48#endif
49
50#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_idl_
51#include <com/sun/star/beans/PropertyValue.idl>
52#endif
53
54//=============================================================================
55
56module com {  module sun {  module star {  module linguistic2 {
57
58//=============================================================================
59/** API for proofreading a text
60
61	@since OpenOffice 3.0.1
62*/
63interface XProofreader: com::sun::star::linguistic2::XSupportedLocales
64{
65
66    //-------------------------------------------------------------------------
67    /** whether is the text checked by the spellchecker
68
69        @returns true if it is also a spell checker
70    */
71    boolean isSpellChecker();
72
73    //-------------------------------------------------------------------------
74    /** start checking
75
76        @param  nDocId
77                the Document ID.
78
79        @param  rFlatParaText
80                the flat text to be checked.
81
82        @param  xFlatPara
83                the flat paragraph to be checked.
84
85        @param  aLocale
86                Language used in the text.
87
88        @param  nStartOfSentencePos
89                Start Index of the text.
90
91        @param  nSuggestedSentenceEndPos
92                Probable end position of the text.
93
94        @throws IllegalArgumentException
95                when any argument is wrong.
96    */
97    ProofreadingResult doProofreading( [in] string aDocumentIdentifier,
98                            [in] string aText,
99                            [in] com::sun::star::lang::Locale aLocale,
100                            [in] long nStartOfSentencePosition,
101                            [in] long nSuggestedBehindEndOfSentencePosition,
102                            [in] sequence< com::sun::star::beans::PropertyValue > aProperties )
103            raises( com::sun::star::lang::IllegalArgumentException );
104
105    //-------------------------------------------------------------------------
106    /** disables a specific rule for a given locale.
107
108        <p>If the locale is empty the rule should be ignored for all languages.</p>
109    */
110    void ignoreRule( [in] string aRuleIdentifier,
111                     [in] com::sun::star::lang::Locale aLocale )
112            raises( com::sun::star::lang::IllegalArgumentException );
113
114    //-------------------------------------------------------------------------
115    /** sets all rules back to their default settings.
116    */
117    void resetIgnoreRules();
118
119};
120
121//=============================================================================
122
123}; }; }; };
124
125#endif
126