LibreOffice Module oox (master) 1
Public Member Functions | Private Attributes | List of all members
oox::drawingml::chart::ShapeAnchor Class Reference

Contains the position of a shape in the chart object. More...

#include <chartdrawingfragment.hxx>

Collaboration diagram for oox::drawingml::chart::ShapeAnchor:
[legend]

Public Member Functions

 ShapeAnchor (bool bRelSize)
 
void importExt (const AttributeList &rAttribs)
 Imports the absolute anchor size from the cdr:ext element. More...
 
void setPos (sal_Int32 nElement, sal_Int32 nParentContext, std::u16string_view rValue)
 Sets the relative anchor position from the cdr:from or cdr:to element. More...
 
EmuRectangle calcAnchorRectEmu (const EmuRectangle &rChartRect) const
 Calculates the resulting shape anchor in EMUs. More...
 

Private Attributes

AnchorPosModel maFrom
 
AnchorPosModel maTo
 Top-left position relative to chart object. More...
 
AnchorSizeModel maSize
 Bottom-right position relative to chart object. More...
 
bool mbRelSize
 Shape size, if anchor has absolute size. More...
 

Detailed Description

Contains the position of a shape in the chart object.

Supports different shape anchor modes (absolute, relative).

Definition at line 51 of file chartdrawingfragment.hxx.

Constructor & Destructor Documentation

◆ ShapeAnchor()

oox::drawingml::chart::ShapeAnchor::ShapeAnchor ( bool  bRelSize)
explicit

Definition at line 43 of file chartdrawingfragment.cxx.

Member Function Documentation

◆ calcAnchorRectEmu()

EmuRectangle oox::drawingml::chart::ShapeAnchor::calcAnchorRectEmu ( const EmuRectangle rChartRect) const

◆ importExt()

void oox::drawingml::chart::ShapeAnchor::importExt ( const AttributeList rAttribs)

Imports the absolute anchor size from the cdr:ext element.

Definition at line 48 of file chartdrawingfragment.cxx.

References oox::AttributeList::getHyper(), oox::drawingml::EmuSize::Height, maSize, mbRelSize, and oox::drawingml::EmuSize::Width.

◆ setPos()

void oox::drawingml::chart::ShapeAnchor::setPos ( sal_Int32  nElement,
sal_Int32  nParentContext,
std::u16string_view  rValue 
)

Sets the relative anchor position from the cdr:from or cdr:to element.

Definition at line 55 of file chartdrawingfragment.cxx.

References from, maFrom, maTo, mbRelSize, oox::drawingml::chart::AnchorPosModel::mfX, oox::drawingml::chart::AnchorPosModel::mfY, to, o3tl::toDouble(), x, and y.

Member Data Documentation

◆ maFrom

AnchorPosModel oox::drawingml::chart::ShapeAnchor::maFrom
private

Definition at line 65 of file chartdrawingfragment.hxx.

Referenced by calcAnchorRectEmu(), and setPos().

◆ maSize

AnchorSizeModel oox::drawingml::chart::ShapeAnchor::maSize
private

Bottom-right position relative to chart object.

Definition at line 67 of file chartdrawingfragment.hxx.

Referenced by calcAnchorRectEmu(), and importExt().

◆ maTo

AnchorPosModel oox::drawingml::chart::ShapeAnchor::maTo
private

Top-left position relative to chart object.

Definition at line 66 of file chartdrawingfragment.hxx.

Referenced by calcAnchorRectEmu(), and setPos().

◆ mbRelSize

bool oox::drawingml::chart::ShapeAnchor::mbRelSize
private

Shape size, if anchor has absolute size.

Definition at line 68 of file chartdrawingfragment.hxx.

Referenced by calcAnchorRectEmu(), importExt(), and setPos().


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