1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_text_XFlatParagraph_idl__
21 #define __com_sun_star_text_XFlatParagraph_idl__
23 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/lang
/Locale.idl
>
25 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
26 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
27 #include
<com
/sun
/star
/text
/XTextMarkup.idl
>
30 module com
{ module sun
{ module star
{ module text
{
33 /** provides functionality to ...
38 interface XFlatParagraph
: com
::sun
::star
::text
::XTextMarkup
41 /** get the content of the paragraph
44 the content of the paragraph.
48 /** check whether the content has been modified
51 `TRUE` if the content has been modified,
56 /** change the "checked" flag of the respective text node, i.e., mark the
57 text node as "processed"
60 type, see TextMarkupType.
63 `TRUE` the respective text node has been processed
64 `FALSE` the respective text node needs to be processed again
67 void setChecked
( [in] long nType
, [in] boolean bVal
);
69 /** returns whether the respective text node has already been processed
72 type, see TextMarkupType.
75 `TRUE` if the respective text node has been checked
78 boolean isChecked
( [in] long nType
);
80 /** get the language of the specific text
83 start index of the text.
86 the length of the text.
89 the locale for the language identified.
90 If no language could be identified, the locale will be empty.
92 @throws IllegalArgumentException
93 when any argument is wrong.
95 com
::sun
::star
::lang
::Locale getLanguageOfText
( [in] long nPos
, [in] long nLen
)
96 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
98 /** get the single most probable language of the specific text,
99 especially after getLanguageOfText fails
102 start index of the text.
105 the length of the text.
108 the locale for the language identified.
110 @throws IllegalArgumentException
111 when any argument is wrong.
113 com
::sun
::star
::lang
::Locale getPrimaryLanguageOfText
( [in] long nPos
,
115 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
117 /** replace the specific text with new text.
120 start index of the text.
123 the length of the text.
129 the given set of attributes e.g. Language
131 @throws IllegalArgumentException
132 when any argument is wrong.
134 void changeText
( [in] long nPos
, [in] long nLen
, [in] string NewText
,
135 [in] sequence
<::com
::sun
::star
::beans
::PropertyValue
> aAttributes
)
136 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
138 /** replace the attributes of the specific text with the given set of attributes.
141 start index of the text.
144 the length of the text.
147 the given set of attributes e.g. Language.
149 @throws IllegalArgumentException
150 when any argument is wrong.
152 void changeAttributes
( [in] long nPos
, [in] long nLen
,
153 [in] sequence
<::com
::sun
::star
::beans
::PropertyValue
> aAttributes
)
154 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
156 /** get a list of indexes that separate each two different languages
161 sequence
< long > getLanguagePortions
();
169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */