summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-04 08:57:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-05 12:12:26 +0100
commit191f85df5851473af270be486f95f940e3091fef (patch)
tree753d9513ccda8ee2a132bdad74eedc47bd71b179 /slideshow
parent983566119c926d0e2478f74548f00a789de55c15 (diff)
re-land "new loplugin typedefparam""
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/animationnodes/animationaudionode.hxx2
-rw-r--r--slideshow/source/engine/animationnodes/animationbasenode.hxx2
-rw-r--r--slideshow/source/engine/shapes/backgroundshape.cxx2
-rw-r--r--slideshow/source/engine/shapes/backgroundshape.hxx3
-rw-r--r--slideshow/source/engine/shapes/drawshapesubsetting.hxx5
-rw-r--r--slideshow/source/engine/shapes/mediashape.hxx3
-rw-r--r--slideshow/source/engine/slide/layer.hxx11
-rw-r--r--slideshow/source/engine/slide/layermanager.cxx2
-rw-r--r--slideshow/source/engine/slide/shapemanagerimpl.hxx12
-rw-r--r--slideshow/source/engine/slideview.cxx6
-rw-r--r--slideshow/source/engine/transitions/slidechangebase.cxx2
-rw-r--r--slideshow/source/engine/transitions/slidechangebase.hxx22
-rw-r--r--slideshow/source/inc/animationnode.hxx10
-rw-r--r--slideshow/source/inc/basecontainernode.hxx8
-rw-r--r--slideshow/source/inc/basenode.hxx11
-rw-r--r--slideshow/source/inc/eventmultiplexer.hxx8
-rw-r--r--slideshow/source/inc/hslcoloranimation.hxx4
-rw-r--r--slideshow/source/inc/numberanimation.hxx4
-rw-r--r--slideshow/source/inc/pairanimation.hxx4
-rw-r--r--slideshow/source/inc/shape.hxx8
-rw-r--r--slideshow/source/inc/shapemanager.hxx13
-rw-r--r--slideshow/source/inc/slide.hxx2
-rw-r--r--slideshow/source/inc/slideshowcontext.hxx3
-rw-r--r--slideshow/source/inc/subsettableshapemanager.hxx11
-rw-r--r--slideshow/source/inc/tools.hxx61
-rw-r--r--slideshow/source/inc/view.hxx2
-rw-r--r--slideshow/source/inc/viewlayer.hxx14
27 files changed, 127 insertions, 108 deletions
diff --git a/slideshow/source/engine/animationnodes/animationaudionode.hxx b/slideshow/source/engine/animationnodes/animationaudionode.hxx
index 30de41cfb44e..d1c08601cf20 100644
--- a/slideshow/source/engine/animationnodes/animationaudionode.hxx
+++ b/slideshow/source/engine/animationnodes/animationaudionode.hxx
@@ -38,7 +38,7 @@ class AnimationAudioNode : public BaseNode, public AnimationEventHandler
public:
AnimationAudioNode(
css::uno::Reference<css::animations::XAnimationNode> const& xNode,
- ::std::shared_ptr<BaseContainerNode> const& pParent,
+ BaseContainerNodeSharedPtr const& pParent,
NodeContext const& rContext );
protected:
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.hxx b/slideshow/source/engine/animationnodes/animationbasenode.hxx
index d8bbb09d8527..55ec060ac4ad 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.hxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.hxx
@@ -40,7 +40,7 @@ class AnimationBaseNode : public BaseNode
public:
AnimationBaseNode(
css::uno::Reference<css::animations::XAnimationNode> const& xNode,
- ::std::shared_ptr<BaseContainerNode> const& pParent,
+ BaseContainerNodeSharedPtr const& pParent,
NodeContext const& rContext );
#if defined(DBG_UTIL)
diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx
index 12d7f8a61736..11c4ed1c1e0f 100644
--- a/slideshow/source/engine/shapes/backgroundshape.cxx
+++ b/slideshow/source/engine/shapes/backgroundshape.cxx
@@ -289,7 +289,7 @@ namespace slideshow
}
- ShapeSharedPtr createBackgroundShape(
+ ShapeSharedPtr createBackgroundShape(
const uno::Reference< drawing::XDrawPage >& xDrawPage,
const uno::Reference< drawing::XDrawPage >& xMasterPage,
const SlideShowContext& rContext )
diff --git a/slideshow/source/engine/shapes/backgroundshape.hxx b/slideshow/source/engine/shapes/backgroundshape.hxx
index cc7fa93477aa..c7ff134e0dc5 100644
--- a/slideshow/source/engine/shapes/backgroundshape.hxx
+++ b/slideshow/source/engine/shapes/backgroundshape.hxx
@@ -33,6 +33,7 @@ namespace slideshow
{
class Shape;
struct SlideShowContext;
+ typedef ::std::shared_ptr< Shape > ShapeSharedPtr;
/** Representation of a draw document's background shape.
@@ -41,7 +42,7 @@ namespace slideshow
nor attributable, those more specialized derivations of
the Shape interface are not implemented here.
*/
- std::shared_ptr<Shape> createBackgroundShape(
+ ShapeSharedPtr createBackgroundShape(
const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
const css::uno::Reference< css::drawing::XDrawPage >& xMasterPage,
const SlideShowContext& rContext ); // throw ShapeLoadFailedException;
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.hxx b/slideshow/source/engine/shapes/drawshapesubsetting.hxx
index ff32a4a653cf..f9ea3f4d5981 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.hxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.hxx
@@ -25,6 +25,7 @@
class GDIMetaFile;
+typedef ::std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr;
namespace slideshow
{
@@ -58,8 +59,8 @@ namespace slideshow
Metafile to retrieve subset info from (must have been
generated with verbose text comments switched on).
*/
- DrawShapeSubsetting( const DocTreeNode& rShapeSubset,
- ::std::shared_ptr< GDIMetaFile > rMtf );
+ DrawShapeSubsetting( const DocTreeNode& rShapeSubset,
+ GDIMetaFileSharedPtr rMtf );
/// Forbid copy construction
DrawShapeSubsetting(const DrawShapeSubsetting&) = delete;
diff --git a/slideshow/source/engine/shapes/mediashape.hxx b/slideshow/source/engine/shapes/mediashape.hxx
index ce1ba8bfe3a4..01f7b1ccf607 100644
--- a/slideshow/source/engine/shapes/mediashape.hxx
+++ b/slideshow/source/engine/shapes/mediashape.hxx
@@ -35,8 +35,9 @@ namespace slideshow
{
struct SlideShowContext;
class Shape;
+ typedef ::std::shared_ptr< Shape > ShapeSharedPtr;
- std::shared_ptr<Shape> createMediaShape(
+ ShapeSharedPtr createMediaShape(
const css::uno::Reference<css::drawing::XShape >& xShape,
double nPrio,
const SlideShowContext& rContext);
diff --git a/slideshow/source/engine/slide/layer.hxx b/slideshow/source/engine/slide/layer.hxx
index ae2add70a5bf..95a5f7d4402c 100644
--- a/slideshow/source/engine/slide/layer.hxx
+++ b/slideshow/source/engine/slide/layer.hxx
@@ -35,6 +35,10 @@ namespace slideshow
namespace internal
{
class LayerEndUpdate;
+ class Layer;
+ typedef ::std::shared_ptr< Layer > LayerSharedPtr;
+ typedef ::std::weak_ptr< Layer > LayerWeakPtr;
+
/* Definition of Layer class */
@@ -71,7 +75,7 @@ namespace slideshow
This method will create a layer without a ViewLayer,
i.e. one that displays directly on the background.
*/
- static ::std::shared_ptr< Layer > createBackgroundLayer();
+ static LayerSharedPtr createBackgroundLayer();
/** Create non-background layer
@@ -79,7 +83,7 @@ namespace slideshow
background, to contain shapes that should appear in
front of animated objects.
*/
- static ::std::shared_ptr< Layer > createLayer();
+ static LayerSharedPtr createLayer();
/** Predicate, whether this layer is the special
@@ -255,9 +259,6 @@ namespace slideshow
bool mbClipSet; // true, if beginUpdate set a clip
};
- typedef ::std::shared_ptr< Layer > LayerSharedPtr;
- typedef ::std::weak_ptr< Layer > LayerWeakPtr;
-
}
}
diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx
index 84be4b5d6e2c..caca994dabe4 100644
--- a/slideshow/source/engine/slide/layermanager.cxx
+++ b/slideshow/source/engine/slide/layermanager.cxx
@@ -546,7 +546,7 @@ namespace slideshow
{
}
- virtual bool isOnView(std::shared_ptr<View> const& /*rView*/) const override
+ virtual bool isOnView(ViewSharedPtr const& /*rView*/) const override
{
return true; // visible on all views
}
diff --git a/slideshow/source/engine/slide/shapemanagerimpl.hxx b/slideshow/source/engine/slide/shapemanagerimpl.hxx
index 6fb693c75818..e4634064bc0c 100644
--- a/slideshow/source/engine/slide/shapemanagerimpl.hxx
+++ b/slideshow/source/engine/slide/shapemanagerimpl.hxx
@@ -119,18 +119,18 @@ private:
virtual void notifyShapeUpdate( const ShapeSharedPtr& rShape ) override;
virtual ShapeSharedPtr lookupShape(
css::uno::Reference< css::drawing::XShape > const & xShape ) const override;
- virtual void addHyperlinkArea( const std::shared_ptr<HyperlinkArea>& rArea ) override;
+ virtual void addHyperlinkArea( const HyperlinkAreaSharedPtr& rArea ) override;
// SubsettableShapeManager interface
- virtual std::shared_ptr<AttributableShape> getSubsetShape(
- const std::shared_ptr<AttributableShape>& rOrigShape,
- const DocTreeNode& rTreeNode ) override;
+ virtual AttributableShapeSharedPtr getSubsetShape(
+ const AttributableShapeSharedPtr& rOrigShape,
+ const DocTreeNode& rTreeNode ) override;
virtual void revokeSubset(
- const std::shared_ptr<AttributableShape>& rOrigShape,
- const std::shared_ptr<AttributableShape>& rSubsetShape ) override;
+ const AttributableShapeSharedPtr& rOrigShape,
+ const AttributableShapeSharedPtr& rSubsetShape ) override;
virtual void addIntrinsicAnimationHandler(
const IntrinsicAnimationEventHandlerSharedPtr& rHandler ) override;
diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx
index f81f8bd51482..8fb3549c613a 100644
--- a/slideshow/source/engine/slideview.cxx
+++ b/slideshow/source/engine/slideview.cxx
@@ -566,7 +566,7 @@ private:
basegfx::B2IRange(0,0,rSpriteSize.getX(),rSpriteSize.getY()));
}
- virtual bool isOnView(std::shared_ptr<View> const& rView) const override
+ virtual bool isOnView(ViewSharedPtr const& rView) const override
{
return rView.get() == mpParentView;
}
@@ -686,7 +686,7 @@ private:
virtual void setCursorShape( sal_Int16 nPointerShape ) override;
// ViewLayer interface
- virtual bool isOnView(std::shared_ptr<View> const& rView) const override;
+ virtual bool isOnView(ViewSharedPtr const& rView) const override;
virtual void clear() const override;
virtual void clearAll() const override;
virtual cppcanvas::CanvasSharedPtr getCanvas() const override;
@@ -906,7 +906,7 @@ void SlideView::setCursorShape( sal_Int16 nPointerShape )
mxView->setMouseCursor( nPointerShape );
}
-bool SlideView::isOnView(std::shared_ptr<View> const& rView) const
+bool SlideView::isOnView(ViewSharedPtr const& rView) const
{
return rView.get() == this;
}
diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx
index a9a9db55a907..c75382d994ed 100644
--- a/slideshow/source/engine/transitions/slidechangebase.cxx
+++ b/slideshow/source/engine/transitions/slidechangebase.cxx
@@ -359,7 +359,7 @@ bool SlideChangeBase::operator()( double nValue )
void SlideChangeBase::prepareForRun(
const ViewEntry& /* rViewEntry */,
- const std::shared_ptr<cppcanvas::Canvas>& /* rDestinationCanvas */ )
+ const cppcanvas::CanvasSharedPtr& /* rDestinationCanvas */ )
{
}
diff --git a/slideshow/source/engine/transitions/slidechangebase.hxx b/slideshow/source/engine/transitions/slidechangebase.hxx
index 9db000fc1106..a0b8958360d9 100644
--- a/slideshow/source/engine/transitions/slidechangebase.hxx
+++ b/slideshow/source/engine/transitions/slidechangebase.hxx
@@ -119,8 +119,8 @@ protected:
::basegfx::B2ISize getEnteringSlideSizePixel( const UnoViewSharedPtr& pView ) const;
- static void renderBitmap( SlideBitmapSharedPtr const& pSlideBitmap,
- std::shared_ptr<cppcanvas::Canvas> const& pCanvas );
+ static void renderBitmap( SlideBitmapSharedPtr const& pSlideBitmap,
+ cppcanvas::CanvasSharedPtr const& pCanvas );
/** Called on derived classes to perform actions before first run.
@@ -146,10 +146,10 @@ protected:
Current parameter value
*/
virtual void performIn(
- const std::shared_ptr<cppcanvas::CustomSprite>& rSprite,
- const ViewEntry& rViewEntry,
- const std::shared_ptr<cppcanvas::Canvas>& rDestinationCanvas,
- double t );
+ const cppcanvas::CustomSpriteSharedPtr& rSprite,
+ const ViewEntry& rViewEntry,
+ const cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ double t );
/** Called on derived classes to implement actual slide change.
@@ -163,16 +163,16 @@ protected:
Current parameter value
*/
virtual void performOut(
- const std::shared_ptr<cppcanvas::CustomSprite>& rSprite,
- const ViewEntry& rViewEntry,
- const std::shared_ptr<cppcanvas::Canvas>& rDestinationCanvas,
- double t );
+ const cppcanvas::CustomSpriteSharedPtr& rSprite,
+ const ViewEntry& rViewEntry,
+ const cppcanvas::CanvasSharedPtr& rDestinationCanvas,
+ double t );
ScreenUpdater& getScreenUpdater() const { return mrScreenUpdater; }
private:
- std::shared_ptr<cppcanvas::CustomSprite> createSprite(
+ cppcanvas::CustomSpriteSharedPtr createSprite(
UnoViewSharedPtr const & pView,
::basegfx::B2DSize const & rSpriteSize,
double nPrio ) const;
diff --git a/slideshow/source/inc/animationnode.hxx b/slideshow/source/inc/animationnode.hxx
index f6a02dcf67ab..3eb5a7295668 100644
--- a/slideshow/source/inc/animationnode.hxx
+++ b/slideshow/source/inc/animationnode.hxx
@@ -24,9 +24,13 @@
#include <com/sun/star/animations/XAnimationNode.hpp>
#include <memory>
+
namespace slideshow {
namespace internal {
+class AnimationNode;
+typedef ::std::shared_ptr< AnimationNode > AnimationNodeSharedPtr;
+
/** This interface is used to mirror every XAnimateNode object
in the presentation core.
*/
@@ -123,14 +127,14 @@ public:
@param rNotifee AnimationNode to notify
*/
virtual bool registerDeactivatingListener(
- const ::std::shared_ptr< AnimationNode >& rNotifee ) = 0;
+ const AnimationNodeSharedPtr& rNotifee ) = 0;
/** Called to notify another AnimationNode's deactivation
@param rNotifier The instance who calls this method.
*/
virtual void notifyDeactivating(
- const ::std::shared_ptr< AnimationNode >& rNotifier ) = 0;
+ const AnimationNodeSharedPtr& rNotifier ) = 0;
/** Query node whether it has an animation pending.
@@ -141,8 +145,6 @@ public:
virtual bool hasPendingAnimation() const = 0;
};
-typedef ::std::shared_ptr< AnimationNode > AnimationNodeSharedPtr;
-
} // namespace internal
} // namespace presentation
diff --git a/slideshow/source/inc/basecontainernode.hxx b/slideshow/source/inc/basecontainernode.hxx
index a86f05f08186..8be89a27f01e 100644
--- a/slideshow/source/inc/basecontainernode.hxx
+++ b/slideshow/source/inc/basecontainernode.hxx
@@ -24,6 +24,10 @@
namespace slideshow {
namespace internal {
+class BaseContainerNode;
+typedef ::std::shared_ptr< BaseContainerNode > BaseContainerNodeSharedPtr;
+
+
/** This interface extends BaseNode with child handling methods.
Used for XAnimationNode objects which have children
*/
@@ -32,7 +36,7 @@ class BaseContainerNode : public BaseNode
public:
BaseContainerNode(
css::uno::Reference<css::animations::XAnimationNode> const& xNode,
- ::std::shared_ptr<BaseContainerNode> const& pParent,
+ BaseContainerNodeSharedPtr const& pParent,
NodeContext const& rContext );
/** Add given child node to this container
@@ -90,8 +94,6 @@ private:
const bool mbDurationIndefinite;
};
-typedef ::std::shared_ptr< BaseContainerNode > BaseContainerNodeSharedPtr;
-
} // namespace interface
} // namespace presentation
diff --git a/slideshow/source/inc/basenode.hxx b/slideshow/source/inc/basenode.hxx
index ff146a8b5a29..bbfc2f78a03c 100644
--- a/slideshow/source/inc/basenode.hxx
+++ b/slideshow/source/inc/basenode.hxx
@@ -68,6 +68,11 @@ struct NodeContext
};
class BaseContainerNode;
+typedef ::std::shared_ptr< BaseContainerNode > BaseContainerNodeSharedPtr;
+
+class BaseNode;
+typedef ::std::shared_ptr< BaseNode > BaseNodeSharedPtr;
+
/** This interface extends AnimationNode with some
file-private accessor methods.
@@ -77,7 +82,7 @@ class BaseNode : public AnimationNode,
{
public:
BaseNode( css::uno::Reference<css::animations::XAnimationNode> const& xNode,
- ::std::shared_ptr<BaseContainerNode> const& pParent,
+ BaseContainerNodeSharedPtr const& pParent,
NodeContext const& rContext );
BaseNode(const BaseNode&) = delete;
BaseNode& operator=(const BaseNode&) = delete;
@@ -89,7 +94,7 @@ public:
retrieve a shared_ptr to itself internally, have to
set that from the outside.
*/
- void setSelf( const ::std::shared_ptr< BaseNode >& rSelf );
+ void setSelf( const BaseNodeSharedPtr& rSelf );
#if defined(DBG_UTIL)
@@ -198,8 +203,6 @@ private:
const bool mbIsMainSequenceRootNode;
};
-typedef ::std::shared_ptr< BaseNode > BaseNodeSharedPtr;
-
} // namespace internal
} // namespace slideshow
diff --git a/slideshow/source/inc/eventmultiplexer.hxx b/slideshow/source/inc/eventmultiplexer.hxx
index 209184bc274a..ebf3c6703f29 100644
--- a/slideshow/source/inc/eventmultiplexer.hxx
+++ b/slideshow/source/inc/eventmultiplexer.hxx
@@ -586,7 +586,7 @@ public:
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
- bool notifyAnimationStart( const std::shared_ptr<AnimationNode>& rNode );
+ bool notifyAnimationStart( const AnimationNodeSharedPtr& rNode );
/** Notify that the given node leaves its active duration.
@@ -602,7 +602,7 @@ public:
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
- bool notifyAnimationEnd( const std::shared_ptr<AnimationNode>& rNode );
+ bool notifyAnimationEnd( const AnimationNodeSharedPtr& rNode );
/** Notify that the slide animations sequence leaves its
active duration.
@@ -627,7 +627,7 @@ public:
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
- bool notifyAudioStopped( const std::shared_ptr<AnimationNode>& rNode );
+ bool notifyAudioStopped( const AnimationNodeSharedPtr& rNode );
/** Notify that the show has entered or exited pause mode
@@ -648,7 +648,7 @@ public:
anybody. If false is returned, no handler processed
this event (and probably, nothing will happen at all)
*/
- bool notifyCommandStopAudio( const std::shared_ptr<AnimationNode>& rNode );
+ bool notifyCommandStopAudio( const AnimationNodeSharedPtr& rNode );
/** Notifies that a hyperlink has been clicked.
*/
diff --git a/slideshow/source/inc/hslcoloranimation.hxx b/slideshow/source/inc/hslcoloranimation.hxx
index 159c1255e47a..e20cbc8024f5 100644
--- a/slideshow/source/inc/hslcoloranimation.hxx
+++ b/slideshow/source/inc/hslcoloranimation.hxx
@@ -46,7 +46,7 @@ namespace slideshow
@param rColor
Current animation value.
*/
- virtual bool operator()( const ValueType& rColor ) = 0;
+ virtual bool operator()( const HSLColor& rColor ) = 0;
/** Request the underlying value for this animation.
@@ -58,7 +58,7 @@ namespace slideshow
for the underlying value, if the animation has actually
been started (via start() call).
*/
- virtual ValueType getUnderlyingValue() const = 0;
+ virtual HSLColor getUnderlyingValue() const = 0;
};
typedef ::std::shared_ptr< HSLColorAnimation > HSLColorAnimationSharedPtr;
diff --git a/slideshow/source/inc/numberanimation.hxx b/slideshow/source/inc/numberanimation.hxx
index 71a6bc39e2c8..ab9e9a3939dd 100644
--- a/slideshow/source/inc/numberanimation.hxx
+++ b/slideshow/source/inc/numberanimation.hxx
@@ -48,7 +48,7 @@ namespace slideshow
values will be clipped to the permissible range
internally.
*/
- virtual bool operator()( ValueType x ) = 0;
+ virtual bool operator()( double x ) = 0;
/** Request the underlying value for this animation.
@@ -60,7 +60,7 @@ namespace slideshow
for the underlying value, if the animation has actually
been started (via start() call).
*/
- virtual ValueType getUnderlyingValue() const = 0;
+ virtual double getUnderlyingValue() const = 0;
};
typedef ::std::shared_ptr< NumberAnimation > NumberAnimationSharedPtr;
diff --git a/slideshow/source/inc/pairanimation.hxx b/slideshow/source/inc/pairanimation.hxx
index ae28f9b44fcc..f8609a1469b3 100644
--- a/slideshow/source/inc/pairanimation.hxx
+++ b/slideshow/source/inc/pairanimation.hxx
@@ -47,7 +47,7 @@ namespace slideshow
@param rValue
Current animation value.
*/
- virtual bool operator()( const ValueType& rValue ) = 0;
+ virtual bool operator()( const ::basegfx::B2DTuple& rValue ) = 0;
/** Request the underlying value for this animation.
@@ -59,7 +59,7 @@ namespace slideshow
for the underlying value, if the animation has actually
been started (via start() call).
*/
- virtual ValueType getUnderlyingValue() const = 0;
+ virtual ::basegfx::B2DTuple getUnderlyingValue() const = 0;
};
typedef ::std::shared_ptr< PairAnimation > PairAnimationSharedPtr;
diff --git a/slideshow/source/inc/shape.hxx b/slideshow/source/inc/shape.hxx
index 648b2ef660b8..adb6683bba75 100644
--- a/slideshow/source/inc/shape.hxx
+++ b/slideshow/source/inc/shape.hxx
@@ -152,7 +152,7 @@ namespace slideshow
shape as-is from the document, assuming a rotation
angle of 0).
*/
- virtual ::basegfx::B2DRange getBounds() const = 0;
+ virtual ::basegfx::B2DRectangle getBounds() const = 0;
/** Get the DOM position and size of the shape.
@@ -165,7 +165,7 @@ namespace slideshow
currently take the shape as-is from the document,
assuming a rotation angle of 0).
*/
- virtual ::basegfx::B2DRange getDomBounds() const = 0;
+ virtual ::basegfx::B2DRectangle getDomBounds() const = 0;
/** Get the current shape update area.
@@ -175,7 +175,7 @@ namespace slideshow
the (possibly rotated and sheared) area returned by
getBounds().
*/
- virtual ::basegfx::B2DRange getUpdateArea() const = 0;
+ virtual ::basegfx::B2DRectangle getUpdateArea() const = 0;
/** Query whether the shape is visible at all.
@@ -251,8 +251,6 @@ namespace slideshow
};
};
- typedef ::std::shared_ptr< Shape > ShapeSharedPtr;
-
/** A set which contains all shapes in an ordered fashion.
*/
typedef ::std::set< ShapeSharedPtr, Shape::lessThanShape > ShapeSet;
diff --git a/slideshow/source/inc/shapemanager.hxx b/slideshow/source/inc/shapemanager.hxx
index c2c72e231f76..fee51cfb6afd 100644
--- a/slideshow/source/inc/shapemanager.hxx
+++ b/slideshow/source/inc/shapemanager.hxx
@@ -37,6 +37,9 @@ namespace slideshow
class HyperlinkArea;
class AnimatableShape;
class Shape;
+ typedef ::std::shared_ptr< AnimatableShape > AnimatableShapeSharedPtr;
+ typedef ::std::shared_ptr< Shape > ShapeSharedPtr;
+ typedef std::shared_ptr< HyperlinkArea > HyperlinkAreaSharedPtr;
/** ShapeManager interface
@@ -55,7 +58,7 @@ namespace slideshow
after a corresponding number of leaveAnimationMode()
calls.
*/
- virtual void enterAnimationMode( const std::shared_ptr<AnimatableShape>& rShape ) = 0;
+ virtual void enterAnimationMode( const AnimatableShapeSharedPtr& rShape ) = 0;
/** Notify the ShapeManager that the given Shape is no
longer animated.
@@ -66,7 +69,7 @@ namespace slideshow
to call this method more often than
enterAnimationMode().
*/
- virtual void leaveAnimationMode( const std::shared_ptr<AnimatableShape>& rShape ) = 0;
+ virtual void leaveAnimationMode( const AnimatableShapeSharedPtr& rShape ) = 0;
/** Notify that a shape needs an update
@@ -77,7 +80,7 @@ namespace slideshow
@param rShape
Shape which needs an update
*/
- virtual void notifyShapeUpdate( const std::shared_ptr<Shape>& rShape ) = 0;
+ virtual void notifyShapeUpdate( const ShapeSharedPtr& rShape ) = 0;
/** Lookup a Shape from an XShape model object
@@ -88,7 +91,7 @@ namespace slideshow
The XShape object, for which the representing Shape
should be looked up.
*/
- virtual std::shared_ptr<Shape> lookupShape(
+ virtual ShapeSharedPtr lookupShape(
css::uno::Reference< css::drawing::XShape > const & xShape ) const = 0;
/** Register given shape as a hyperlink target
@@ -98,7 +101,7 @@ namespace slideshow
hyperlink region lookup. Must be in absolute user
space coordinates.
*/
- virtual void addHyperlinkArea( const std::shared_ptr<HyperlinkArea>& rArea ) = 0;
+ virtual void addHyperlinkArea( const HyperlinkAreaSharedPtr& rArea ) = 0;
};
typedef ::std::shared_ptr< ShapeManager > ShapeManagerSharedPtr;
diff --git a/slideshow/source/inc/slide.hxx b/slideshow/source/inc/slide.hxx
index cce3edbeee4e..0f1e2dc205e9 100644
--- a/slideshow/source/inc/slide.hxx
+++ b/slideshow/source/inc/slide.hxx
@@ -97,7 +97,7 @@ namespace slideshow
This value is retrieved from the XDrawPage properties.
*/
- virtual basegfx::B2IVector getSlideSize() const = 0;
+ virtual basegfx::B2ISize getSlideSize() const = 0;
/// Gets the underlying API page
virtual css::uno::Reference< css::drawing::XDrawPage > getXDrawPage() const = 0;
diff --git a/slideshow/source/inc/slideshowcontext.hxx b/slideshow/source/inc/slideshowcontext.hxx
index dee43ba0a8b9..904b8965543e 100644
--- a/slideshow/source/inc/slideshowcontext.hxx
+++ b/slideshow/source/inc/slideshowcontext.hxx
@@ -43,6 +43,7 @@ namespace slideshow
class CursorManager;
class MediaFileManager;
class SubsettableShapeManager;
+ typedef ::std::shared_ptr< SubsettableShapeManager > SubsettableShapeManagerSharedPtr;
/** Common arguments for slideshow objects.
@@ -85,7 +86,7 @@ namespace slideshow
@param rComponentContext
To create UNO services from
*/
- SlideShowContext( std::shared_ptr<SubsettableShapeManager>& rSubsettableShapeManager,
+ SlideShowContext( SubsettableShapeManagerSharedPtr& rSubsettableShapeManager,
EventQueue& rEventQueue,
EventMultiplexer& rEventMultiplexer,
ScreenUpdater& rScreenUpdater,
diff --git a/slideshow/source/inc/subsettableshapemanager.hxx b/slideshow/source/inc/subsettableshapemanager.hxx
index 5f6c5f473cc0..f66639b6a1a6 100644
--- a/slideshow/source/inc/subsettableshapemanager.hxx
+++ b/slideshow/source/inc/subsettableshapemanager.hxx
@@ -32,6 +32,7 @@ namespace slideshow
{
class DocTreeNode;
class AttributableShape;
+ typedef ::std::shared_ptr< AttributableShape > AttributableShapeSharedPtr;
/** SubsettableShapeManager interface
@@ -62,9 +63,9 @@ namespace slideshow
@param rSubsetShape
The subset to display in the generated shape.
*/
- virtual std::shared_ptr<AttributableShape> getSubsetShape(
- const std::shared_ptr<AttributableShape>& rOrigShape,
- const DocTreeNode& rTreeNode ) = 0;
+ virtual AttributableShapeSharedPtr getSubsetShape(
+ const AttributableShapeSharedPtr& rOrigShape,
+ const DocTreeNode& rTreeNode ) = 0;
/** Revoke a previously queried subset shape.
@@ -80,8 +81,8 @@ namespace slideshow
The subset created from rOrigShape
*/
virtual void revokeSubset(
- const std::shared_ptr<AttributableShape>& rOrigShape,
- const std::shared_ptr<AttributableShape>& rSubsetShape ) = 0;
+ const AttributableShapeSharedPtr& rOrigShape,
+ const AttributableShapeSharedPtr& rSubsetShape ) = 0;
// Evil hackish way of getting intrinsic animation slide-wise
diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx
index 0a15008e797e..0392cf476998 100644
--- a/slideshow/source/inc/tools.hxx
+++ b/slideshow/source/inc/tools.hxx
@@ -52,6 +52,7 @@ namespace basegfx
class B2DVector;
class B2IVector;
class B2DHomMatrix;
+ typedef B2IVector B2ISize;
}
namespace cppcanvas{ class Canvas; }
@@ -65,8 +66,8 @@ namespace slideshow
class UnoView;
class Shape;
class ShapeAttributeLayer;
-
- typedef ::std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr;
+ typedef std::shared_ptr< UnoView > UnoViewSharedPtr;
+ typedef std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr;
template <typename T>
inline ::std::size_t hash_value( T const * p )
@@ -111,49 +112,49 @@ namespace slideshow
/// extract unary double value from Any
bool extractValue( double& o_rValue,
const css::uno::Any& rSourceAny,
- const std::shared_ptr<Shape>& rShape,
+ const ShapeSharedPtr& rShape,
const basegfx::B2DVector& rSlideBounds );
/// extract int from Any
bool extractValue( sal_Int32& o_rValue,
const css::uno::Any& rSourceAny,
- const std::shared_ptr<Shape>& rShape,
+ const ShapeSharedPtr& rShape,
const basegfx::B2DVector& rSlideBounds );
/// extract enum/constant group value from Any
bool extractValue( sal_Int16& o_rValue,
const css::uno::Any& rSourceAny,
- const std::shared_ptr<Shape>& rShape,
+ const ShapeSharedPtr& rShape,
const basegfx::B2DVector& rSlideBounds );
/// extract color value from Any
bool extractValue( RGBColor& o_rValue,
const css::uno::Any& rSourceAny,
- const std::shared_ptr<Shape>& rShape,
+ const ShapeSharedPtr& rShape,
const basegfx::B2DVector& rSlideBounds );
/// extract color value from Any
bool extractValue( HSLColor& o_rValue,
const css::uno::Any& rSourceAny,
- const std::shared_ptr<Shape>& rShape,
+ const ShapeSharedPtr& rShape,
const basegfx::B2DVector& rSlideBounds );
/// extract plain string from Any
bool extractValue( OUString& o_rValue,
const css::uno::Any& rSourceAny,
- const std::shared_ptr<Shape>& rShape,
+ const ShapeSharedPtr& rShape,
const basegfx::B2DVector& rSlideBounds );
/// extract bool value from Any
bool extractValue( bool& o_rValue,
const css::uno::Any& rSourceAny,
- const std::shared_ptr<Shape>& rShape,
+ const ShapeSharedPtr& rShape,
const basegfx::B2DVector& rSlideBounds );
/// extract double 2-tuple from Any
bool extractValue( basegfx::B2DTuple& o_rPair,
const css::uno::Any& rSourceAny,
- const std::shared_ptr<Shape>& rShape,
+ const ShapeSharedPtr& rShape,
const basegfx::B2DVector& rSlideBounds );
/** Search a sequence of NamedValues for a given element.
@@ -178,8 +179,8 @@ namespace slideshow
a simple scale and translate of the unit rect to rBounds).
*/
basegfx::B2DHomMatrix getShapeTransformation(
- const basegfx::B2DRange& rBounds,
- const std::shared_ptr<ShapeAttributeLayer>& pAttr );
+ const basegfx::B2DRectangle& rBounds,
+ const ShapeAttributeLayerSharedPtr& pAttr );
/** Get a shape's sprite transformation from the attribute set
@@ -197,9 +198,9 @@ namespace slideshow
@return the transformation to be applied to the sprite.
*/
basegfx::B2DHomMatrix getSpriteTransformation(
- const basegfx::B2DVector& rPixelSize,
- const basegfx::B2DVector& rOrigSize,
- const std::shared_ptr<ShapeAttributeLayer>& pAttr );
+ const basegfx::B2DVector& rPixelSize,
+ const basegfx::B2DVector& rOrigSize,
+ const ShapeAttributeLayerSharedPtr& pAttr );
/** Calc update area for a shape.
@@ -219,10 +220,10 @@ namespace slideshow
@param pAttr
Current shape attributes
*/
- basegfx::B2DRange getShapeUpdateArea(
- const basegfx::B2DRange& rUnitBounds,
- const basegfx::B2DHomMatrix& rShapeTransform,
- const std::shared_ptr<ShapeAttributeLayer>& pAttr );
+ basegfx::B2DRectangle getShapeUpdateArea(
+ const basegfx::B2DRectangle& rUnitBounds,
+ const basegfx::B2DHomMatrix& rShapeTransform,
+ const ShapeAttributeLayerSharedPtr& pAttr );
/** Calc update area for a shape.
@@ -253,9 +254,9 @@ namespace slideshow
it as if aBounds.getMinimum() is the output position and
aBounds.getRange() the scaling of the shape.
*/
- basegfx::B2DRange getShapePosSize(
- const basegfx::B2DRange& rOrigBounds,
- const std::shared_ptr<ShapeAttributeLayer>& pAttr );
+ basegfx::B2DRectangle getShapePosSize(
+ const basegfx::B2DRectangle& rOrigBounds,
+ const ShapeAttributeLayerSharedPtr& pAttr );
/** Convert a plain UNO API 32 bit int to RGBColor
*/
@@ -266,14 +267,14 @@ namespace slideshow
/** Fill a plain rectangle on the given canvas with the given color
*/
- void fillRect( const std::shared_ptr< cppcanvas::Canvas >& rCanvas,
- const basegfx::B2DRange& rRect,
- cppcanvas::IntSRGBA aFillColor );
+ void fillRect( const cppcanvas::CanvasSharedPtr& rCanvas,
+ const basegfx::B2DRectangle& rRect,
+ cppcanvas::IntSRGBA aFillColor );
/** Init canvas with default background (white)
*/
- void initSlideBackground( const std::shared_ptr< cppcanvas::Canvas >& rCanvas,
- const basegfx::B2IVector& rSize );
+ void initSlideBackground( const cppcanvas::CanvasSharedPtr& rCanvas,
+ const basegfx::B2ISize& rSize );
/// Gets a random ordinal [0,n)
inline ::std::size_t getRandomOrdinal( const ::std::size_t n )
@@ -339,7 +340,7 @@ namespace slideshow
}
/// Get the content of the BoundRect shape property
- basegfx::B2DRange getAPIShapeBounds( const css::uno::Reference< css::drawing::XShape >& xShape );
+ basegfx::B2DRectangle getAPIShapeBounds( const css::uno::Reference< css::drawing::XShape >& xShape );
/*
TODO(F1): When ZOrder someday becomes usable enable this
@@ -348,8 +349,8 @@ namespace slideshow
double getAPIShapePrio( const css::uno::Reference< css::drawing::XShape >& xShape );
*/
- basegfx::B2IVector getSlideSizePixel( const basegfx::B2DVector& rSize,
- const std::shared_ptr<UnoView>& pView );
+ basegfx::B2IVector getSlideSizePixel( const basegfx::B2DVector& rSize,
+ const UnoViewSharedPtr& pView );
}
// TODO(Q1): this could possibly be implemented with a somewhat
diff --git a/slideshow/source/inc/view.hxx b/slideshow/source/inc/view.hxx
index 1eaea033793a..4298fa1b273e 100644
--- a/slideshow/source/inc/view.hxx
+++ b/slideshow/source/inc/view.hxx
@@ -68,7 +68,7 @@ namespace slideshow
underlying view transformation, returned by the
getTransformation() method.
*/
- virtual void setViewSize( const ::basegfx::B2DVector& ) = 0;
+ virtual void setViewSize( const ::basegfx::B2DSize& ) = 0;
/** Change the view's mouse cursor.
diff --git a/slideshow/source/inc/viewlayer.hxx b/slideshow/source/inc/viewlayer.hxx
index 0b701d472b1e..a3a331a1666e 100644
--- a/slideshow/source/inc/viewlayer.hxx
+++ b/slideshow/source/inc/viewlayer.hxx
@@ -31,11 +31,14 @@ namespace basegfx
class B2DVector;
class B2DHomMatrix;
class B2DPolyPolygon;
+ typedef B2DVector B2DSize;
}
namespace cppcanvas
{
class Canvas;
class CustomSprite;
+ typedef std::shared_ptr< Canvas > CanvasSharedPtr;
+ typedef std::shared_ptr< ::cppcanvas::CustomSprite > CustomSpriteSharedPtr;
}
@@ -46,6 +49,7 @@ namespace slideshow
namespace internal
{
class View;
+ typedef std::shared_ptr< View > ViewSharedPtr;
class ViewLayer
{
@@ -57,14 +61,14 @@ namespace slideshow
@return true, if this layer displays on the given
view.
*/
- virtual bool isOnView(std::shared_ptr<View> const& rView) const = 0;
+ virtual bool isOnView(ViewSharedPtr const& rView) const = 0;
/** Get the associated canvas of this layer.
The canvas returned by this method must not change, as
long as this object is alive.
*/
- virtual std::shared_ptr< cppcanvas::Canvas > getCanvas() const = 0;
+ virtual cppcanvas::CanvasSharedPtr getCanvas() const = 0;
/** Clear the clipped view layer area
@@ -99,9 +103,9 @@ namespace slideshow
@return the sprite, or NULL on failure (or if this
canvas does not support sprites).
*/
- virtual std::shared_ptr< cppcanvas::CustomSprite >
- createSprite( const basegfx::B2DVector& rSpriteSizePixel,
- double nPriority ) const = 0;
+ virtual cppcanvas::CustomSpriteSharedPtr
+ createSprite( const basegfx::B2DSize& rSpriteSizePixel,
+ double nPriority ) const = 0;
/** Set the layer priority range