1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_text_XFlatParagraph_idl__ 29#define __com_sun_star_text_XFlatParagraph_idl__ 30 31#ifndef __com_sun_star_uno_XInterface_idl__ 32#include <com/sun/star/uno/XInterface.idl> 33#endif 34 35#ifndef __com_sun_star_lang_Locale_idl__ 36#include <com/sun/star/lang/Locale.idl> 37#endif 38 39#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 40#include <com/sun/star/lang/IllegalArgumentException.idl> 41#endif 42 43#ifndef __com_sun_star_beans_PropertyValue_idl__ 44#include <com/sun/star/beans/PropertyValue.idl> 45#endif 46 47#ifndef __com_sun_star_text_XTextMarkup_idl__ 48#include <com/sun/star/text/XTextMarkup.idl> 49#endif 50 51//============================================================================= 52 53module com { module sun { module star { module text { 54 55//============================================================================= 56 57/** provides functionality to ... 58 59 @since OOo 3.0 60 */ 61 62interface XFlatParagraph: com::sun::star::text::XTextMarkup 63{ 64 65 //------------------------------------------------------------------------- 66 /** get the content of the paragraph 67 68 @returns 69 the content of the paragraph. 70 */ 71 string getText(); 72 73 //------------------------------------------------------------------------- 74 /** check whether the content has been modified 75 76 @returns 77 <TRUE/> if the content has been modified, 78 <FALSE/> otherwise. 79 */ 80 boolean isModified(); 81 82 //------------------------------------------------------------------------- 83 /** change the 'checked' flag of the respective text node, i.e., mark the 84 text node as 'processed' 85 86 @param nType 87 type, see <type>TextMarkupType</type>. 88 89 @param bVal 90 <TRUE/> the respective text node has been processed 91 <FALSE/> the respective text node needs to be processed again 92 later 93 */ 94 void setChecked( [in] long nType, [in] boolean bVal ); 95 96 //------------------------------------------------------------------------- 97 /** returns whether the respective text node has already been processed 98 99 @param nType 100 type, see <type>TextMarkupType</type>. 101 102 @returns 103 <TRUE/> if the respective text node has been checked 104 <FALSE/> otherwise. 105 */ 106 boolean isChecked( [in] long nType ); 107 108 //------------------------------------------------------------------------- 109 /** get the language of the specific text 110 111 @param nPos 112 start index of the text. 113 114 @param nLen 115 the length of the text. 116 117 @returns 118 the locale for the language identified. 119 If no language could be identified, the locale will be empty. 120 121 @throws IllegalArgumentException 122 when any argument is wrong. 123 */ 124 com::sun::star::lang::Locale getLanguageOfText( [in] long nPos, [in] long nLen ) 125 raises( com::sun::star::lang::IllegalArgumentException ); 126 127 //------------------------------------------------------------------------- 128 /** get the single most probable language of the specific text, 129 especially after getLanguageOfText fails 130 131 @param nPos 132 start index of the text. 133 134 @param nLen 135 the length of the text. 136 137 @returns 138 the locale for the language identified. 139 140 @throws IllegalArgumentException 141 when any argument is wrong. 142 */ 143 com::sun::star::lang::Locale getPrimaryLanguageOfText( [in] long nPos, 144 [in] long nLen ) 145 raises( com::sun::star::lang::IllegalArgumentException ); 146 147 //------------------------------------------------------------------------- 148 /** replace the specific text with new text. 149 150 @param nPos 151 start index of the text. 152 153 @param nLen 154 the length of the text. 155 156 @param nNewText 157 new text. 158 159 @param aAttributes 160 the given set of attributes e.g. Language 161 162 @throws IllegalArgumentException 163 when any argument is wrong. 164 */ 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 ); 168 169 //------------------------------------------------------------------------- 170 /** replace the attributes of the specific text with the given set of attributes. 171 172 @param nPos 173 start index of the text. 174 175 @param nLen 176 the length of the text. 177 178 @param aAttributes 179 the given set of attributes e.g. Language. 180 181 @throws IllegalArgumentException 182 when any argument is wrong. 183 */ 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 ); 187 188 //------------------------------------------------------------------------- 189 /** get a list of indexes that separate each two different languages 190 191 @returns 192 a list of indices. 193 */ 194 sequence< long > getLanguagePortions(); 195}; 196 197//============================================================================= 198 199}; }; }; }; 200 201#endif 202