LibreOffice Module oox (master) 1
|
A shape object that is part of a drawing. More...
#include <vmlshape.hxx>
Public Member Functions | |
ShapeModel & | getShapeModel () |
Returns read/write access to the shape model structure. More... | |
const ShapeModel & | getShapeModel () const |
Returns read access to the shape model structure. More... | |
const TextBox * | getTextBox () const |
Returns read access to the shape textbox. More... | |
const ClientData * | getClientData () 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 ShapeType * | getChildTypeById (const OUString &rShapeId) const |
Returns the shape template with the passed identifier from the child shapes. More... | |
virtual const ShapeBase * | getChildById (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) |
ShapeContainer * | getContainer () const |
Public Member Functions inherited from oox::vml::ShapeType | |
ShapeType (Drawing &rDrawing) | |
virtual | ~ShapeType () |
ShapeTypeModel & | getTypeModel () |
Returns read/write access to the shape template model structure. More... | |
const ShapeTypeModel & | getTypeModel () 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 Drawing & | getDrawing () 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... | |
ShapeContainer * | mpContainer = nullptr |
Protected Attributes inherited from oox::vml::ShapeType | |
Drawing & | mrDrawing |
The VML drawing page that contains this shape. More... | |
ShapeTypeModel | maTypeModel |
The model structure containing shape type data. More... | |
A shape object that is part of a drawing.
May inherit properties from a shape template.
Definition at line 240 of file vmlshape.hxx.
|
explicitprotected |
Definition at line 284 of file vmlshape.cxx.
|
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().
Reference< XShape > oox::vml::ShapeBase::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.
Definition at line 352 of file vmlshape.cxx.
References Any, calcShapeRectangle(), comphelper::containerToSequence(), oox::vml::ConversionHelper::decodeRotation(), finalImplConvertAndInsert(), o3tl::strong_int< typename UNDERLYING_TYPE, typename PHANTOM_TYPE >::get(), getShapeName(), getTextBox(), oox::vml::ShapeType::getTypeModel(), oox::PropertySet::hasProperty(), implConvertAndInsert(), oox::vml::Drawing::isShapeSupported(), length, comphelper::makePropertyValue(), oox::vml::ShapeTypeModel::maLegacyId, oox::vml::ShapeTypeModel::maRotation, oox::vml::ShapeType::maTypeModel, oox::vml::ShapeTypeModel::maZIndex, mbVisible, oox::vml::ShapeType::mrDrawing, oox::vml::TextBox::msNextTextbox, oox::vml::Drawing::notifyXShapeInserted(), SAL_WARN, oox::PropertySet::setProperty(), and o3tl::toInt32().
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().
|
protected |
Converts common shape properties such as formatting attributes.
Definition at line 522 of file vmlshape.cxx.
References oox::vml::ConversionHelper::decodeMeasureToHmm(), oox::PropertyMap::erase(), oox::vml::Drawing::getFilter(), oox::core::FilterBase::getGraphicHelper(), oox::core::FilterBase::getModelObjectHelper(), oox::PropertyMap::getProperty(), oox::PropertyMap::getPropertyName(), oox::PropertyMap::hasProperty(), oox::vml::ShapeTypeModel::maFillModel, oox::vml::ShapeTypeModel::maShadowModel, oox::vml::ShapeTypeModel::maStrokeModel, oox::vml::ShapeTypeModel::maTextpathModel, oox::vml::ShapeType::maTypeModel, oox::vml::StrokeModel::moWeight, oox::vml::ShapeType::mrDrawing, nBorder, PROP_BackColor, PROP_BackColorTransparency, PROP_BottomBorder, PROP_FillColor, PROP_FillTransparence, PROP_LeftBorder, PROP_LineColor, PROP_RightBorder, PROP_TopBorder, oox::vml::StrokeModel::pushToPropMap(), oox::vml::FillModel::pushToPropMap(), oox::vml::TextpathModel::pushToPropMap(), oox::vml::ShadowModel::pushToPropMap(), oox::drawingml::ShapePropertyMap::setAnyProperty(), oox::PropertySet::setProperties(), and oox::drawingml::ShapePropertyMap::setProperty().
Referenced by convertFormatting(), oox::vml::SimpleShape::implConvertAndInsert(), and oox::vml::CustomShape::implConvertAndInsert().
|
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().
|
virtual |
Final processing after import of the drawing fragment.
Reimplemented in oox::vml::GroupShape.
Definition at line 289 of file vmlshape.cxx.
References oox::vml::FillModel::assignUsed(), oox::vml::ShapeTypeModel::assignUsed(), oox::vml::StrokeModel::assignUsed(), oox::vml::Drawing::getShapes(), oox::vml::ShapeContainer::getShapeTypeById(), oox::vml::ShapeTypeModel::maFillModel, maShapeModel, oox::vml::ShapeTypeModel::maStrokeModel, oox::vml::ShapeModel::maType, oox::vml::ShapeType::maTypeModel, oox::vml::ShapeTypeModel::moShapeType, oox::vml::ShapeType::mrDrawing, o3tl::toInt32(), and u.
Referenced by oox::vml::ShapeContainer::finalizeFragmentImport(), and oox::vml::GroupShape::finalizeFragmentImport().
|
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().
|
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.
|
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().
ShapeContainer * oox::vml::ShapeBase::getContainer | ( | ) | const |
Definition at line 507 of file vmlshape.cxx.
References mpContainer.
Referenced by oox::vml::ShapeContext::onCreateContext().
|
inline |
Returns read/write access to the shape model structure.
Definition at line 244 of file vmlshape.hxx.
Referenced by oox::vml::ComplexShape::implConvertAndInsert().
|
inline |
Returns read access to the shape model structure.
Definition at line 246 of file vmlshape.hxx.
OUString oox::vml::ShapeBase::getShapeName | ( | ) | const |
Returns the real shape name if existing, or a generated shape name.
Definition at line 326 of file vmlshape.cxx.
References oox::vml::Drawing::getLocalShapeIndex(), oox::vml::Drawing::getShapeBaseName(), oox::vml::ShapeType::getShapeId(), oox::vml::ShapeTypeModel::maShapeName, oox::vml::ShapeType::maTypeModel, and oox::vml::ShapeType::mrDrawing.
Referenced by convertAndInsert().
|
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().
|
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().
void oox::vml::ShapeBase::setContainer | ( | ShapeContainer * | pContainer | ) |
Definition at line 505 of file vmlshape.cxx.
References mpContainer.
|
protected |
The model structure containing shape data.
Definition at line 303 of file vmlshape.hxx.
Referenced by oox::vml::SimpleShape::finalImplConvertAndInsert(), finalizeFragmentImport(), oox::vml::LineShape::getAbsRectangle(), oox::vml::LineShape::getRelRectangle(), oox::vml::SimpleShape::implConvertAndInsert(), oox::vml::PolyLineShape::implConvertAndInsert(), and oox::vml::BezierShape::implConvertAndInsert().
|
protected |
Definition at line 304 of file vmlshape.hxx.
Referenced by getContainer(), and setContainer().