Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / text / TextPortion.idl
blob3d490c3de6d57b676e30da2cb561d57da13bfc16
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 .
19 #ifndef __com_sun_star_text_TextPortion_idl__
20 #define __com_sun_star_text_TextPortion_idl__
23 #include <com/sun/star/beans/XTolerantMultiPropertySet.idl>
24 #include <com/sun/star/container/XContentEnumerationAccess.idl>
25 #include <com/sun/star/text/TextRange.idl>
26 #include <com/sun/star/text/XTextContent.idl>
27 #include <com/sun/star/text/XTextField.idl>
28 #include <com/sun/star/text/XFootnote.idl>
32 module com { module sun { module star { module text {
34 /** A TextPortion is a piece of text within a paragraph that does not
35 contain changes of its attributes inside.
37 <p>
38 It is created by an enumeration implemented in a paragraph service.
39 It may be used to export the content of the paragraph to an external
40 document format.
41 </p>
43 @see com::sun::star::text::TextPortionEnumeration
44 @see com::sun::star::text::XTextPortionEnumeration
46 published service TextPortion
48 service ::com::sun::star::text::TextRange;
50 /** contains text frames, graphic objects, embedded objects or
51 shapes that are anchored at or as character.
52 @see com::sun::star::text::TextFrame
53 @see com::sun::star::text::TextGraphicObject
55 [optional]
56 interface ::com::sun::star::container::XContentEnumerationAccess;
58 /** gives access to a sequence of properties.
59 @since OOo 2.0
61 [optional]
62 interface ::com::sun::star::beans::XTolerantMultiPropertySet;
64 /** contains the type of the text portion.
66 <p> Valid content type names are:</p>
67 <dl>
68 <dt>Text</dt><dd>string content</dd>
69 <dt>TextField</dt><dd>a text field</dd>
70 <dt>TextContent</dt><dd>text content - supplied via the
71 interface com::sun::star::container::XContentEnumerationAccess</dd>
72 <dt>ControlCharacter</dt><dd>a control character</dd>
73 <dt>Footnote</dt><dd>a footnote or an endnote</dd>
74 <dt>ReferenceMark</dt><dd>a reference mark</dd>
75 <dt>DocumentIndexMark</dt><dd>a document index mark</dd>
76 <dt>Bookmark</dt><dd>a bookmark</dd>
77 <dt>Redline</dt><dd>a redline portion which is a result
78 of the change tracking feature</dd>
79 <dt>Ruby</dt><dd>a ruby attribute which is used in Asian text</dd>
80 <dt>Frame</dt><dd>a frame</dd>
81 <dt>SoftPageBreak</dt><dd>a soft page break</dd>
82 <dt>InContentMetadata</dt><dd>a text range with attached metadata</dd>
83 </dl>
84 <p>For Reference marks, document index marks, etc., 2 text portions
85 will be generated, one for the start position and one for the
86 end position.</p>
88 [readonly, property] string TextPortionType;
90 /** contains the control character of a text portion of type
91 ControlCharacter.
92 @deprecated type ControlCharacter no longer implemented
94 [readonly, property] short ControlCharacter;
96 /** contains the bookmark of a text portion of type Bookmark. */
97 [optional, readonly, property]
98 ::com::sun::star::text::XTextContent Bookmark;
100 /** contains the document index mark of a text portion of type
101 DocumentIndexMark. */
102 [optional, readonly, property]
103 ::com::sun::star::text::XTextContent DocumentIndexMark;
105 /** contains the bookmark of a text portion of type ReferenceMark. */
106 [optional, readonly, property]
107 ::com::sun::star::text::XTextContent ReferenceMark;
109 /** contains the footnote of a text portion of type Footnote. */
110 [optional, readonly, property]
111 ::com::sun::star::text::XFootnote Footnote;
113 /** contains the text field of a text portion of type TextField. */
114 [optional, readonly, property]
115 ::com::sun::star::text::XTextField TextField;
117 /** contains the text range of a text portion of type InContentMetadata.
118 @since OOo 3.2
120 [optional, readonly, property]
121 ::com::sun::star::text::XTextContent InContentMetadata;
123 /** contains whether the portion is a point only. */
124 [optional, readonly, property] boolean IsCollapsed;
126 /** contains whether the portion is the start of the portion.
128 <p>This is used for portions which are represented by
129 2 TextPortion objects (e.g., DocmentIndexMark).</p>
131 [optional, readonly, property] boolean IsStart;
136 }; }; }; };
137 #endif
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */