20#ifndef INCLUDED_OOX_DRAWINGML_SHAPE_HXX
21#define INCLUDED_OOX_DRAWINGML_SHAPE_HXX
28#include <com/sun/star/awt/Point.hpp>
29#include <com/sun/star/awt/Size.hpp>
30#include <com/sun/star/beans/PropertyValue.hpp>
31#include <com/sun/star/uno/Reference.hxx>
32#include <com/sun/star/uno/Sequence.hxx>
41#include <rtl/ustring.hxx>
44namespace basegfx {
class B2DHomMatrix; }
48 namespace drawing {
class XShape; }
49 namespace drawing {
class XShapes; }
50 namespace uno {
class Any; }
68struct EffectProperties;
70struct GraphicProperties;
72struct Shape3DProperties;
74class CustomShapeProperties;
110 :
public std::enable_shared_from_this< Shape >
114 explicit Shape(
const char* pServiceType =
nullptr,
bool bDefaultHeight =
true );
121 void setServiceName(
const char* pServiceName );
161 void setRotation( sal_Int32 nRotation ) { mnRotation = nRotation; }
164 void setFlip(
bool bFlipH,
bool bFlipV ) { mbFlipH = bFlipH; mbFlipV = bFlipV; }
172 void setInternalName(
const OUString& rInternalName ) { msInternalName = rInternalName; }
174 void setId(
const OUString& rId ) { msId = rId; }
175 const OUString&
getId()
const {
return msId; }
177 void setDecorative(
bool const isDecorative) { m_isDecorative = isDecorative; }
181 void setSubType( sal_Int32 nSubType ) { mnSubType = nSubType; }
187 void setDefaults(
bool bHeight);
191 void setDiagramType();
196 void setMasterTextListStyle(
const TextListStylePtr& pMasterTextListStyle );
201 const ShapeStyleRef* getShapeStyleRef( sal_Int32 nRefType )
const;
208 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
214 const css::uno::Reference< css::drawing::XShape > &
217 void applyShapeReference(
const Shape& rReferencedShape,
bool bUseText =
true );
218 const ::std::vector<OUString>&
224 void setLockedCanvas(
bool bLockedCanvas);
226 void setWPGChild(
bool bWPG);
228 void setWps(
bool bWps);
230 void setTextBox(
bool bTextBox);
231 const css::uno::Sequence<css::beans::PropertyValue> &
233 void setDiagramDoms(
const css::uno::Sequence<css::beans::PropertyValue>& rDiagramDoms) { maDiagramDoms = rDiagramDoms; }
234 css::uno::Sequence< css::uno::Sequence< css::uno::Any > >resolveRelationshipsOfTypeFromOfficeDoc(
241 void setZOrder(sal_Int32 nZOrder) { mnZOrder = nZOrder; }
261 void cloneFillProperties();
267 void prepareDiagramHelper(
const std::shared_ptr< Diagram >& rDiagramPtr,
const std::shared_ptr<::oox::drawingml::Theme>& rTheme);
268 void propagateDiagramHelper();
271 void migrateDiagramHelperToNewShape(
const ShapePtr& pTarget);
284 css::uno::Reference< css::drawing::XShape >
const &
287 const OUString& rServiceName,
289 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
291 bool bDoNotInsertEmptyTextBody,
301 const css::uno::Reference< css::drawing::XShapes >& rxShapes,
305 void keepDiagramCompatibilityInfo();
308 css::uno::Reference< css::drawing::XShape >
311 OUString finalizeServiceName(
313 const OUString& rServiceName,
314 const css::awt::Rectangle& rShapeRect );
318 const css::uno::Reference< css::drawing::XShapes >& rxShapes );
321 const OUString& sPropertyName,
const css::uno::Any& aPropertyValue );
323 const css::beans::PropertyValue& pProperty );
324 void putPropertiesToGrabBag(
325 const css::uno::Sequence< css::beans::PropertyValue >& aProperties );
351 css::uno::Reference< css::drawing::XShape >
mxShape;
360 bool m_isDecorative =
false;
400 sal_Int32 mnZOrder = 0;
403 sal_Int32 mnZOrderOff = 0;
406 sal_Int32 mnDataNodeType = 0;
409 double mfAspectRatio = 0;
412 sal_Int32 mnVerticalShapesCount = 0;
415 bool mbConnector =
false;
geometry::RealPoint2D maPosition
geometry::RealSize2D maSize
std::vector< Reference< XAnimationNode > > maChildren
A helper that maps property identifiers to property values.
sal_Int32 getZOrder() const
void setConnectorShape(bool bConnector)
EffectPropertiesPtr mpEffectPropertiesPtr
bool mbLockedCanvas
Is this shape part of a locked canvas?
void setTxbxHasLinkedTxtBox(const bool rhs)
sal_Int32 getZOrderOff() const
void setSubType(sal_Int32 nSubType)
FrameType meFrameType
Type for graphic frame shapes.
const OUString & getInternalName() const
void setLocked(bool bLocked)
void putPropertyToGrabBag(const OUString &sPropertyName, const css::uno::Any &aPropertyValue)
svx::diagram::IDiagramHelper * mpDiagramHelper
OUString msDiagramDataModelID
PropertyMap maShapeProperties
PropertyMap & getShapeProperties()
void setDiagramDoms(const css::uno::Sequence< css::beans::PropertyValue > &rDiagramDoms)
LinePropertiesPtr mpShapeRefLinePropPtr
sal_Int32 getDataNodeType() const
CustomShapePropertiesPtr & getCustomShapeProperties()
css::uno::Sequence< css::beans::PropertyValue > maDiagramDoms
const OUString & getName() const
void setSize(css::awt::Size aSize)
std::vector< ShapePtr > & getChildren()
LineProperties & getLineProperties()
const ::std::vector< OUString > & getExtDrawings() const
OUString & getServiceName()
void setAspectRatio(double fAspectRatio)
void setZOrder(sal_Int32 nZOrder)
bool getLockedCanvas() const
const OUString & getId() const
PropertyMap maDefaultShapeProperties
GraphicProperties & getGraphicProperties()
const css::awt::Size & getSize() const
ConnectorShapePropertiesList maConnectorShapePropertiesList
void setHiddenMasterShape(bool bHiddenMasterShape)
const OUString & getDiagramDataModelID() const
std::shared_ptr< ChartShapeInfo > ChartShapeInfoRef
void setDataNodeType(sal_Int32 nDataNodeType)
GraphicPropertiesPtr mpGraphicPropertiesPtr
void addChild(const ShapePtr &rChildPtr)
const FillProperties & getFillProperties() const
void setSubTypeIndex(sal_Int32 nSubTypeIndex)
const Color & getFontRefColorForNodes() const
void setFontRefColorForNodes(const Color &rColor)
const GraphicProperties & getGraphicProperties() const
const std::optional< sal_Int32 > & getSubTypeIndex() const
bool mbTextBox
This shape has a textbox.
std::shared_ptr< ::oox::vml::OleObjectInfo > OleObjectInfoRef
ShapeStyleRefMap maShapeStyleRefs
void setRotation(sal_Int32 nRotation)
EffectProperties & getEffectProperties() const
const LinkedTxbxAttr & getLinkedTxbxAttributes() const
Shape3DProperties & get3DProperties()
void setDescription(const OUString &rDescr)
void setId(const OUString &rId)
const LineProperties & getLineProperties() const
FillPropertiesPtr mpShapeRefFillPropPtr
@ FRAMETYPE_GENERIC
Generic shape, no special type.
@ FRAMETYPE_OLEOBJECT
OLE object embedded in a shape.
@ FRAMETYPE_CHART
Chart embedded in a shape.
@ FRAMETYPE_DIAGRAM
Complex diagram drawing shape.
void setDiagramDataModelID(const OUString &rDiagramDataModelID)
bool isConnectorShape() const
void addExtDrawingRelId(const OUString &rRelId)
void setName(const OUString &rName)
sal_Int32 getVerticalShapesCount() const
Shape3DPropertiesPtr mp3DPropertiesPtr
void setLinkedTxbxAttributes(const LinkedTxbxAttr &rhs)
ChartShapeInfoRef mxChartShapeInfo
Additional data for chart shapes.
const css::uno::Sequence< css::beans::PropertyValue > & getDiagramDoms() const
const Shape3DProperties & get3DProperties() const
sal_Int32 getSubType() const
const css::awt::Point & getPosition() const
css::awt::Point maPosition
void setFlip(bool bFlipH, bool bFlipV)
TextListStylePtr mpMasterTextListStyle
std::optional< sal_Int32 > moSubTypeIndex
void setChildPosition(css::awt::Point nPosition)
table::TablePropertiesPtr mpTablePropertiesPtr
const TextListStylePtr & getMasterTextListStyle() const
double getAspectRatio() const
sal_Int32 getRotation() const
FillPropertiesPtr mpFillPropertiesPtr
void setHidden(bool bHidden)
void setZOrderOff(sal_Int32 nZOrderOff)
const ShapeStyleRefMap & getShapeStyleRefs() const
CustomShapePropertiesPtr mpCustomShapePropertiesPtr
ConnectorShapePropertiesList & getConnectorShapeProperties()
OleObjectInfoRef mxOleObjectInfo
Additional data for OLE objects.
FillProperties & getFillProperties()
void putPropertyToGrabBag(const css::beans::PropertyValue &pProperty)
void setInternalName(const OUString &rInternalName)
OUString & getConnectorName()
bool mbWps
Is this a wps shape?
Shape(Shape const &)=default
void setPosition(css::awt::Point nPosition)
LinePropertiesPtr mpLinePropertiesPtr
ShapeStyleRefMap & getShapeStyleRefs()
const css::uno::Reference< css::drawing::XShape > & getXShape() const
virtual void finalizeXShape(::oox::core::XmlFilterBase &rFilter, const css::uno::Reference< css::drawing::XShapes > &rxShapes)
void setDecorative(bool const isDecorative)
std::vector< OUString > & getConnectorAdjustments()
::std::vector< OUString > maExtDrawings
std::vector< ShapePtr > maChildren
void setChildSize(css::awt::Size aSize)
EffectPropertiesPtr mpShapeRefEffectPropPtr
const TextBodyPtr & getTextBody() const
css::awt::Point maChPosition
void setDiagramRotation(sal_Int32 nRotation)
bool isLinkedTxbx() const
Color maFontRefColorForNodes
void setVerticalShapesCount(sal_Int32 nVerticalShapesCount)
sal_Int32 mnDiagramRotation
css::uno::Reference< css::drawing::XShape > mxShape
std::vector< OUString > maConnectorAdjustmentList
bool hasShapeStyleRefs() const
LinkedTxbxAttr maLinkedTxbxAttr
std::shared_ptr< TableProperties > TablePropertiesPtr
std::shared_ptr< Shape3DProperties > Shape3DPropertiesPtr
std::shared_ptr< Shape > ShapePtr
std::vector< ConnectorShapeProperties > ConnectorShapePropertiesList
std::shared_ptr< CustomShapeProperties > CustomShapePropertiesPtr
::std::map< OUString, ShapePtr > ShapeIdMap
std::shared_ptr< FillProperties > FillPropertiesPtr
std::shared_ptr< TextListStyle > TextListStylePtr
::std::map< sal_Int32, ShapeStyleRef > ShapeStyleRefMap
std::shared_ptr< GraphicProperties > GraphicPropertiesPtr
std::shared_ptr< TextBody > TextBodyPtr
std::shared_ptr< EffectProperties > EffectPropertiesPtr
std::shared_ptr< LineProperties > LinePropertiesPtr
uno::Reference< drawing::XShape > const mxShape
Additional information for a chart embedded in a drawing shape.
bool mbEmbedShapes
True = load chart shapes into chart, false = load into parent drawpage.
OUString maFragmentPath
Path to related XML stream, e.g. for charts.
ChartShapeInfo(bool bEmbedShapes)
Attributes for a linked textbox.
Contains information about an OLE object embedded in a draw page.