20#ifndef INCLUDED_OOX_VML_VMLSHAPE_HXX
21#define INCLUDED_OOX_VML_VMLSHAPE_HXX
26#include <com/sun/star/awt/Point.hpp>
27#include <com/sun/star/uno/Reference.hxx>
31#include <rtl/ustring.hxx>
36 namespace drawing {
class XShape; }
37 namespace drawing {
class XShapes; }
38 namespace graphic {
class XGraphic; }
44struct ShapeParentAnchor;
142 const OUString&
getShapeId()
const {
return maTypeModel.maShapeId; }
144 sal_Int32 getShapeType()
const;
146 OUString getGraphicPath()
const;
152 css::awt::Rectangle getCoordSystem()
const;
154 css::awt::Rectangle getRectangle(
const ShapeParentAnchor* pParentAnchor )
const;
156 virtual css::awt::Rectangle getAbsRectangle()
const;
158 virtual css::awt::Rectangle getRelRectangle()
const;
254 virtual void finalizeFragmentImport();
257 OUString getShapeName()
const;
260 virtual const ShapeType* getChildTypeById(
const OUString& rShapeId )
const;
262 virtual const ShapeBase* getChildById(
const OUString& rShapeId )
const;
265 css::uno::Reference< css::drawing::XShape >
267 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
271 void convertFormatting(
272 const css::uno::Reference< css::drawing::XShape >& rxShape )
const;
281 virtual css::uno::Reference< css::drawing::XShape >
283 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
284 const css::awt::Rectangle& rShapeRect )
const = 0;
288 const css::uno::Reference<css::drawing::XShape>& rxShape)
const
295 css::awt::Rectangle calcShapeRectangle(
299 void convertShapeProperties(
300 const css::uno::Reference< css::drawing::XShape >& rxShape )
const;
318 virtual css::uno::Reference< css::drawing::XShape >
320 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
321 const css::awt::Rectangle& rShapeRect )
const override;
323 const css::uno::Reference<css::drawing::XShape>& rxShape)
const override;
326 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
327 const css::awt::Rectangle& rShapeRect, OUString
const & rGraphicPath )
const;
330 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
331 const css::awt::Rectangle& rShapeRect,
332 css::uno::Reference<css::graphic::XGraphic>
const & rxGraphic)
const;
346 virtual css::uno::Reference<css::drawing::XShape>
348 const css::uno::Reference<css::drawing::XShapes>& rxShapes,
349 const css::awt::Rectangle& rShapeRect)
const override;
369 virtual css::uno::Reference< css::drawing::XShape >
371 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
372 const css::awt::Rectangle& rShapeRect )
const override;
380 virtual css::uno::Reference< css::drawing::XShape >
382 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
383 const css::awt::Rectangle& rShapeRect )
const override;
402 virtual css::uno::Reference< css::drawing::XShape >
404 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
405 const css::awt::Rectangle& rShapeRect )
const override;
417 virtual css::uno::Reference< css::drawing::XShape >
419 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
420 const css::awt::Rectangle& rShapeRect )
const override;
433 virtual css::uno::Reference< css::drawing::XShape >
435 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
436 const css::awt::Rectangle& rShapeRect )
const override;
462 virtual css::uno::Reference< css::drawing::XShape >
464 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
465 const css::awt::Rectangle& rShapeRect )
const override;
Bezier shape object that supports to, from, control1 and control2 attribute or path attribute specifi...
virtual css::uno::Reference< css::drawing::XShape > implConvertAndInsert(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const override
Creates the corresponding XShape and inserts it into the passed container.
BezierShape(Drawing &rDrawing)
virtual css::uno::Reference< css::drawing::XShape > implConvertAndInsert(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const override
Creates the corresponding XShape and inserts it into the passed container.
ComplexShape(Drawing &rDrawing)
A shape object with custom geometry.
CustomShape(Drawing &rDrawing)
virtual css::uno::Reference< css::drawing::XShape > implConvertAndInsert(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const override
Creates the corresponding XShape and inserts it into the passed container.
Represents the collection of VML shapes for a complete draw page.
EllipseShape(Drawing &rDrawing)
A group shape that extends the basic shape by a container of child shapes.
virtual css::uno::Reference< css::drawing::XShape > implConvertAndInsert(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const override
Creates the corresponding XShape and inserts it into the passed container.
virtual const ShapeType * getChildTypeById(const OUString &rShapeId) const override
Returns the shape template with the passed identifier from the child shapes.
ShapeContainer & getChildren()
Returns read/write access to the container of child shapes and templates.
virtual void finalizeFragmentImport() override
Final processing after import of the drawing fragment.
const ShapeContainer & getChildren() const
Returns read access to the container of child shapes and templates.
virtual ~GroupShape() override
std::unique_ptr< ShapeContainer > mxChildren
Shapes and templates that are part of this group.
virtual const ShapeBase * getChildById(const OUString &rShapeId) const override
Returns the shape with the passed identifier from the child shapes.
GroupShape(Drawing &rDrawing)
LineShape(Drawing &rDrawing)
virtual css::uno::Reference< css::drawing::XShape > implConvertAndInsert(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const override
Creates the corresponding XShape and inserts it into the passed container.
virtual css::awt::Rectangle getRelRectangle() const override
Returns the rectangle relative to the parent coordinate system.
virtual css::awt::Rectangle getAbsRectangle() const override
Returns the absolute shape rectangle.
PolyLineShape(Drawing &rDrawing)
virtual css::uno::Reference< css::drawing::XShape > implConvertAndInsert(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const override
Creates the corresponding XShape and inserts it into the passed container.
A rectangular shape object.
virtual css::uno::Reference< css::drawing::XShape > implConvertAndInsert(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const override
Creates the corresponding XShape and inserts it into the passed container.
RectangleShape(Drawing &rDrawing)
A shape object that is part of a drawing.
virtual css::uno::Reference< css::drawing::XShape > finalImplConvertAndInsert(const css::uno::Reference< css::drawing::XShape > &rxShape) const
Always called after implConvertAndInsert for the same task.
const TextBox * getTextBox() const
Returns read access to the shape textbox.
const ShapeModel & getShapeModel() const
Returns read access to the shape model structure.
const ClientData * getClientData() const
Returns read access to the shape client data structure.
ShapeModel & getShapeModel()
Returns read/write access to the shape model structure.
virtual css::uno::Reference< css::drawing::XShape > implConvertAndInsert(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const =0
Derived classes create the corresponding XShape and insert it into the passed container.
ShapeModel maShapeModel
The model structure containing shape data.
Container that holds a list of shapes and shape templates.
A shape template contains all formatting properties of shapes and can serve as templates for several ...
ShapeTypeModel maTypeModel
The model structure containing shape type data.
const Drawing & getDrawing() const
const ShapeTypeModel & getTypeModel() const
Returns read access to the shape template model structure.
const OUString & getShapeId() const
Returns the shape identifier (which is unique through the containing drawing).
Drawing & mrDrawing
The VML drawing page that contains this shape.
ShapeTypeModel & getTypeModel()
Returns read/write access to the shape template model structure.
A simple shape object based on a specific UNO shape service.
css::uno::Reference< css::drawing::XShape > createEmbeddedPictureObject(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect, OUString const &rGraphicPath) const
Used by both RectangleShape and ComplexShape.
SimpleShape(Drawing &rDrawing, OUString aService)
void setService(const OUString &aService)
virtual css::uno::Reference< css::drawing::XShape > finalImplConvertAndInsert(const css::uno::Reference< css::drawing::XShape > &rxShape) const override
Always called after implConvertAndInsert for the same task.
OUString maService
Name of the UNO shape service.
virtual css::uno::Reference< css::drawing::XShape > implConvertAndInsert(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const override
Creates the corresponding XShape and inserts it into the passed container.
css::uno::Reference< css::drawing::XShape > createPictureObject(const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect, css::uno::Reference< css::graphic::XGraphic > const &rxGraphic) const
The textbox contains all text contents and properties.
const sal_Int32 VML_CLIENTDATA_TEXT
const sal_Int32 VML_CLIENTDATA_NUMBER
const sal_Int32 VML_CLIENTDATA_UNCHECKED
const sal_Int32 VML_CLIENTDATA_REFERENCE
const sal_Int32 VML_CLIENTDATA_FORMULA
const sal_Int32 VML_CLIENTDATA_CHECKED
const sal_Int32 VML_CLIENTDATA_MIXED
const sal_Int32 VML_CLIENTDATA_INTEGER
Excel specific shape client data (such as cell anchor).
bool mbDde
True = object is linked through DDE.
sal_Int32 mnCol
Column index for spreadsheet cell note.
sal_Int32 mnInc
Small increment of spin buttons and scroll bars.
sal_Int32 mnDropStyle
Drop down box style (read-only or editable).
bool mbVisible
True = cell note is visible.
OUString maFmlaLink
Link to value cell associated to the control.
sal_Int32 mnObjType
Type of the shape.
bool mbVScroll
True = textbox has a vertical scrollbar.
bool mbNo3D2
True = flat style, false = 3D style (listboxes and dropdowns).
OUString maFmlaPict
Target cell range of picture links.
sal_Int32 mnSelType
Listbox selection type.
bool mbNo3D
True = flat style, false = 3D style.
bool mbPrintObject
True = print the object.
sal_Int32 mnTextHAlign
Horizontal text alignment.
bool mbMultiLine
True = textbox allows line breaks.
OUString maFmlaRange
Link to cell range used as data source for the control.
sal_Int32 mnVTEdit
Data type of the textbox.
sal_Int32 mnTextVAlign
Vertical text alignment.
sal_Int32 mnMax
Maximum value of spin buttons and scroll bars.
sal_Int32 mnPage
Large increment of spin buttons and scroll bars.
sal_Int32 mnDropLines
Number of lines in drop down box.
sal_Int32 mnRow
Row index for spreadsheet cell note.
OUString maAnchor
Cell anchor as comma-separated string.
sal_Int32 mnVal
Current value of spin buttons and scroll bars.
bool mbSecretEdit
True = textbox is a password edit field.
sal_Int32 mnMin
Minimum value of spin buttons and scroll bars.
OUString maFmlaGroup
Link to value cell associated to a group of option buttons.
OUString maFmlaMacro
Link to macro associated to the control.
sal_Int32 mnChecked
State for checkboxes and option buttons.
The fill model structure contains all shape fill properties.
The shadow model structure contains all shape shadow properties.
OUString maSignatureLineSuggestedSignerTitle
TextBox & createTextBox(ShapeTypeModel &rModel)
Creates and returns a new shape textbox structure.
std::unique_ptr< ClientData > mxClientData
Excel specific client data.
OUString maLegacyDiagramPath
Legacy Diagram Fragment Path.
OUString maSignatureLineSuggestedSignerName
PointVector maPoints
Points for the polyline shape.
OUString maHyperlink
The hyperlink assigned to the shape.
::std::vector< css::awt::Point > PointVector
bool mbSignatureLineCanAddComment
OUString maControl2
Bezier control point 2.
OUString maVmlPath
VML path for this shape.
bool mbIsSignatureLine
Shape is a signature line.
std::unique_ptr< TextBox > mxTextBox
Text contents and properties.
OUString maType
Shape template with default properties.
bool mbSignatureLineShowSignDate
OUString maSignatureLineSuggestedSignerEmail
ClientData & createClientData()
Creates and returns a new shape client data structure.
OUString maControl1
Bezier control point 1.
OUString maTo
End point for line shape.
OUString maSignatureLineSigningInstructions
OUString maSignatureId
ID of the signature.
OUString maFrom
Start point for line shape.
The shape model structure contains all properties shared by all types of shapes.
void assignUsed(const ShapeTypeModel &rSource)
OUString maHeightPercent
The height in percents of the HeightRelative.
OUString maWrapDistanceTop
Distance from the top of the shape to the text that wraps around it.
OUString maPosition
Position type of the shape.
OUString maShapeName
Name of the shape, if present.
OUString maFlip
Flip type of the shape (can be "x" or "y").
ShadowModel maShadowModel
Shape shadow formatting.
OUString maPositionVertical
The Y position orientation.
std::optional< Int32Pair > moCoordPos
Top-left position of coordinate system for children scaling.
OUString maHeightRelative
To what the height is relative.
std::optional< Int32Pair > moCoordSize
Size of coordinate system for children scaling.
FillModel maFillModel
Shape fill formatting.
OUString maTop
Y position of the shape bounding box (number with unit).
std::optional< OUString > moGraphicTitle
Title of the graphic.
OUString maWrapDistanceRight
Distance from the right side of the shape to the text that wraps around it.
bool mbVisible
Visible or Hidden.
OUString maEditAs
Edit As type (e.g. "canvas" etc)
OUString maWrapStyle
Wrapping mode for text.
std::optional< OUString > moGraphicPath
Path to a graphic for this shape.
std::optional< OUString > moCropLeft
Specifies how much to crop the image from the left in as a fraction of picture size.
std::optional< OUString > moCropTop
Specifies how much to crop the image from the top down as a fraction of picture size.
std::optional< OUString > moWrapAnchorY
The base object from which our vertical positioning should be calculated.
std::optional< OUString > moCropRight
Specifies how much to crop the image from the right in as a fraction of picture size.
OUString maRotation
Rotation of the shape, in degrees.
OUString maHeight
Height of the shape bounding box (number with unit).
OUString maAdjustments
Shape adjustment values.
sal_Int16 mnBlacklevel
The image brightness, on a 0..0x10000 scale.
bool mbAutoHeight
If true, the height value is a minimum value (mostly used for textboxes)
std::optional< OUString > moWrapType
How to wrap the text around the object.
OUString maShapeId
Unique identifier of the shape.
OUString maWidthPercent
The width in percents of the WidthRelative.
StrokeModel maStrokeModel
Border line formatting.
std::optional< OUString > moWrapAnchorX
The base object from which our horizontal positioning should be calculated.
OUString maPositionVerticalRelative
The Y position is relative to this.
OUString maWidth
Width of the shape bounding box (number with unit).
OUString maLeft
X position of the shape bounding box (number with unit).
OUString maMarginTop
Y position of the shape bounding box to shape anchor (number with unit).
std::optional< OUString > moWrapSide
On which side to wrap the text around the object.
OUString maPositionHorizontalRelative
The X position is relative to this.
OUString maArcsize
round rectangles arc size
OUString maZIndex
ZIndex of the shape.
std::optional< OUString > moCropBottom
Specifies the how much to crop the image from the bottom up as a fraction of picture size.
OUString maWidthRelative
To what the width is relative.
OUString maVTextAnchor
How the text inside the shape is anchored vertically.
OUString maLegacyId
Plaintext identifier of the shape.
OUString maPositionHorizontal
The X position orientation (default: absolute).
OUString maLayoutFlowAlt
Specifies the alternate layout flow for text in textboxes.
OUString maWrapDistanceBottom
Distance from the bottom of the shape to the text that wraps around it.
std::optional< sal_Int32 > moShapeType
Builtin shape type identifier.
OUString maMarginLeft
X position of the shape bounding box to shape anchor (number with unit).
OUString maWrapDistanceLeft
Distance from the left side of the shape to the text that wraps around it.
TextpathModel maTextpathModel
Shape textpath formatting.
sal_Int32 mnGain
An adjustment for the intensity of all colors, i.e. contrast, on a 0..0x10000 scale.
The stroke model structure contains all shape border properties.
The shadow model structure contains all shape textpath properties.