1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_text_XFlatParagraph_idl__ 25#define __com_sun_star_text_XFlatParagraph_idl__ 26 27#ifndef __com_sun_star_uno_XInterface_idl__ 28#include <com/sun/star/uno/XInterface.idl> 29#endif 30 31#ifndef __com_sun_star_lang_Locale_idl__ 32#include <com/sun/star/lang/Locale.idl> 33#endif 34 35#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 36#include <com/sun/star/lang/IllegalArgumentException.idl> 37#endif 38 39#ifndef __com_sun_star_beans_PropertyValue_idl__ 40#include <com/sun/star/beans/PropertyValue.idl> 41#endif 42 43#ifndef __com_sun_star_text_XTextMarkup_idl__ 44#include <com/sun/star/text/XTextMarkup.idl> 45#endif 46 47//============================================================================= 48 49module com { module sun { module star { module text { 50 51//============================================================================= 52 53/** provides functionality to ... 54 55 @since OpenOffice 3.0 56 */ 57 58interface XFlatParagraph: com::sun::star::text::XTextMarkup 59{ 60 61 //------------------------------------------------------------------------- 62 /** get the content of the paragraph 63 64 @returns 65 the content of the paragraph. 66 */ 67 string getText(); 68 69 //------------------------------------------------------------------------- 70 /** check whether the content has been modified 71 72 @returns 73 <TRUE/> if the content has been modified, 74 <FALSE/> otherwise. 75 */ 76 boolean isModified(); 77 78 //------------------------------------------------------------------------- 79 /** change the 'checked' flag of the respective text node, i.e., mark the 80 text node as 'processed' 81 82 @param nType 83 type, see <type>TextMarkupType</type>. 84 85 @param bVal 86 <TRUE/> the respective text node has been processed 87 <FALSE/> the respective text node needs to be processed again 88 later 89 */ 90 void setChecked( [in] long nType, [in] boolean bVal ); 91 92 //------------------------------------------------------------------------- 93 /** returns whether the respective text node has already been processed 94 95 @param nType 96 type, see <type>TextMarkupType</type>. 97 98 @returns 99 <TRUE/> if the respective text node has been checked 100 <FALSE/> otherwise. 101 */ 102 boolean isChecked( [in] long nType ); 103 104 //------------------------------------------------------------------------- 105 /** get the language of the specific text 106 107 @param nPos 108 start index of the text. 109 110 @param nLen 111 the length of the text. 112 113 @returns 114 the locale for the language identified. 115 If no language could be identified, the locale will be empty. 116 117 @throws IllegalArgumentException 118 when any argument is wrong. 119 */ 120 com::sun::star::lang::Locale getLanguageOfText( [in] long nPos, [in] long nLen ) 121 raises( com::sun::star::lang::IllegalArgumentException ); 122 123 //------------------------------------------------------------------------- 124 /** get the single most probable language of the specific text, 125 especially after getLanguageOfText fails 126 127 @param nPos 128 start index of the text. 129 130 @param nLen 131 the length of the text. 132 133 @returns 134 the locale for the language identified. 135 136 @throws IllegalArgumentException 137 when any argument is wrong. 138 */ 139 com::sun::star::lang::Locale getPrimaryLanguageOfText( [in] long nPos, 140 [in] long nLen ) 141 raises( com::sun::star::lang::IllegalArgumentException ); 142 143 //------------------------------------------------------------------------- 144 /** replace the specific text with new text. 145 146 @param nPos 147 start index of the text. 148 149 @param nLen 150 the length of the text. 151 152 @param nNewText 153 new text. 154 155 @param aAttributes 156 the given set of attributes e.g. Language 157 158 @throws IllegalArgumentException 159 when any argument is wrong. 160 */ 161 void changeText( [in] long nPos, [in] long nLen, [in] string aNewText, 162 [in] sequence<::com::sun::star::beans::PropertyValue> aAttributes ) 163 raises( com::sun::star::lang::IllegalArgumentException ); 164 165 //------------------------------------------------------------------------- 166 /** replace the attributes of the specific text with the given set of attributes. 167 168 @param nPos 169 start index of the text. 170 171 @param nLen 172 the length of the text. 173 174 @param aAttributes 175 the given set of attributes e.g. Language. 176 177 @throws IllegalArgumentException 178 when any argument is wrong. 179 */ 180 void changeAttributes( [in] long nPos, [in] long nLen, 181 [in] sequence<::com::sun::star::beans::PropertyValue> aAttributes ) 182 raises( com::sun::star::lang::IllegalArgumentException ); 183 184 //------------------------------------------------------------------------- 185 /** get a list of indexes that separate each two different languages 186 187 @returns 188 a list of indices. 189 */ 190 sequence< long > getLanguagePortions(); 191}; 192 193//============================================================================= 194 195}; }; }; }; 196 197#endif 198