1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_text_XFlatParagraph_idl__
25cdf0e10cSrcweir#define __com_sun_star_text_XFlatParagraph_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
28cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir#ifndef __com_sun_star_lang_Locale_idl__
32cdf0e10cSrcweir#include <com/sun/star/lang/Locale.idl>
33cdf0e10cSrcweir#endif
34cdf0e10cSrcweir
35cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
36cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir
39cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__
40cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl>
41cdf0e10cSrcweir#endif
42cdf0e10cSrcweir
43cdf0e10cSrcweir#ifndef __com_sun_star_text_XTextMarkup_idl__
44cdf0e10cSrcweir#include <com/sun/star/text/XTextMarkup.idl>
45cdf0e10cSrcweir#endif
46cdf0e10cSrcweir
47cdf0e10cSrcweir//=============================================================================
48cdf0e10cSrcweir
49cdf0e10cSrcweirmodule com {  module sun {  module star {  module text {
50cdf0e10cSrcweir
51cdf0e10cSrcweir//=============================================================================
52cdf0e10cSrcweir
53cdf0e10cSrcweir/** provides functionality to ...
54cdf0e10cSrcweir
55*2a413f17SJürgen Schmidt    @since OpenOffice 3.0
56cdf0e10cSrcweir */
57cdf0e10cSrcweir
58cdf0e10cSrcweirinterface XFlatParagraph: com::sun::star::text::XTextMarkup
59cdf0e10cSrcweir{
60cdf0e10cSrcweir
61cdf0e10cSrcweir    //-------------------------------------------------------------------------
62cdf0e10cSrcweir    /** get the content of the paragraph
63cdf0e10cSrcweir
64cdf0e10cSrcweir        @returns
65cdf0e10cSrcweir                the content of the paragraph.
66cdf0e10cSrcweir    */
67cdf0e10cSrcweir    string getText();
68cdf0e10cSrcweir
69cdf0e10cSrcweir    //-------------------------------------------------------------------------
70cdf0e10cSrcweir    /** check whether the content has been modified
71cdf0e10cSrcweir
72cdf0e10cSrcweir		@returns
73cdf0e10cSrcweir                <TRUE/>  if the content has been modified,
74cdf0e10cSrcweir                <FALSE/> otherwise.
75cdf0e10cSrcweir    */
76cdf0e10cSrcweir    boolean isModified();
77cdf0e10cSrcweir
78cdf0e10cSrcweir    //-------------------------------------------------------------------------
79cdf0e10cSrcweir    /** change the 'checked' flag of the respective text node, i.e., mark the
80cdf0e10cSrcweir        text node as 'processed'
81cdf0e10cSrcweir
82cdf0e10cSrcweir        @param nType
83cdf0e10cSrcweir                type, see <type>TextMarkupType</type>.
84cdf0e10cSrcweir
85cdf0e10cSrcweir        @param  bVal
86cdf0e10cSrcweir                <TRUE/>  the respective text node has been processed
87cdf0e10cSrcweir                <FALSE/> the respective text node needs to be processed again
88cdf0e10cSrcweir                         later
89cdf0e10cSrcweir    */
90cdf0e10cSrcweir    void setChecked( [in] long nType, [in] boolean bVal );
91cdf0e10cSrcweir
92cdf0e10cSrcweir    //-------------------------------------------------------------------------
93cdf0e10cSrcweir    /** returns whether the respective text node has already been processed
94cdf0e10cSrcweir
95cdf0e10cSrcweir        @param nType
96cdf0e10cSrcweir                type, see <type>TextMarkupType</type>.
97cdf0e10cSrcweir
98cdf0e10cSrcweir		@returns
99cdf0e10cSrcweir                <TRUE/>  if the respective text node has been checked
100cdf0e10cSrcweir                <FALSE/> otherwise.
101cdf0e10cSrcweir    */
102cdf0e10cSrcweir    boolean isChecked( [in] long nType );
103cdf0e10cSrcweir
104cdf0e10cSrcweir    //-------------------------------------------------------------------------
105cdf0e10cSrcweir    /** get the language of the specific text
106cdf0e10cSrcweir
107cdf0e10cSrcweir		@param  nPos
108cdf0e10cSrcweir                start index of the text.
109cdf0e10cSrcweir
110cdf0e10cSrcweir        @param  nLen
111cdf0e10cSrcweir                the length of the text.
112cdf0e10cSrcweir
113cdf0e10cSrcweir		@returns
114cdf0e10cSrcweir                the locale for the language identified.
115cdf0e10cSrcweir                If no language could be identified, the locale will be empty.
116cdf0e10cSrcweir
117cdf0e10cSrcweir        @throws IllegalArgumentException
118cdf0e10cSrcweir                when any argument is wrong.
119cdf0e10cSrcweir    */
120cdf0e10cSrcweir    com::sun::star::lang::Locale getLanguageOfText( [in] long nPos, [in] long nLen )
121cdf0e10cSrcweir            raises( com::sun::star::lang::IllegalArgumentException );
122cdf0e10cSrcweir
123cdf0e10cSrcweir    //-------------------------------------------------------------------------
124cdf0e10cSrcweir    /** get the single most probable language of the specific text,
125cdf0e10cSrcweir        especially after getLanguageOfText fails
126cdf0e10cSrcweir
127cdf0e10cSrcweir		@param  nPos
128cdf0e10cSrcweir                start index of the text.
129cdf0e10cSrcweir
130cdf0e10cSrcweir        @param  nLen
131cdf0e10cSrcweir                the length of the text.
132cdf0e10cSrcweir
133cdf0e10cSrcweir		@returns
134cdf0e10cSrcweir                the locale for the language identified.
135cdf0e10cSrcweir
136cdf0e10cSrcweir        @throws IllegalArgumentException
137cdf0e10cSrcweir                when any argument is wrong.
138cdf0e10cSrcweir    */
139cdf0e10cSrcweir    com::sun::star::lang::Locale getPrimaryLanguageOfText( [in] long nPos,
140cdf0e10cSrcweir                                                           [in] long nLen )
141cdf0e10cSrcweir            raises( com::sun::star::lang::IllegalArgumentException );
142cdf0e10cSrcweir
143cdf0e10cSrcweir    //-------------------------------------------------------------------------
144cdf0e10cSrcweir    /** replace the specific text with new text.
145cdf0e10cSrcweir
146cdf0e10cSrcweir		@param  nPos
147cdf0e10cSrcweir                start index of the text.
148cdf0e10cSrcweir
149cdf0e10cSrcweir        @param  nLen
150cdf0e10cSrcweir                the length of the text.
151cdf0e10cSrcweir
152cdf0e10cSrcweir        @param  nNewText
153cdf0e10cSrcweir                new text.
154cdf0e10cSrcweir
155cdf0e10cSrcweir        @param aAttributes
156cdf0e10cSrcweir                the given set of attributes e.g. Language
157cdf0e10cSrcweir
158cdf0e10cSrcweir        @throws IllegalArgumentException
159cdf0e10cSrcweir                when any argument is wrong.
160cdf0e10cSrcweir    */
161cdf0e10cSrcweir    void changeText( [in] long nPos, [in] long nLen, [in] string aNewText,
162cdf0e10cSrcweir                     [in] sequence<::com::sun::star::beans::PropertyValue> aAttributes )
163cdf0e10cSrcweir            raises( com::sun::star::lang::IllegalArgumentException );
164cdf0e10cSrcweir
165cdf0e10cSrcweir    //-------------------------------------------------------------------------
166cdf0e10cSrcweir    /** replace the attributes of the specific text with the given set of attributes.
167cdf0e10cSrcweir
168cdf0e10cSrcweir		@param  nPos
169cdf0e10cSrcweir                start index of the text.
170cdf0e10cSrcweir
171cdf0e10cSrcweir        @param  nLen
172cdf0e10cSrcweir                the length of the text.
173cdf0e10cSrcweir
174cdf0e10cSrcweir        @param aAttributes
175cdf0e10cSrcweir                the given set of attributes e.g. Language.
176cdf0e10cSrcweir
177cdf0e10cSrcweir        @throws IllegalArgumentException
178cdf0e10cSrcweir                when any argument is wrong.
179cdf0e10cSrcweir    */
180cdf0e10cSrcweir    void    changeAttributes( [in] long nPos, [in] long nLen,
181cdf0e10cSrcweir                              [in] sequence<::com::sun::star::beans::PropertyValue> aAttributes )
182cdf0e10cSrcweir            raises( com::sun::star::lang::IllegalArgumentException );
183cdf0e10cSrcweir
184cdf0e10cSrcweir    //-------------------------------------------------------------------------
185cdf0e10cSrcweir    /** get a list of indexes that separate each two different languages
186cdf0e10cSrcweir
187cdf0e10cSrcweir        @returns
188cdf0e10cSrcweir            a list of indices.
189cdf0e10cSrcweir    */
190cdf0e10cSrcweir    sequence< long > getLanguagePortions();
191cdf0e10cSrcweir};
192cdf0e10cSrcweir
193cdf0e10cSrcweir//=============================================================================
194cdf0e10cSrcweir
195cdf0e10cSrcweir}; }; }; };
196cdf0e10cSrcweir
197cdf0e10cSrcweir#endif
198