Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / text / XFlatParagraph.idl
blob2948e467518c9d55766de9c32726bb2526ecca2d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 ...
35 @since OOo 3.0
38 interface XFlatParagraph: com::sun::star::text::XTextMarkup
41 /** get the content of the paragraph
43 @returns
44 the content of the paragraph.
46 string getText();
48 /** check whether the content has been modified
50 @returns
51 `TRUE` if the content has been modified,
52 `FALSE` otherwise.
54 boolean isModified();
56 /** change the "checked" flag of the respective text node, i.e., mark the
57 text node as "processed"
59 @param nType
60 type, see TextMarkupType.
62 @param bVal
63 `TRUE` the respective text node has been processed
64 `FALSE` the respective text node needs to be processed again
65 later
67 void setChecked( [in] long nType, [in] boolean bVal );
69 /** returns whether the respective text node has already been processed
71 @param nType
72 type, see TextMarkupType.
74 @returns
75 `TRUE` if the respective text node has been checked
76 `FALSE` otherwise.
78 boolean isChecked( [in] long nType );
80 /** get the language of the specific text
82 @param nPos
83 start index of the text.
85 @param nLen
86 the length of the text.
88 @returns
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
101 @param nPos
102 start index of the text.
104 @param nLen
105 the length of the text.
107 @returns
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,
114 [in] long nLen )
115 raises( com::sun::star::lang::IllegalArgumentException );
117 /** replace the specific text with new text.
119 @param nPos
120 start index of the text.
122 @param nLen
123 the length of the text.
125 @param NewText
126 new text.
128 @param aAttributes
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.
140 @param nPos
141 start index of the text.
143 @param nLen
144 the length of the text.
146 @param aAttributes
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
158 @returns
159 a list of indices.
161 sequence< long > getLanguagePortions();
165 }; }; }; };
167 #endif
169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */