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