tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / offapi / com / sun / star / text / XSimpleText.idl
blob5b2a752cdbdec59ed4836f41d84663a6521b8870
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 .
22 module com { module sun { module star { module text {
25 /** is the main interface for a distinct text unit, i.e. the main text of
26 a document, the text for headers and footers or for single cells of a
27 table.@see XText
29 published interface XSimpleText: com::sun::star::text::XTextRange
32 /** @returns
33 a new instance of a TextCursor service which can
34 be used to travel in the given text context.
36 @see com::sun::star::text::TextCursor
38 com::sun::star::text::XTextCursor createTextCursor();
41 /** @returns
42 a new instance of a TextCursor which is located
43 at the specified TextRange to travel in the
44 given text context.
46 <p>The initial position is set to <var>aTextPosition</var>.
48 @param aTextPosition
49 specifies the start position for the new
50 TextCursor.
52 @see com::sun::star::text::TextCursor
54 com::sun::star::text::XTextCursor createTextCursorByRange( [in] com::sun::star::text::XTextRange aTextPosition );
57 /** inserts a string of characters into the text.
59 <p>The string may contain the following white spaces:
60 </p>
61 <ul>
62 <li>blank</li>
63 <li>tab</li>
64 <li>cr (which will insert a paragraph break)</li>
65 <li>lf (which will insert a line break)</li>
66 </ul>
68 @param xRange
69 specifies the position of insertion. For example,
70 XSimpleText::createTextCursor() can be used to
71 get an XTextRange for this argument.
73 <p>If the parameter bAbsorb() was `TRUE`
74 the text range will contain the new inserted string, otherwise
75 the range (and it's text) will remain unchanged.
77 @param aString
78 specifies the string to insert.
80 @param bAbsorb
81 specifies whether the text spanned by <var>xRange</var> will be
82 replaced. If `TRUE` then the content of <var>xRange</var> will
83 be replaced by <var>aString</var>, otherwise <var>aString</var>
84 will be inserted at the beginning of <var>xRange</var>.
86 @code{.java}
87 xText.insertString( xTextCursor, "Hello " + aName + ",", false )
89 xText.insertControlCharacter( xTextCursor,
90 ControlCharacter.PARAGRAPH_BREAK, false );
92 xText.insertString( xTextCursor, "more text ...", false )
93 @endcode
95 void insertString( [in] com::sun::star::text::XTextRange xRange,
96 [in] string aString,
97 [in] boolean bAbsorb );
100 /** inserts a control character (like a paragraph break or a hard
101 space) into the text.@see com::sun::star::text::ControlCharacter
103 void insertControlCharacter( [in] com::sun::star::text::XTextRange xRange,
104 [in] short nControlCharacter,
105 [in] boolean bAbsorb )
106 raises( com::sun::star::lang::IllegalArgumentException );
111 }; }; }; };
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */