xref: /aoo41x/main/offapi/com/sun/star/text/TextFrame.idl (revision cdf0e10c)
1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_text_TextFrame_idl__
28*cdf0e10cSrcweir#define __com_sun_star_text_TextFrame_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_text_XTextFrame_idl__
31*cdf0e10cSrcweir#include <com/sun/star/text/XTextFrame.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir#ifndef __com_sun_star_text_BaseFrame_idl__
35*cdf0e10cSrcweir#include <com/sun/star/text/BaseFrame.idl>
36*cdf0e10cSrcweir#endif
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir//=============================================================================
39*cdf0e10cSrcweir
40*cdf0e10cSrcweir module com {  module sun {  module star {  module text {
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir//=============================================================================
43*cdf0e10cSrcweir
44*cdf0e10cSrcweir/** specifies a rectangular shape which contains a <type>Text</type> object
45*cdf0e10cSrcweir	and is attached to a piece of surrounding <type>Text</type>.
46*cdf0e10cSrcweir
47*cdf0e10cSrcweir	@see Text
48*cdf0e10cSrcweir
49*cdf0e10cSrcweir	@example StarBasic
50*cdf0e10cSrcweir
51*cdf0e10cSrcweir	<p>This example shows how to create a <type>TextFrame</type> and insert
52*cdf0e10cSrcweir	it at the very beginning of <type>Text</type> component. The macro
53*cdf0e10cSrcweir	is ready to run, if it is a script within a text document. </p>
54*cdf0e10cSrcweir
55*cdf0e10cSrcweir	<listing>
56*cdf0e10cSrcweir	Sub Main
57*cdf0e10cSrcweir	oFrame = ThisComponent.createInstance( "com.sun.star.text.TextFrame" )
58*cdf0e10cSrcweir	oFrame.Width = 6000
59*cdf0e10cSrcweir	ThisComponent.Text.insertTextContent( ThisComponent.Text.Start, oFrame, false )
60*cdf0e10cSrcweir	oFrame.Text.String = "Hello, this text is within the frame."
61*cdf0e10cSrcweir	End Sub
62*cdf0e10cSrcweir	</listing>
63*cdf0e10cSrcweir */
64*cdf0e10cSrcweirpublished service TextFrame
65*cdf0e10cSrcweir{
66*cdf0e10cSrcweir	/** contains the definition of interfaces and properties that are supported by text frames,
67*cdf0e10cSrcweir	 graphic objects and embeddedobjects.
68*cdf0e10cSrcweir	 */
69*cdf0e10cSrcweir	service BaseFrame;
70*cdf0e10cSrcweir
71*cdf0e10cSrcweir	/** This interface makes it possible to access the text within this
72*cdf0e10cSrcweir				text frame.
73*cdf0e10cSrcweir	 */
74*cdf0e10cSrcweir	interface com::sun::star::text::XTextFrame;
75*cdf0e10cSrcweir	//-------------------------------------------------------------------------
76*cdf0e10cSrcweir	/** contains the metric height value of the frame.
77*cdf0e10cSrcweir	 */
78*cdf0e10cSrcweir	[property] long FrameHeightAbsolute;
79*cdf0e10cSrcweir
80*cdf0e10cSrcweir	//-------------------------------------------------------------------------
81*cdf0e10cSrcweir	/** contains the metric width value of the frame.
82*cdf0e10cSrcweir	 */
83*cdf0e10cSrcweir	[property] long FrameWidthAbsolute;
84*cdf0e10cSrcweir
85*cdf0e10cSrcweir	//-------------------------------------------------------------------------
86*cdf0e10cSrcweir
87*cdf0e10cSrcweir	/** specifies a width relative to the width of the
88*cdf0e10cSrcweir		surrounding text.
89*cdf0e10cSrcweir		<p>If the value for "WidthPercent" is 0, the absolute value from
90*cdf0e10cSrcweir		is used.</p>
91*cdf0e10cSrcweir	 */
92*cdf0e10cSrcweir	[property] byte FrameWidthPercent;
93*cdf0e10cSrcweir
94*cdf0e10cSrcweir	//-------------------------------------------------------------------------
95*cdf0e10cSrcweir	/** specifies a width relative to the width of the
96*cdf0e10cSrcweir		surrounding text.
97*cdf0e10cSrcweir
98*cdf0e10cSrcweir		<p>If the value for "HeightPercent" is 0, the absolute value from
99*cdf0e10cSrcweir		is used.</p>
100*cdf0e10cSrcweir	 */
101*cdf0e10cSrcweir	[property] byte FrameHeightPercent;
102*cdf0e10cSrcweir	//-------------------------------------------------------------------------
103*cdf0e10cSrcweir	/** If "AutomaticHeight" is set, then the object grows if it is required
104*cdf0e10cSrcweir		by the frame content.
105*cdf0e10cSrcweir	 */
106*cdf0e10cSrcweir	[property] boolean FrameIsAutomaticHeight;
107*cdf0e10cSrcweir	//-------------------------------------------------------------------------
108*cdf0e10cSrcweir	/** determines the interpretation of the height and relative
109*cdf0e10cSrcweir        height properties.
110*cdf0e10cSrcweir
111*cdf0e10cSrcweir            @see SizeType
112*cdf0e10cSrcweir	 */
113*cdf0e10cSrcweir	[property] short SizeType;
114*cdf0e10cSrcweir    //-------------------------------------------------------------------------
115*cdf0e10cSrcweir    /** determines if the text frame should be editable in a read-only document.
116*cdf0e10cSrcweir        (This is usually used in forms.)
117*cdf0e10cSrcweir
118*cdf0e10cSrcweir     */
119*cdf0e10cSrcweir    [optional, property] boolean EditInReadonly;
120*cdf0e10cSrcweir
121*cdf0e10cSrcweir    //-------------------------------------------------------------------------
122*cdf0e10cSrcweir    /** determines the interpretation of the width and relative
123*cdf0e10cSrcweir        width properties.
124*cdf0e10cSrcweir
125*cdf0e10cSrcweir        @see    SizeType
126*cdf0e10cSrcweir        @since  OOo 2.4
127*cdf0e10cSrcweir     */
128*cdf0e10cSrcweir    [optional, property] short WidthType;
129*cdf0e10cSrcweir
130*cdf0e10cSrcweir    //-----------------------------------------------------------------------------
131*cdf0e10cSrcweir    /** contains the writing direction, as represented by the
132*cdf0e10cSrcweir        <type scope="com::sun::star::text">WritingMode2</type> constants
133*cdf0e10cSrcweir     */
134*cdf0e10cSrcweir    [optional, property] short WritingMode;
135*cdf0e10cSrcweir
136*cdf0e10cSrcweir    //-----------------------------------------------------------------------------
137*cdf0e10cSrcweir    /** controls, if the frame follows the text flow or can leave its layout environment
138*cdf0e10cSrcweir
139*cdf0e10cSrcweir        <p>If set, the frame follows the text flow and doesn't leaves the layout
140*cdf0e10cSrcweir        environment, which is given by its anchor, above and below.
141*cdf0e10cSrcweir        E.g.: Anchor resides in the document body then the frame doesn't leave
142*cdf0e10cSrcweir        the document body above and below and follows the text flow through
143*cdf0e10cSrcweir        the document bodies of the different pages.
144*cdf0e10cSrcweir
145*cdf0e10cSrcweir        If not set, the frame doesn't follow the text flow and stays on the page,
146*cdf0e10cSrcweir        on which its anchor is found, but it may leave the layout environment,
147*cdf0e10cSrcweir        which is given by its anchor.
148*cdf0e10cSrcweir        E.g.: Anchor resides in the document body then the frame stays on page,
149*cdf0e10cSrcweir        where this document body is, but it could leave the document body above
150*cdf0e10cSrcweir        and below, e.g. overlapping with the page header.
151*cdf0e10cSrcweir
152*cdf0e10cSrcweir        Note: The areas for the vertical orientation relation at page areas are
153*cdf0e10cSrcweir        interpreted in dependence to this property (@see BaseFrameProperties.VertOrientRelation).
154*cdf0e10cSrcweir        If property is set, the page area is interpreted as the layout environment,
155*cdf0e10cSrcweir        given by its anchor. E.g.: Anchor resides in the page header then the
156*cdf0e10cSrcweir        page header determines the page area. If property isn't set, the page area is
157*cdf0e10cSrcweir        determined by the document page, the anchor is on. E.g.: Anchor resides
158*cdf0e10cSrcweir        in the page header then the document page, the page header is on, determines
159*cdf0e10cSrcweir        the page area.
160*cdf0e10cSrcweir        An exception of this interpretation rule is applied, if the anchor resides
161*cdf0e10cSrcweir        in a table cell. In this situation the page area is always detemined by
162*cdf0e10cSrcweir        the table cell.</p>
163*cdf0e10cSrcweir     */
164*cdf0e10cSrcweir    [optional, property] boolean IsFollowingTextFlow;
165*cdf0e10cSrcweir
166*cdf0e10cSrcweir};
167*cdf0e10cSrcweir
168*cdf0e10cSrcweir//=============================================================================
169*cdf0e10cSrcweir
170*cdf0e10cSrcweir}; }; }; };
171*cdf0e10cSrcweir
172*cdf0e10cSrcweir#endif
173