1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XFlatParagraph.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_text_XFlatParagraph_idl__
32 #define __com_sun_star_text_XFlatParagraph_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include
<com
/sun
/star
/uno
/XInterface.idl
>
38 #ifndef __com_sun_star_lang_Locale_idl__
39 #include
<com
/sun
/star
/lang
/Locale.idl
>
42 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
43 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
46 #ifndef __com_sun_star_beans_PropertyValue_idl__
47 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
50 #ifndef __com_sun_star_text_XTextMarkup_idl__
51 #include
<com
/sun
/star
/text
/XTextMarkup.idl
>
54 //=============================================================================
56 module com
{ module sun
{ module star
{ module text
{
58 //=============================================================================
60 /** provides functionality to ...
65 interface XFlatParagraph
: com
::sun
::star
::text
::XTextMarkup
68 //-------------------------------------------------------------------------
69 /** get the content of the paragraph
72 the content of the paragraph.
76 //-------------------------------------------------------------------------
77 /** check whether the content has been modified
80 <TRUE/> if the content has been modified,
85 //-------------------------------------------------------------------------
86 /** change the 'checked' flag of the respective text node, i.e., mark the
87 text node as 'processed'
90 type, see <type>TextMarkupType</type>.
93 <TRUE/> the respective text node has been processed
94 <FALSE/> the respective text node needs to be processed again
97 void setChecked
( [in] long nType
, [in] boolean bVal
);
99 //-------------------------------------------------------------------------
100 /** returns whether the respective text node has already been processed
103 type, see <type>TextMarkupType</type>.
106 <TRUE/> if the respective text node has been checked
109 boolean isChecked
( [in] long nType
);
111 //-------------------------------------------------------------------------
112 /** get the language of the specific text
115 start index of the text.
118 the length of the text.
121 the locale for the language identified.
122 If no language could be identified, the locale will be empty.
124 @throws IllegalArgumentException
125 when any argument is wrong.
127 com
::sun
::star
::lang
::Locale getLanguageOfText
( [in] long nPos
, [in] long nLen
)
128 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
130 //-------------------------------------------------------------------------
131 /** get the single most probable language of the specific text,
132 especially after getLanguageOfText fails
135 start index of the text.
138 the length of the text.
141 the locale for the language identified.
143 @throws IllegalArgumentException
144 when any argument is wrong.
146 com
::sun
::star
::lang
::Locale getPrimaryLanguageOfText
( [in] long nPos
,
148 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
150 //-------------------------------------------------------------------------
151 /** replace the specific text with new text.
154 start index of the text.
157 the length of the text.
163 the given set of attributes e.g. Language
165 @throws IllegalArgumentException
166 when any argument is wrong.
168 void changeText
( [in] long nPos
, [in] long nLen
, [in] string aNewText
,
169 [in] sequence
<::com
::sun
::star
::beans
::PropertyValue
> aAttributes
)
170 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
172 //-------------------------------------------------------------------------
173 /** replace the attributes of the specific text with the given set of attributes.
176 start index of the text.
179 the length of the text.
182 the given set of attributes e.g. Language.
184 @throws IllegalArgumentException
185 when any argument is wrong.
187 void changeAttributes
( [in] long nPos
, [in] long nLen
,
188 [in] sequence
<::com
::sun
::star
::beans
::PropertyValue
> aAttributes
)
189 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
191 //-------------------------------------------------------------------------
192 /** get a list of indexes that separate each two different languages
197 sequence
< long > getLanguagePortions
();
200 //=============================================================================