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 .
21 module com
{ module sun
{ module star
{ module text
{
24 /** provides functionality to ...
29 interface XFlatParagraph
: com
::sun
::star
::text
::XTextMarkup
32 /** get the content of the paragraph
35 the content of the paragraph.
39 /** check whether the content has been modified
42 `TRUE` if the content has been modified,
47 /** change the "checked" flag of the respective text node, i.e., mark the
48 text node as "processed"
51 type, see TextMarkupType.
54 `TRUE` the respective text node has been processed
55 `FALSE` the respective text node needs to be processed again
58 void setChecked
( [in] long nType
, [in] boolean bVal
);
60 /** returns whether the respective text node has already been processed
63 type, see TextMarkupType.
66 `TRUE` if the respective text node has been checked
69 boolean isChecked
( [in] long nType
);
71 /** get the language of the specific text
74 start index of the text.
77 the length of the text.
80 the locale for the language identified.
81 If no language could be identified, the locale will be empty.
83 @throws IllegalArgumentException
84 when any argument is wrong.
86 com
::sun
::star
::lang
::Locale getLanguageOfText
( [in] long nPos
, [in] long nLen
)
87 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
89 /** get the single most probable language of the specific text,
90 especially after getLanguageOfText fails
93 start index of the text.
96 the length of the text.
99 the locale for the language identified.
101 @throws IllegalArgumentException
102 when any argument is wrong.
104 com
::sun
::star
::lang
::Locale getPrimaryLanguageOfText
( [in] long nPos
,
106 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
108 /** replace the specific text with new text.
111 start index of the text.
114 the length of the text.
120 the given set of attributes e.g. Language
122 @throws IllegalArgumentException
123 when any argument is wrong.
125 void changeText
( [in] long nPos
, [in] long nLen
, [in] string NewText
,
126 [in] sequence
<::com
::sun
::star
::beans
::PropertyValue
> aAttributes
)
127 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
129 /** replace the attributes of the specific text with the given set of attributes.
132 start index of the text.
135 the length of the text.
138 the given set of attributes e.g. Language.
140 @throws IllegalArgumentException
141 when any argument is wrong.
143 void changeAttributes
( [in] long nPos
, [in] long nLen
,
144 [in] sequence
<::com
::sun
::star
::beans
::PropertyValue
> aAttributes
)
145 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
147 /** get a list of indexes that separate each two different languages
152 sequence
< long > getLanguagePortions
();
158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */