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_TextFrame_idl__ 28#define __com_sun_star_text_TextFrame_idl__ 29 30#ifndef __com_sun_star_text_XTextFrame_idl__ 31#include <com/sun/star/text/XTextFrame.idl> 32#endif 33 34#ifndef __com_sun_star_text_BaseFrame_idl__ 35#include <com/sun/star/text/BaseFrame.idl> 36#endif 37 38//============================================================================= 39 40 module com { module sun { module star { module text { 41 42//============================================================================= 43 44/** specifies a rectangular shape which contains a <type>Text</type> object 45 and is attached to a piece of surrounding <type>Text</type>. 46 47 @see Text 48 49 @example StarBasic 50 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> 54 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> 63 */ 64published service TextFrame 65{ 66 /** contains the definition of interfaces and properties that are supported by text frames, 67 graphic objects and embeddedobjects. 68 */ 69 service BaseFrame; 70 71 /** This interface makes it possible to access the text within this 72 text frame. 73 */ 74 interface com::sun::star::text::XTextFrame; 75 //------------------------------------------------------------------------- 76 /** contains the metric height value of the frame. 77 */ 78 [property] long FrameHeightAbsolute; 79 80 //------------------------------------------------------------------------- 81 /** contains the metric width value of the frame. 82 */ 83 [property] long FrameWidthAbsolute; 84 85 //------------------------------------------------------------------------- 86 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> 91 */ 92 [property] byte FrameWidthPercent; 93 94 //------------------------------------------------------------------------- 95 /** specifies a width relative to the width of the 96 surrounding text. 97 98 <p>If the value for "HeightPercent" is 0, the absolute value from 99 is used.</p> 100 */ 101 [property] byte FrameHeightPercent; 102 //------------------------------------------------------------------------- 103 /** If "AutomaticHeight" is set, then the object grows if it is required 104 by the frame content. 105 */ 106 [property] boolean FrameIsAutomaticHeight; 107 //------------------------------------------------------------------------- 108 /** determines the interpretation of the height and relative 109 height properties. 110 111 @see SizeType 112 */ 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.) 117 118 */ 119 [optional, property] boolean EditInReadonly; 120 121 //------------------------------------------------------------------------- 122 /** determines the interpretation of the width and relative 123 width properties. 124 125 @see SizeType 126 @since OOo 2.4 127 */ 128 [optional, property] short WidthType; 129 130 //----------------------------------------------------------------------------- 131 /** contains the writing direction, as represented by the 132 <type scope="com::sun::star::text">WritingMode2</type> constants 133 */ 134 [optional, property] short WritingMode; 135 136 //----------------------------------------------------------------------------- 137 /** controls, if the frame follows the text flow or can leave its layout environment 138 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. 144 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. 151 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> 163 */ 164 [optional, property] boolean IsFollowingTextFlow; 165 166}; 167 168//============================================================================= 169 170}; }; }; }; 171 172#endif 173