merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / text / TextFrame.idl
blobe43b3d79197cb53760e7c8cd68bf13c3f5e8a057
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_text_TextFrame_idl__
28 #define __com_sun_star_text_TextFrame_idl__
30 #ifndef __com_sun_star_text_XTextFrame_idl__
31 #include <com/sun/star/text/XTextFrame.idl>
32 #endif
34 #ifndef __com_sun_star_text_BaseFrame_idl__
35 #include <com/sun/star/text/BaseFrame.idl>
36 #endif
38 //=============================================================================
40 module com { module sun { module star { module text {
42 //=============================================================================
44 /** specifies a rectangular shape which contains a <type>Text</type> object
45 and is attached to a piece of surrounding <type>Text</type>.
47 @see Text
49 @example StarBasic
51 <p>This example shows how to create a <type>TextFrame</type> and insert
52 it at the very beginning of <type>Text</type> component. The macro
53 is ready to run, if it is a script within a text document. </p>
55 <listing>
56 Sub Main
57 oFrame = ThisComponent.createInstance( "com.sun.star.text.TextFrame" )
58 oFrame.Width = 6000
59 ThisComponent.Text.insertTextContent( ThisComponent.Text.Start, oFrame, false )
60 oFrame.Text.String = "Hello, this text is within the frame."
61 End Sub
62 </listing>
64 published service TextFrame
66 /** contains the definition of interfaces and properties that are supported by text frames,
67 graphic objects and embeddedobjects.
69 service BaseFrame;
71 /** This interface makes it possible to access the text within this
72 text frame.
74 interface com::sun::star::text::XTextFrame;
75 //-------------------------------------------------------------------------
76 /** contains the metric height value of the frame.
78 [property] long FrameHeightAbsolute;
80 //-------------------------------------------------------------------------
81 /** contains the metric width value of the frame.
83 [property] long FrameWidthAbsolute;
85 //-------------------------------------------------------------------------
87 /** specifies a width relative to the width of the
88 surrounding text.
89 <p>If the value for "WidthPercent" is 0, the absolute value from
90 is used.</p>
92 [property] byte FrameWidthPercent;
94 //-------------------------------------------------------------------------
95 /** specifies a width relative to the width of the
96 surrounding text.
98 <p>If the value for "HeightPercent" is 0, the absolute value from
99 is used.</p>
101 [property] byte FrameHeightPercent;
102 //-------------------------------------------------------------------------
103 /** If "AutomaticHeight" is set, then the object grows if it is required
104 by the frame content.
106 [property] boolean FrameIsAutomaticHeight;
107 //-------------------------------------------------------------------------
108 /** determines the interpretation of the height and relative
109 height properties.
111 @see SizeType
113 [property] short SizeType;
114 //-------------------------------------------------------------------------
115 /** determines if the text frame should be editable in a read-only document.
116 (This is usually used in forms.)
119 [optional, property] boolean EditInReadonly;
121 //-------------------------------------------------------------------------
122 /** determines the interpretation of the width and relative
123 width properties.
125 @see SizeType
126 @since OOo 2.4
128 [optional, property] short WidthType;
130 //-----------------------------------------------------------------------------
131 /** contains the writing direction, as represented by the
132 <type scope="com::sun::star::text">WritingMode2</type> constants
134 [optional, property] short WritingMode;
136 //-----------------------------------------------------------------------------
137 /** controls, if the frame follows the text flow or can leave its layout environment
139 <p>If set, the frame follows the text flow and doesn't leaves the layout
140 environment, which is given by its anchor, above and below.
141 E.g.: Anchor resides in the document body then the frame doesn't leave
142 the document body above and below and follows the text flow through
143 the document bodies of the different pages.
145 If not set, the frame doesn't follow the text flow and stays on the page,
146 on which its anchor is found, but it may leave the layout environment,
147 which is given by its anchor.
148 E.g.: Anchor resides in the document body then the frame stays on page,
149 where this document body is, but it could leave the document body above
150 and below, e.g. overlapping with the page header.
152 Note: The areas for the vertical orientation relation at page areas are
153 interpreted in dependence to this property (@see BaseFrameProperties.VertOrientRelation).
154 If property is set, the page area is interpreted as the layout environment,
155 given by its anchor. E.g.: Anchor resides in the page header then the
156 page header determines the page area. If property isn't set, the page area is
157 determined by the document page, the anchor is on. E.g.: Anchor resides
158 in the page header then the document page, the page header is on, determines
159 the page area.
160 An exception of this interpretation rule is applied, if the anchor resides
161 in a table cell. In this situation the page area is always detemined by
162 the table cell.</p>
164 [optional, property] boolean IsFollowingTextFlow;
168 //=============================================================================
170 }; }; }; };
172 #endif