1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_text_XFlatParagraph_idl__
29 #define __com_sun_star_text_XFlatParagraph_idl__
31 #ifndef __com_sun_star_uno_XInterface_idl__
32 #include
<com
/sun
/star
/uno
/XInterface.idl
>
35 #ifndef __com_sun_star_lang_Locale_idl__
36 #include
<com
/sun
/star
/lang
/Locale.idl
>
39 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
40 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
43 #ifndef __com_sun_star_beans_PropertyValue_idl__
44 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
47 #ifndef __com_sun_star_text_XTextMarkup_idl__
48 #include
<com
/sun
/star
/text
/XTextMarkup.idl
>
51 //=============================================================================
53 module com
{ module sun
{ module star
{ module text
{
55 //=============================================================================
57 /** provides functionality to ...
62 interface XFlatParagraph
: com
::sun
::star
::text
::XTextMarkup
65 //-------------------------------------------------------------------------
66 /** get the content of the paragraph
69 the content of the paragraph.
73 //-------------------------------------------------------------------------
74 /** check whether the content has been modified
77 <TRUE/> if the content has been modified,
82 //-------------------------------------------------------------------------
83 /** change the 'checked' flag of the respective text node, i.e., mark the
84 text node as 'processed'
87 type, see <type>TextMarkupType</type>.
90 <TRUE/> the respective text node has been processed
91 <FALSE/> the respective text node needs to be processed again
94 void setChecked
( [in] long nType
, [in] boolean bVal
);
96 //-------------------------------------------------------------------------
97 /** returns whether the respective text node has already been processed
100 type, see <type>TextMarkupType</type>.
103 <TRUE/> if the respective text node has been checked
106 boolean isChecked
( [in] long nType
);
108 //-------------------------------------------------------------------------
109 /** get the language of the specific text
112 start index of the text.
115 the length of the text.
118 the locale for the language identified.
119 If no language could be identified, the locale will be empty.
121 @throws IllegalArgumentException
122 when any argument is wrong.
124 com
::sun
::star
::lang
::Locale getLanguageOfText
( [in] long nPos
, [in] long nLen
)
125 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
127 //-------------------------------------------------------------------------
128 /** get the single most probable language of the specific text,
129 especially after getLanguageOfText fails
132 start index of the text.
135 the length of the text.
138 the locale for the language identified.
140 @throws IllegalArgumentException
141 when any argument is wrong.
143 com
::sun
::star
::lang
::Locale getPrimaryLanguageOfText
( [in] long nPos
,
145 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
147 //-------------------------------------------------------------------------
148 /** replace the specific text with new text.
151 start index of the text.
154 the length of the text.
160 the given set of attributes e.g. Language
162 @throws IllegalArgumentException
163 when any argument is wrong.
165 void changeText
( [in] long nPos
, [in] long nLen
, [in] string aNewText
,
166 [in] sequence
<::com
::sun
::star
::beans
::PropertyValue
> aAttributes
)
167 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
169 //-------------------------------------------------------------------------
170 /** replace the attributes of the specific text with the given set of attributes.
173 start index of the text.
176 the length of the text.
179 the given set of attributes e.g. Language.
181 @throws IllegalArgumentException
182 when any argument is wrong.
184 void changeAttributes
( [in] long nPos
, [in] long nLen
,
185 [in] sequence
<::com
::sun
::star
::beans
::PropertyValue
> aAttributes
)
186 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
188 //-------------------------------------------------------------------------
189 /** get a list of indexes that separate each two different languages
194 sequence
< long > getLanguagePortions
();
197 //=============================================================================