1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10*d1766043SAndrew Rist * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*d1766043SAndrew Rist * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19*d1766043SAndrew Rist * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_text_TextFrame_idl__ 24cdf0e10cSrcweir#define __com_sun_star_text_TextFrame_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_text_XTextFrame_idl__ 27cdf0e10cSrcweir#include <com/sun/star/text/XTextFrame.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_text_BaseFrame_idl__ 31cdf0e10cSrcweir#include <com/sun/star/text/BaseFrame.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir//============================================================================= 35cdf0e10cSrcweir 36cdf0e10cSrcweir module com { module sun { module star { module text { 37cdf0e10cSrcweir 38cdf0e10cSrcweir//============================================================================= 39cdf0e10cSrcweir 40cdf0e10cSrcweir/** specifies a rectangular shape which contains a <type>Text</type> object 41cdf0e10cSrcweir and is attached to a piece of surrounding <type>Text</type>. 42cdf0e10cSrcweir 43cdf0e10cSrcweir @see Text 44cdf0e10cSrcweir 45cdf0e10cSrcweir @example StarBasic 46cdf0e10cSrcweir 47cdf0e10cSrcweir <p>This example shows how to create a <type>TextFrame</type> and insert 48cdf0e10cSrcweir it at the very beginning of <type>Text</type> component. The macro 49cdf0e10cSrcweir is ready to run, if it is a script within a text document. </p> 50cdf0e10cSrcweir 51cdf0e10cSrcweir <listing> 52cdf0e10cSrcweir Sub Main 53cdf0e10cSrcweir oFrame = ThisComponent.createInstance( "com.sun.star.text.TextFrame" ) 54cdf0e10cSrcweir oFrame.Width = 6000 55cdf0e10cSrcweir ThisComponent.Text.insertTextContent( ThisComponent.Text.Start, oFrame, false ) 56cdf0e10cSrcweir oFrame.Text.String = "Hello, this text is within the frame." 57cdf0e10cSrcweir End Sub 58cdf0e10cSrcweir </listing> 59cdf0e10cSrcweir */ 60cdf0e10cSrcweirpublished service TextFrame 61cdf0e10cSrcweir{ 62cdf0e10cSrcweir /** contains the definition of interfaces and properties that are supported by text frames, 63cdf0e10cSrcweir graphic objects and embeddedobjects. 64cdf0e10cSrcweir */ 65cdf0e10cSrcweir service BaseFrame; 66cdf0e10cSrcweir 67cdf0e10cSrcweir /** This interface makes it possible to access the text within this 68cdf0e10cSrcweir text frame. 69cdf0e10cSrcweir */ 70cdf0e10cSrcweir interface com::sun::star::text::XTextFrame; 71cdf0e10cSrcweir //------------------------------------------------------------------------- 72cdf0e10cSrcweir /** contains the metric height value of the frame. 73cdf0e10cSrcweir */ 74cdf0e10cSrcweir [property] long FrameHeightAbsolute; 75cdf0e10cSrcweir 76cdf0e10cSrcweir //------------------------------------------------------------------------- 77cdf0e10cSrcweir /** contains the metric width value of the frame. 78cdf0e10cSrcweir */ 79cdf0e10cSrcweir [property] long FrameWidthAbsolute; 80cdf0e10cSrcweir 81cdf0e10cSrcweir //------------------------------------------------------------------------- 82cdf0e10cSrcweir 83cdf0e10cSrcweir /** specifies a width relative to the width of the 84cdf0e10cSrcweir surrounding text. 85cdf0e10cSrcweir <p>If the value for "WidthPercent" is 0, the absolute value from 86cdf0e10cSrcweir is used.</p> 87cdf0e10cSrcweir */ 88cdf0e10cSrcweir [property] byte FrameWidthPercent; 89cdf0e10cSrcweir 90cdf0e10cSrcweir //------------------------------------------------------------------------- 91cdf0e10cSrcweir /** specifies a width relative to the width of the 92cdf0e10cSrcweir surrounding text. 93cdf0e10cSrcweir 94cdf0e10cSrcweir <p>If the value for "HeightPercent" is 0, the absolute value from 95cdf0e10cSrcweir is used.</p> 96cdf0e10cSrcweir */ 97cdf0e10cSrcweir [property] byte FrameHeightPercent; 98cdf0e10cSrcweir //------------------------------------------------------------------------- 99cdf0e10cSrcweir /** If "AutomaticHeight" is set, then the object grows if it is required 100cdf0e10cSrcweir by the frame content. 101cdf0e10cSrcweir */ 102cdf0e10cSrcweir [property] boolean FrameIsAutomaticHeight; 103cdf0e10cSrcweir //------------------------------------------------------------------------- 104cdf0e10cSrcweir /** determines the interpretation of the height and relative 105cdf0e10cSrcweir height properties. 106cdf0e10cSrcweir 107cdf0e10cSrcweir @see SizeType 108cdf0e10cSrcweir */ 109cdf0e10cSrcweir [property] short SizeType; 110cdf0e10cSrcweir //------------------------------------------------------------------------- 111cdf0e10cSrcweir /** determines if the text frame should be editable in a read-only document. 112cdf0e10cSrcweir (This is usually used in forms.) 113cdf0e10cSrcweir 114cdf0e10cSrcweir */ 115cdf0e10cSrcweir [optional, property] boolean EditInReadonly; 116cdf0e10cSrcweir 117cdf0e10cSrcweir //------------------------------------------------------------------------- 118cdf0e10cSrcweir /** determines the interpretation of the width and relative 119cdf0e10cSrcweir width properties. 120cdf0e10cSrcweir 121cdf0e10cSrcweir @see SizeType 122cdf0e10cSrcweir @since OOo 2.4 123cdf0e10cSrcweir */ 124cdf0e10cSrcweir [optional, property] short WidthType; 125cdf0e10cSrcweir 126cdf0e10cSrcweir //----------------------------------------------------------------------------- 127cdf0e10cSrcweir /** contains the writing direction, as represented by the 128cdf0e10cSrcweir <type scope="com::sun::star::text">WritingMode2</type> constants 129cdf0e10cSrcweir */ 130cdf0e10cSrcweir [optional, property] short WritingMode; 131cdf0e10cSrcweir 132cdf0e10cSrcweir //----------------------------------------------------------------------------- 133cdf0e10cSrcweir /** controls, if the frame follows the text flow or can leave its layout environment 134cdf0e10cSrcweir 135cdf0e10cSrcweir <p>If set, the frame follows the text flow and doesn't leaves the layout 136cdf0e10cSrcweir environment, which is given by its anchor, above and below. 137cdf0e10cSrcweir E.g.: Anchor resides in the document body then the frame doesn't leave 138cdf0e10cSrcweir the document body above and below and follows the text flow through 139cdf0e10cSrcweir the document bodies of the different pages. 140cdf0e10cSrcweir 141cdf0e10cSrcweir If not set, the frame doesn't follow the text flow and stays on the page, 142cdf0e10cSrcweir on which its anchor is found, but it may leave the layout environment, 143cdf0e10cSrcweir which is given by its anchor. 144cdf0e10cSrcweir E.g.: Anchor resides in the document body then the frame stays on page, 145cdf0e10cSrcweir where this document body is, but it could leave the document body above 146cdf0e10cSrcweir and below, e.g. overlapping with the page header. 147cdf0e10cSrcweir 148cdf0e10cSrcweir Note: The areas for the vertical orientation relation at page areas are 149cdf0e10cSrcweir interpreted in dependence to this property (@see BaseFrameProperties.VertOrientRelation). 150cdf0e10cSrcweir If property is set, the page area is interpreted as the layout environment, 151cdf0e10cSrcweir given by its anchor. E.g.: Anchor resides in the page header then the 152cdf0e10cSrcweir page header determines the page area. If property isn't set, the page area is 153cdf0e10cSrcweir determined by the document page, the anchor is on. E.g.: Anchor resides 154cdf0e10cSrcweir in the page header then the document page, the page header is on, determines 155cdf0e10cSrcweir the page area. 156cdf0e10cSrcweir An exception of this interpretation rule is applied, if the anchor resides 157cdf0e10cSrcweir in a table cell. In this situation the page area is always detemined by 158cdf0e10cSrcweir the table cell.</p> 159cdf0e10cSrcweir */ 160cdf0e10cSrcweir [optional, property] boolean IsFollowingTextFlow; 161cdf0e10cSrcweir 162cdf0e10cSrcweir}; 163cdf0e10cSrcweir 164cdf0e10cSrcweir//============================================================================= 165cdf0e10cSrcweir 166cdf0e10cSrcweir}; }; }; }; 167cdf0e10cSrcweir 168cdf0e10cSrcweir#endif 169