xref: /aoo41x/main/offapi/com/sun/star/text/Shape.idl (revision cdf0e10c)
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#ifndef __com_sun_star_text_Shape_idl__
28#define __com_sun_star_text_Shape_idl__
29
30#ifndef __com_sun_star_text_TextContent_idl__
31#include <com/sun/star/text/TextContent.idl>
32#endif
33#ifndef __com_sun_star_text_XTextFrame_idl__
34#include <com/sun/star/text/XTextFrame.idl>
35#endif
36#ifndef __com_sun_star_text_XTextRange_idl__
37#include <com/sun/star/text/XTextRange.idl>
38#endif
39#ifndef __com_sun_star_drawing_Shape_idl__
40#include <com/sun/star/drawing/Shape.idl>
41#endif
42#ifndef __com_sun_star_text_TextContentAnchorType_idl__
43#include <com/sun/star/text/TextContentAnchorType.idl>
44#endif
45#ifndef __com_sun_star_text_WrapTextMode_idl__
46#include <com/sun/star/text/WrapTextMode.idl>
47#endif
48
49//=============================================================================
50
51 module com {  module sun {  module star {  module text {
52
53//=============================================================================
54
55/** specifies the service of shapes in a text document
56 */
57published service Shape
58{
59    service com::sun::star::drawing::Shape;
60    //-------------------------------------------------------------------------
61	/** contains the number of the page where the objects are anchored.
62		<p> The value is valid only if the
63		AnchorType is
64		<const>TextContentAnchorType::AT_PAGE</const>.</p>
65	 */
66	[property] short AnchorPageNo;
67    //-------------------------------------------------------------------------
68    /** contains the text frame the current frame is anchored to.
69		<p> The value is valid only if the
70        AnchorType is <const>TextContentAnchorType::AT_FRAME</const>.</p>
71	 */
72    [property] com::sun::star::text::XTextFrame AnchorFrame;
73    //-------------------------------------------------------------------------
74	/** specifies how the text content is attached to its surrounding
75		<type>Text</type>.
76	*/
77	[optional, property] com::sun::star::text::TextContentAnchorType AnchorType;
78    //-------------------------------------------------------------------------
79	/** determines the horizontal orientation of the object.
80
81		@see BaseFrame::HoriOrientation
82	 */
83	[property] short HoriOrient;
84	//-------------------------------------------------------------------------
85	/** contains the horizontal position of the object (1/100 mm).
86		<p> It is only valid if "HoriOrient" is HoriOrientation_NONE.</p>
87	 */
88	[property] long HoriOrientPosition;
89
90	//-------------------------------------------------------------------------
91	/** determines the environment of the object to which the orientation
92		is related.
93
94		@see BaseFrame::RelOrientation
95	 */
96	[property] short HoriOrientRelation;
97
98	//-------------------------------------------------------------------------
99	/** determines the vertical orientation of the object.
100
101		@see BaseFrame::VertOrientation
102	 */
103	[property] short VertOrient;
104
105	//-------------------------------------------------------------------------
106	/** contains the vertical position of the object (1/100 mm).
107
108		It is only valid if <member>TextEmbeddedObject::VertOrient</member> is
109		<const>VertOrientation::NONE</const>.
110	 */
111	[property] long VertOrientPosition;
112
113	//-------------------------------------------------------------------------
114
115	/** determines the environment of the object to which the orientation is related.
116
117		@see BaseFrame::RelOrientation
118	 */
119	[property] short VertOrientRelation;
120    //-------------------------------------------------------------------------
121	/** contains the left margin of the object.
122	 */
123	[property] long LeftMargin;
124
125	//-------------------------------------------------------------------------
126	/** contains the right margin of the object.
127	 */
128	[property] long RightMargin;
129    //-------------------------------------------------------------------------
130
131	/** contains the top margin of the object.
132	 */
133	[property] long TopMargin;
134
135	//-------------------------------------------------------------------------
136	/** contains the bottom margin of the object.
137	 */
138	[property] long BottomMargin;
139    //-------------------------------------------------------------------------
140	/** determines the type of the surrounding text.
141
142        @deprecated
143	 */
144    [property] com::sun::star::text::WrapTextMode Surround;
145    //-------------------------------------------------------------------------
146	/** determines if the text of the paragraph in which the object
147		is anchored, wraps around the object.
148	 */
149	[property] boolean SurroundAnchorOnly;
150    //-------------------------------------------------------------------------
151
152	/** determines if the text wraps around the contour of the object.
153	 */
154	[property] boolean SurroundContour;
155	//-------------------------------------------------------------------------
156
157	/** the text flows only around the contour of the object.
158	 */
159	[property] boolean ContourOutside;
160    //-------------------------------------------------------------------------
161	/** determines if the object is opaque or transparent for text.
162	 */
163	[property] boolean Opaque;
164    //-------------------------------------------------------------------------
165    /** contains a text range where the shape should be anchored to.
166     <p>There are two different ways to get newly created shapes into the
167     text document. One of them is to use the insertTextContent() method of
168     the <type scope="com::sun::star::text">XSimpleText</type>. The other is to call the add()
169     method of the <type scope="com::sun::star::drawing">XShapes</type> interface.
170     To be able to determine an anchor position for shape that are anchored at a certain
171     text position the property TextRange is used.</p>
172
173     <p>This property is used when the shape gets inserted/added
174     and becomes invalid after that.</p>
175
176     */
177    [property] com::sun::star::text::XTextRange TextRange;
178
179    //-------------------------------------------------------------------------
180        /** determines the influence of the text wrap on the positioning of the
181            shape
182
183            <p>The value of this property is only evaluated for the positioning
184            of the shape, if the text document setting ConsiderTextWrapOnObjPos
185            is <TRUE/>. Valid values are given by <member>WrapInfluenceOnPosition</member></p>
186
187            @since OOo 2.0
188         */
189        [optional, property] short WrapInfluenceOnPosition;
190
191    //-------------------------------------------------------------------------
192    /** determines the transformation of the shape in horizontal left-to-right
193        layout
194
195        <p>This property is needed for the export of the OASIS Open Office
196        file format to the OpenOffice.org file format. It provides the
197        transformation property of the included service com::sun::star::drawing::Shape
198        converted to the horizontal left-to-right layout.</p>
199
200        @since OOo 2.0
201    */
202    [optional, readonly, property] com::sun::star::drawing::HomogenMatrix3 TransformationInHoriL2R;
203    //-------------------------------------------------------------------------
204    /** determines layout direction the position attributes of the shape
205        is given
206
207        <p>Valid values are given by <member>PositionLayoutDir</member></p>
208
209        @since OOo 2.0
210     */
211    [optional, property] short PositionLayoutDir;
212    //-------------------------------------------------------------------------
213    /** determines the start position of the shape in horizontal left-to-right
214        layout
215
216        <p>This property is needed for the export of the OASIS Open Office
217        file format to the OpenOffice.org file format. It provides the
218        start position property of the included service com::sun::star::drawing::Shape
219        converted to the horizontal left-to-right layout.</p>
220
221        @since OOo 2.0
222    */
223    [optional, readonly, property] com::sun::star::awt::Point StartPositionInHoriL2R;
224    //-------------------------------------------------------------------------
225    /** determines the end position of the shape in horizontal left-to-right
226        layout
227
228        <p>This property is needed for the export of the OASIS Open Office
229        file format to the OpenOffice.org file format. It provides the
230        end position property of the included service com::sun::star::drawing::Shape
231        converted to the horizontal left-to-right layout.</p>
232
233        @since OOo 2.0
234    */
235    [optional, readonly, property] com::sun::star::awt::Point EndPositionInHoriL2R;
236};
237
238//=============================================================================
239
240}; }; }; };
241
242#endif
243