LibreOffice Module oox (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
oox::vml::ShapeBase Class Referenceabstract

A shape object that is part of a drawing. More...

#include <vmlshape.hxx>

Inheritance diagram for oox::vml::ShapeBase:
[legend]
Collaboration diagram for oox::vml::ShapeBase:
[legend]

Public Member Functions

ShapeModelgetShapeModel ()
 Returns read/write access to the shape model structure. More...
 
const ShapeModelgetShapeModel () const
 Returns read access to the shape model structure. More...
 
const TextBoxgetTextBox () const
 Returns read access to the shape textbox. More...
 
const ClientDatagetClientData () const
 Returns read access to the shape client data structure. More...
 
virtual void finalizeFragmentImport ()
 Final processing after import of the drawing fragment. More...
 
OUString getShapeName () const
 Returns the real shape name if existing, or a generated shape name. More...
 
virtual const ShapeTypegetChildTypeById (const OUString &rShapeId) const
 Returns the shape template with the passed identifier from the child shapes. More...
 
virtual const ShapeBasegetChildById (const OUString &rShapeId) const
 Returns the shape with the passed identifier from the child shapes. More...
 
css::uno::Reference< css::drawing::XShape > convertAndInsert (const css::uno::Reference< css::drawing::XShapes > &rxShapes, const ShapeParentAnchor *pParentAnchor=nullptr) const
 Creates the corresponding XShape and inserts it into the passed container. More...
 
void convertFormatting (const css::uno::Reference< css::drawing::XShape > &rxShape) const
 Converts position and formatting into the passed existing XShape. More...
 
void setContainer (ShapeContainer *pContainer)
 
ShapeContainergetContainer () const
 
- Public Member Functions inherited from oox::vml::ShapeType
 ShapeType (Drawing &rDrawing)
 
virtual ~ShapeType ()
 
ShapeTypeModelgetTypeModel ()
 Returns read/write access to the shape template model structure. More...
 
const ShapeTypeModelgetTypeModel () const
 Returns read access to the shape template model structure. More...
 
const OUString & getShapeId () const
 Returns the shape identifier (which is unique through the containing drawing). More...
 
sal_Int32 getShapeType () const
 Returns the application defined shape type. More...
 
OUString getGraphicPath () const
 Returns the fragment path to the embedded graphic used by this shape. More...
 
const DrawinggetDrawing () const
 

Protected Member Functions

 ShapeBase (Drawing &rDrawing)
 
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. More...
 
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. More...
 
css::awt::Rectangle calcShapeRectangle (const ShapeParentAnchor *pParentAnchor) const
 Calculates the final shape rectangle according to the passed anchor, if present, otherwise according to the own anchor settings. More...
 
void convertShapeProperties (const css::uno::Reference< css::drawing::XShape > &rxShape) const
 Converts common shape properties such as formatting attributes. More...
 
- Protected Member Functions inherited from oox::vml::ShapeType
css::awt::Rectangle getCoordSystem () const
 Returns the coordinate system of this shape. More...
 
css::awt::Rectangle getRectangle (const ShapeParentAnchor *pParentAnchor) const
 Returns the absolute shape rectangle according to the passed anchor. More...
 
virtual css::awt::Rectangle getAbsRectangle () const
 Returns the absolute shape rectangle. More...
 
virtual css::awt::Rectangle getRelRectangle () const
 Returns the rectangle relative to the parent coordinate system. More...
 

Protected Attributes

ShapeModel maShapeModel
 The model structure containing shape data. More...
 
ShapeContainermpContainer = nullptr
 
- Protected Attributes inherited from oox::vml::ShapeType
DrawingmrDrawing
 The VML drawing page that contains this shape. More...
 
ShapeTypeModel maTypeModel
 The model structure containing shape type data. More...
 

Detailed Description

A shape object that is part of a drawing.

May inherit properties from a shape template.

Definition at line 240 of file vmlshape.hxx.

Constructor & Destructor Documentation

◆ ShapeBase()

oox::vml::ShapeBase::ShapeBase ( Drawing rDrawing)
explicitprotected

Definition at line 284 of file vmlshape.cxx.

Member Function Documentation

◆ calcShapeRectangle()

awt::Rectangle oox::vml::ShapeBase::calcShapeRectangle ( const ShapeParentAnchor pParentAnchor) const
protected

Calculates the final shape rectangle according to the passed anchor, if present, otherwise according to the own anchor settings.

Definition at line 511 of file vmlshape.cxx.

References oox::vml::Drawing::convertClientAnchor(), getClientData(), oox::vml::ShapeType::getRectangle(), oox::vml::ClientData::maAnchor, and oox::vml::ShapeType::mrDrawing.

Referenced by convertAndInsert(), and convertFormatting().

◆ convertAndInsert()

Reference< XShape > oox::vml::ShapeBase::convertAndInsert ( const css::uno::Reference< css::drawing::XShapes > &  rxShapes,
const ShapeParentAnchor pParentAnchor = nullptr 
) const

◆ convertFormatting()

void oox::vml::ShapeBase::convertFormatting ( const css::uno::Reference< css::drawing::XShape > &  rxShape) const

Converts position and formatting into the passed existing XShape.

Definition at line 487 of file vmlshape.cxx.

References calcShapeRectangle(), and convertShapeProperties().

◆ convertShapeProperties()

void oox::vml::ShapeBase::convertShapeProperties ( const css::uno::Reference< css::drawing::XShape > &  rxShape) const
protected

◆ finalImplConvertAndInsert()

virtual css::uno::Reference< css::drawing::XShape > oox::vml::ShapeBase::finalImplConvertAndInsert ( const css::uno::Reference< css::drawing::XShape > &  rxShape) const
inlineprotectedvirtual

Always called after implConvertAndInsert for the same task.

Reimplemented in oox::vml::SimpleShape.

Definition at line 287 of file vmlshape.hxx.

Referenced by convertAndInsert(), and oox::vml::SimpleShape::finalImplConvertAndInsert().

◆ finalizeFragmentImport()

void oox::vml::ShapeBase::finalizeFragmentImport ( )
virtual

◆ getChildById()

const ShapeBase * oox::vml::ShapeBase::getChildById ( const OUString &  rShapeId) const
virtual

Returns the shape with the passed identifier from the child shapes.

Reimplemented in oox::vml::GroupShape.

Definition at line 347 of file vmlshape.cxx.

Referenced by oox::vml::ShapeContainer::getShapeById().

◆ getChildTypeById()

const ShapeType * oox::vml::ShapeBase::getChildTypeById ( const OUString &  rShapeId) const
virtual

Returns the shape template with the passed identifier from the child shapes.

Reimplemented in oox::vml::GroupShape.

Definition at line 342 of file vmlshape.cxx.

◆ getClientData()

const ClientData * oox::vml::ShapeBase::getClientData ( ) const
inline

Returns read access to the shape client data structure.

Definition at line 251 of file vmlshape.hxx.

Referenced by calcShapeRectangle(), and oox::vml::ComplexShape::implConvertAndInsert().

◆ getContainer()

ShapeContainer * oox::vml::ShapeBase::getContainer ( ) const

Definition at line 507 of file vmlshape.cxx.

References mpContainer.

Referenced by oox::vml::ShapeContext::onCreateContext().

◆ getShapeModel() [1/2]

ShapeModel & oox::vml::ShapeBase::getShapeModel ( )
inline

Returns read/write access to the shape model structure.

Definition at line 244 of file vmlshape.hxx.

Referenced by oox::vml::ComplexShape::implConvertAndInsert().

◆ getShapeModel() [2/2]

const ShapeModel & oox::vml::ShapeBase::getShapeModel ( ) const
inline

Returns read access to the shape model structure.

Definition at line 246 of file vmlshape.hxx.

◆ getShapeName()

OUString oox::vml::ShapeBase::getShapeName ( ) const

◆ getTextBox()

const TextBox * oox::vml::ShapeBase::getTextBox ( ) const
inline

Returns read access to the shape textbox.

Definition at line 249 of file vmlshape.hxx.

Referenced by convertAndInsert(), oox::vml::SimpleShape::finalImplConvertAndInsert(), and oox::vml::SimpleShape::implConvertAndInsert().

◆ implConvertAndInsert()

virtual css::uno::Reference< css::drawing::XShape > oox::vml::ShapeBase::implConvertAndInsert ( const css::uno::Reference< css::drawing::XShapes > &  rxShapes,
const css::awt::Rectangle &  rShapeRect 
) const
protectedpure virtual

Derived classes create the corresponding XShape and insert it into the passed container.

Implemented in oox::vml::SimpleShape, oox::vml::RectangleShape, oox::vml::PolyLineShape, oox::vml::LineShape, oox::vml::BezierShape, oox::vml::CustomShape, oox::vml::ComplexShape, and oox::vml::GroupShape.

Referenced by convertAndInsert().

◆ setContainer()

void oox::vml::ShapeBase::setContainer ( ShapeContainer pContainer)

Definition at line 505 of file vmlshape.cxx.

References mpContainer.

Member Data Documentation

◆ maShapeModel

ShapeModel oox::vml::ShapeBase::maShapeModel
protected

◆ mpContainer

ShapeContainer* oox::vml::ShapeBase::mpContainer = nullptr
protected

Definition at line 304 of file vmlshape.hxx.

Referenced by getContainer(), and setContainer().


The documentation for this class was generated from the following files: