20#ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_DRAWSHAPE_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_DRAWSHAPE_HXX
23#include <osl/diagnose.hxx>
24#include <com/sun/star/drawing/XShape.hpp>
41 struct SlideShowContext;
42 class DrawShapeSubsetting;
56 public ::osl::DebugBase<DrawShape>
80 const css::uno::Reference< css::drawing::XShape >& xShape,
81 const css::uno::Reference< css::drawing::XDrawPage >& xContainingPage,
107 const css::uno::Reference< css::drawing::XShape >& xShape,
108 const css::uno::Reference< css::drawing::XDrawPage >& xContainingPage,
113 virtual css::uno::Reference< css::drawing::XShape >
getXShape()
const override;
122 bool bRedrawLayer )
override;
133 virtual ::basegfx::B2DRectangle
getBounds()
const override;
134 virtual ::basegfx::B2DRectangle
getDomBounds()
const override;
135 virtual ::basegfx::B2DRectangle
getUpdateArea()
const override;
150 virtual bool update()
const override;
151 virtual bool render()
const override;
176 sal_Int32 nNodeIndex,
224 css::drawing::XShape >& xShape,
225 const css::uno::Reference<
226 css::drawing::XDrawPage >& xContainingPage,
251 DrawShape(
const css::uno::Reference< css::drawing::XShape >& xShape,
252 css::uno::Reference< css::drawing::XDrawPage > xContainingPage,
275 css::uno::Reference< css::drawing::XShape >
mxShape;
276 css::uno::Reference< css::drawing::XDrawPage >
mxPage;
325 typedef ::std::pair<sal_Int32 ,
Represents an animatable shape, that can have its attributes changed.
Interface to retrieve DocTreeNodes from subsettable shapes.
This class represents kind of a DOM tree node for shape text.
NodeType
Type of shape entity represented by this node.
This class encapsulates the subsetting aspects of a DrawShape.
This class is the representation of a draw document's XShape, and implements the Shape,...
State::StateId mnAttributeClipState
HyperlinkIndexPairVector maHyperlinkIndices
static DrawShapeSharedPtr create(const css::uno::Reference< css::drawing::XShape > &xShape, const css::uno::Reference< css::drawing::XDrawPage > &xContainingPage, double nPrio, const Graphic &rGraphic, const SlideShowContext &rContext)
Create a shape for the given XShape and graphic content.
virtual bool revokeSubset(const AttributableShapeSharedPtr &rShape) override
Revoke a previously generated shape subset.
css::uno::Reference< css::drawing::XDrawPage > mxPage
::basegfx::B2DRectangle getActualUnitShapeBounds() const
virtual bool isContentChanged() const override
Query whether shape content changed.
virtual void addViewLayer(const ViewLayerSharedPtr &rNewLayer, bool bRedrawLayer) override
Add a new view layer.
virtual void leaveAnimationMode() override
Notify the Shape that it is no longer animated.
void setIntrinsicAnimationFrame(::std::size_t nCurrFrame)
Display next frame of an intrinsic animation.
sal_uInt32 mnAnimationLoopCount
Number of times the bitmap animation shall loop.
bool mbDrawingLayerAnim
whether a drawing layer animation has to be performed
int mnIsAnimatedCount
Whether this shape is currently in animation mode (value != 0)
State::StateId mnAttributePositionState
bool implRender(UpdateFlags nUpdateFlags) const
virtual bool update() const override
Update the shape.
static DrawShapeSharedPtr create(const css::uno::Reference< css::drawing::XShape > &xShape, const css::uno::Reference< css::drawing::XDrawPage > &xContainingPage, double nPrio, bool bForeignSource, const SlideShowContext &rContext)
Create a shape for the given XShape.
State::StateId mnAttributeAlphaState
virtual bool isVisible() const override
Query whether the shape is visible at all.
virtual double getPriority() const override
Get the shape priority.
virtual void clearAllViewLayers() override
Withdraw all view layers at once.
GDIMetaFileSharedPtr const & forceScrollTextMetaFile()
forces the drawshape to load and return a specially crafted metafile, usable to display drawing layer...
virtual ShapeAttributeLayerSharedPtr createAttributeLayer() override
Create a new shape attribute layer.
virtual ::basegfx::B2DRectangle getUpdateArea() const override
Get the current shape update area.
ViewShapeVector maViewShapes
DrawShape(const css::uno::Reference< css::drawing::XShape > &xShape, const css::uno::Reference< css::drawing::XDrawPage > &xContainingPage, double nPrio, bool bForeignSource, const SlideShowContext &rContext)
Create a shape for the given XShape.
virtual DocTreeNode getTreeNode(sal_Int32 nNodeIndex, DocTreeNode::NodeType eNodeType) const override
Create DocTreeNode from shape.
mutable ::std::optional< basegfx::B2DRectangle > maCurrentShapeUnitBounds
Contains the current shape bounds, in unit rect space.
::std::pair< sal_Int32, sal_Int32 > HyperlinkIndexPair
hyperlink support
::std::vector< HyperlinkIndexPair > HyperlinkIndexPairVector
std::weak_ptr< Activity > mpIntrinsicAnimationActivity
virtual ::basegfx::B2DRectangle getDomBounds() const override
Get the DOM position and size of the shape.
GDIMetaFileSharedPtr mpCurrMtf
Metafile of currently active frame (static for shapes w/o intrinsic animation)
virtual void enterAnimationMode() override
Notify the Shape that an animation starts now.
bool mbIsVisible
Whether shape is visible (without attribute layers)
DrawShape(const css::uno::Reference< css::drawing::XShape > &xShape, css::uno::Reference< css::drawing::XDrawPage > xContainingPage, double nPrio, const Graphic &rGraphic, const SlideShowContext &rContext)
Create a shape for the given XShape and graphic content.
virtual double getHyperlinkPriority() const override
Retrieve priority of link area.
virtual const DocTreeNodeSupplier & getTreeNodeSupplier() const override
Retrieve interface for DocTreeNode creation.
virtual bool render() const override
Render the shape.
virtual DocTreeNode getSubsetTreeNode(const DocTreeNode &rParentNode, sal_Int32 nNodeIndex, DocTreeNode::NodeType eNodeType) const override
Create DocTreeNode from shape subset.
ShapeAttributeLayerSharedPtr mpAttributeLayer
int mnCurrMtfLoadFlags
loadflags of current meta file
::std::size_t mnCurrFrame
bool mbAttributeLayerRevoked
Whether attribute layer was revoked (making a redraw necessary)
UpdateFlags getUpdateFlags() const
DrawShapeSubsetting maSubsetting
Delegated subset handling.
virtual bool createSubset(AttributableShapeSharedPtr &o_rSubset, const DocTreeNode &rTreeNode) override
Create a subset Shape.
VectorOfMtfAnimationFrames maAnimationFrames
A vector of metafiles actually representing the Shape.
void updateStateIds() const
bool hasIntrinsicAnimation() const
State::StateId mnAttributeTransformationState
virtual bool revokeAttributeLayer(const ShapeAttributeLayerSharedPtr &rLayer) override
Revoke a previously generated attribute layer.
virtual HyperlinkRegions getHyperlinkRegions() const override
Request hyperlink-sensitive areas.
State::StateId mnAttributeVisibilityState
virtual DocTreeNode getSubsetNode() const override
Query the subset this shape displays.
css::uno::Reference< css::drawing::XShape > mxShape
The associated XShape.
virtual void setVisibility(bool bVisible) override
Change default shape visibility.
ViewShape::RenderArgs getViewRenderArgs() const
virtual AttributableShapeSharedPtr getSubset(const DocTreeNode &rTreeNode) const override
Query a subset Shape, if already existent at this object.
::basegfx::B2DRectangle maBounds
::std::vector< ViewShapeSharedPtr > ViewShapeVector
the list of active view shapes (one for each registered view layer)
virtual css::uno::Reference< css::drawing::XShape > getXShape() const override
Get the associated XShape of this shape.
HyperlinkRegions maHyperlinkRegions
virtual bool isBackgroundDetached() const override
Query whether the Shape is currently detached from the background.
virtual ShapeAttributeLayerSharedPtr getTopmostAttributeLayer() const override
Get the topmost shape attribute layer (if any).
State::StateId mnAttributeContentState
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
virtual sal_Int32 getNumberOfTreeNodes(DocTreeNode::NodeType eNodeType) const override
Query number of tree nodes of the given type this shape contains.
bool mbForceUpdate
Whether redraw is necessary, regardless of state ids.
virtual bool removeViewLayer(const ViewLayerSharedPtr &rNewLayer) override
Withdraw the shape from a view layer.
bool mbContainsPageField
tdf#150402 whether mpCurrMtf contains any Text with a PageField ("FIELD_SEQ_BEGIN;PageField")
virtual ~DrawShape() override
void prepareHyperlinkIndices() const
bool hasHyperlinks() const
virtual sal_Int32 getNumberOfSubsetTreeNodes(const DocTreeNode &rParentNode, DocTreeNode::NodeType eNodeType) const override
Query number of tree nodes of the given type this subset contains.
virtual ::basegfx::B2DRectangle getBounds() const override
Get the current shape position and size.
std::vector< HyperlinkRegion > HyperlinkRegions
::std::size_t StateId
Abstract, numerically encoded state ID.
::std::shared_ptr< ShapeAttributeLayer > ShapeAttributeLayerSharedPtr
std::shared_ptr< ViewLayer > ViewLayerSharedPtr
::std::shared_ptr< DrawShape > DrawShapeSharedPtr
std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr
::std::vector< MtfAnimationFrame > VectorOfMtfAnimationFrames
::std::shared_ptr< AttributableShape > AttributableShapeSharedPtr
Common arguments for slideshow objects.