1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2/* 3 * This file is part of the LibreOffice project. 4 * 5 * This Source Code Form is subject to the terms of the Mozilla Public 6 * License, v. 2.0. If a copy of the MPL was not distributed with this 7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 * 9 * This file incorporates work covered by the following license notice: 10 * 11 * Licensed to the Apache Software Foundation (ASF) under one or more 12 * contributor license agreements. See the NOTICE file distributed 13 * with this work for additional information regarding copyright 14 * ownership. The ASF licenses this file to you under the Apache 15 * License, Version 2.0 (the "License"); you may not use this file 16 * except in compliance with the License. You may obtain a copy of 17 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 18 */ 19#ifndef __com_sun_star_text_Shape_idl__ 20#define __com_sun_star_text_Shape_idl__ 21 22#include <com/sun/star/text/TextContent.idl> 23#include <com/sun/star/text/XTextFrame.idl> 24#include <com/sun/star/text/XTextRange.idl> 25#include <com/sun/star/drawing/Shape.idl> 26#include <com/sun/star/text/TextContentAnchorType.idl> 27#include <com/sun/star/text/WrapTextMode.idl> 28 29 30 module com { module sun { module star { module text { 31 32 33/** specifies the service of shapes in a text document 34 */ 35published service Shape 36{ 37 service com::sun::star::drawing::Shape; 38 /** contains the number of the page where the objects are anchored. 39 <p> The value is valid only if the 40 AnchorType is 41 TextContentAnchorType::AT_PAGE.</p> 42 */ 43 [property] short AnchorPageNo; 44 /** contains the text frame the current frame is anchored to. 45 <p> The value is valid only if the 46 AnchorType is TextContentAnchorType::AT_FRAME.</p> 47 */ 48 [property] com::sun::star::text::XTextFrame AnchorFrame; 49 /** specifies how the text content is attached to its surrounding 50 Text. 51 */ 52 [optional, property] com::sun::star::text::TextContentAnchorType AnchorType; 53 /** determines the horizontal orientation of the object. 54 55 @see BaseFrame::HoriOrientation 56 */ 57 [property] short HoriOrient; 58 /** contains the horizontal position of the object (1/100 mm). 59 <p> It is only valid if "HoriOrient" is HoriOrientation_NONE.</p> 60 */ 61 [property] long HoriOrientPosition; 62 63 /** determines the environment of the object to which the orientation 64 is related. 65 66 @see BaseFrame::RelOrientation 67 */ 68 [property] short HoriOrientRelation; 69 70 /** determines the vertical orientation of the object. 71 72 @see BaseFrame::VertOrientation 73 */ 74 [property] short VertOrient; 75 76 /** contains the vertical position of the object (1/100 mm). 77 78 It is only valid if TextEmbeddedObject::VertOrient is 79 VertOrientation::NONE. 80 */ 81 [property] long VertOrientPosition; 82 83 84 /** determines the environment of the object to which the orientation is related. 85 86 @see BaseFrame::RelOrientation 87 */ 88 [property] short VertOrientRelation; 89 /** contains the left margin of the object. 90 */ 91 [property] long LeftMargin; 92 93 /** contains the right margin of the object. 94 */ 95 [property] long RightMargin; 96 97 /** contains the top margin of the object. 98 */ 99 [property] long TopMargin; 100 101 /** contains the bottom margin of the object. 102 */ 103 [property] long BottomMargin; 104 /** determines the type of the surrounding text. 105 106 @deprecated 107 */ 108 [property] com::sun::star::text::WrapTextMode Surround; 109 /** determines if the text of the paragraph in which the object 110 is anchored, wraps around the object. 111 */ 112 [property] boolean SurroundAnchorOnly; 113 114 /** determines if the text wraps around the contour of the object. 115 */ 116 [property] boolean SurroundContour; 117 118 /** the text flows only around the contour of the object. 119 */ 120 [property] boolean ContourOutside; 121 /** determines if the object is opaque or transparent for text. 122 */ 123 [property] boolean Opaque; 124 /** contains a text range where the shape should be anchored to. 125 <p>There are two different ways to get newly created shapes into the 126 text document. One of them is to use the insertTextContent() method of 127 the com::sun::star::text::XSimpleText. The other is to call the add() 128 method of the com::sun::star::drawing::XShapes interface. 129 To be able to determine an anchor position for shape that are anchored at a certain 130 text position the property TextRange is used.</p> 131 132 <p>This property is used when the shape gets inserted/added 133 and becomes invalid after that.</p> 134 135 */ 136 [property] com::sun::star::text::XTextRange TextRange; 137 138 /** determines the influence of the text wrap on the positioning of the 139 shape 140 141 <p>The value of this property is only evaluated for the positioning 142 of the shape, if the text document setting ConsiderTextWrapOnObjPos 143 is `TRUE`. Valid values are given by #WrapInfluenceOnPosition</p> 144 145 @since OOo 2.0 146 */ 147 [optional, property] short WrapInfluenceOnPosition; 148 149 /** determines the transformation of the shape in horizontal left-to-right 150 layout 151 152 <p>This property is needed for the export of the OASIS Open Office 153 file format to the OpenOffice.org file format. It provides the 154 transformation property of the included service com::sun::star::drawing::Shape 155 converted to the horizontal left-to-right layout.</p> 156 157 @since OOo 2.0 158 */ 159 [optional, readonly, property] com::sun::star::drawing::HomogenMatrix3 TransformationInHoriL2R; 160 /** determines layout direction the position attributes of the shape 161 is given 162 163 <p>Valid values are given by #PositionLayoutDir</p> 164 165 @since OOo 2.0 166 */ 167 [optional, property] short PositionLayoutDir; 168 /** determines the start position of the shape in horizontal left-to-right 169 layout 170 171 <p>This property is needed for the export of the OASIS Open Office 172 file format to the OpenOffice.org file format. It provides the 173 start position property of the included service com::sun::star::drawing::Shape 174 converted to the horizontal left-to-right layout.</p> 175 176 @since OOo 2.0 177 */ 178 [optional, readonly, property] com::sun::star::awt::Point StartPositionInHoriL2R; 179 /** determines the end position of the shape in horizontal left-to-right 180 layout 181 182 <p>This property is needed for the export of the OASIS Open Office 183 file format to the OpenOffice.org file format. It provides the 184 end position property of the included service com::sun::star::drawing::Shape 185 converted to the horizontal left-to-right layout.</p> 186 187 @since OOo 2.0 188 */ 189 [optional, readonly, property] com::sun::star::awt::Point EndPositionInHoriL2R; 190 191 /** This defines if the shape is allowed to overlap with other anchored objects. 192 @since LibreOffice 6.4 193 */ 194 [optional, property] boolean AllowOverlap; 195}; 196 197 198}; }; }; }; 199 200#endif 201 202/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 203