From 0de868cd0f430efc6256926c2865530818d7b7dd Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Wed, 13 Apr 2016 10:07:19 +0200 Subject: tdf#94306 replace boost::noncopyable in sfx2 to sot Replace with C++11 delete copy-constructur and copy-assignment. Remove boost/noncopyable.hpp includes. Add missing default ctors. Make some overloaded ctors explicit, seems cppcheck doesn't flag: T(const template& rx). Change-Id: I63c5a3ac84a33ea6d49868e2d9aa281ada79958e Reviewed-on: https://gerrit.libreoffice.org/24050 Tested-by: Jenkins Reviewed-by: Michael Stahl --- .../source/engine/OGLTrans/generic/OGLTrans_Operation.hxx | 6 +++--- .../engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx | 11 +++++++---- .../engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx | 6 +++--- slideshow/source/engine/animationnodes/basenode.cxx | 6 ++++-- slideshow/source/engine/animationnodes/basenode.hxx | 6 +++--- slideshow/source/engine/pointersymbol.hxx | 4 +--- slideshow/source/engine/rehearsetimingsactivity.hxx | 6 +++--- slideshow/source/engine/shapes/drawinglayeranimation.cxx | 13 ++++++++----- slideshow/source/engine/shapes/drawshapesubsetting.hxx | 10 +++++++--- slideshow/source/engine/shapes/externalshapebase.cxx | 8 +++----- .../source/engine/shapes/intrinsicanimationactivity.cxx | 11 ++++++----- slideshow/source/engine/shapes/viewappletshape.hxx | 8 ++++++-- slideshow/source/engine/shapes/viewbackgroundshape.hxx | 7 +++++-- slideshow/source/engine/shapes/viewmediashape.hxx | 8 ++++++-- slideshow/source/engine/shapes/viewshape.hxx | 9 ++++++--- slideshow/source/engine/slide/layer.hxx | 12 +++++++----- slideshow/source/engine/slide/layermanager.hxx | 10 +++++++--- slideshow/source/engine/slide/shapemanagerimpl.hxx | 10 +++++++--- slideshow/source/engine/slide/userpaintoverlay.cxx | 1 - slideshow/source/engine/slide/userpaintoverlay.hxx | 5 +++-- slideshow/source/engine/slideview.cxx | 8 ++++---- slideshow/source/engine/transitions/slidechangebase.hxx | 7 ++++--- slideshow/source/engine/waitsymbol.hxx | 7 ++++--- slideshow/source/inc/activitiesfactory.hxx | 1 - slideshow/source/inc/activitiesqueue.hxx | 7 ++++--- slideshow/source/inc/animatedsprite.hxx | 5 +++-- slideshow/source/inc/delayevent.hxx | 6 +++--- slideshow/source/inc/eventmultiplexer.hxx | 5 +++-- slideshow/source/inc/eventqueue.hxx | 6 ++++-- slideshow/source/inc/screenupdater.hxx | 5 +++-- slideshow/source/inc/shape.hxx | 6 ++++-- slideshow/source/inc/shapeattributelayerholder.hxx | 7 ++++--- slideshow/source/inc/slidebitmap.hxx | 7 ++++--- slideshow/source/inc/smilfunctionparser.hxx | 12 +++++------- slideshow/source/inc/unoviewcontainer.hxx | 6 +++--- slideshow/source/inc/usereventqueue.hxx | 6 +++--- slideshow/source/inc/wakeupevent.hxx | 7 +++---- 37 files changed, 153 insertions(+), 112 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_Operation.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_Operation.hxx index ad03f236e621..edc8a51fc199 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_Operation.hxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_Operation.hxx @@ -31,16 +31,16 @@ #include #include -#include - #include /** This class is to be derived to make any operation (transform) you may need in order to construct your transitions */ -class Operation : private boost::noncopyable +class Operation { public: virtual ~Operation(){} + Operation(const Operation&) = delete; + Operation& operator=(const Operation&) = delete; protected: /** Should this operation be interpolated . If TRUE, the transform will smoothly move from making no difference from t = 0.0 to mnT0 to being completely transformed from t = mnT1 to 1. If FALSE, the transform will be ineffectual from t = 0 to mnT0, and completely transformed from t = mnT0 to 1. diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx index 449a72fc81f5..bf2f1c1e84d2 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx @@ -31,8 +31,6 @@ #include #include -#include - #include #include @@ -133,11 +131,14 @@ private: It holds Primitives and Operations on those primitives. */ -class OGLTransitionImpl : private boost::noncopyable +class OGLTransitionImpl { public: virtual ~OGLTransitionImpl(); + OGLTransitionImpl(const OGLTransitionImpl&) = delete; + OGLTransitionImpl& operator=(const OGLTransitionImpl&) = delete; + /** Prepare transition. */ bool prepare( sal_Int32 glLeavingSlideTex, sal_Int32 glEnteringSlideTex ); @@ -273,11 +274,13 @@ std::shared_ptr makeDiamond(); std::shared_ptr makeFadeSmoothly(); std::shared_ptr makeFadeThroughBlack(); -class SceneObject : private boost::noncopyable +class SceneObject { public: SceneObject(); virtual ~SceneObject(); + SceneObject(const SceneObject&) = delete; + SceneObject& operator=(const SceneObject&) = delete; virtual void prepare(GLuint /* program */) {} virtual void display(GLint sceneTransformLocation, GLint primitiveTransformLocation, double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight ) const; diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx index 17e501af4118..c864f87d6d8f 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx @@ -65,8 +65,6 @@ #include #include -#include - #include "OGLTrans_TransitionImpl.hxx" #if defined( UNX ) && !defined( MACOSX ) @@ -171,10 +169,12 @@ int oglErrorHandler( Display* /*dpy*/, XErrorEvent* /*evnt*/ ) * slideshow. This class is implicitly * constructed from XTransitionFactory. */ -class OGLTransitionerImpl : private cppu::BaseMutex, private boost::noncopyable, public OGLTransitionerImplBase +class OGLTransitionerImpl : private cppu::BaseMutex, public OGLTransitionerImplBase { public: OGLTransitionerImpl(); + OGLTransitionerImpl(const OGLTransitionerImpl&) = delete; + OGLTransitionerImpl& operator=(const OGLTransitionerImpl&) = delete; bool setTransition( std::shared_ptr pOGLTransition ); bool initialize( const Reference< presentation::XSlideShowView >& xView, const Reference< rendering::XBitmap >& xLeavingSlide, diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx index fd6c750f37fe..f8881f45f735 100644 --- a/slideshow/source/engine/animationnodes/basenode.cxx +++ b/slideshow/source/engine/animationnodes/basenode.cxx @@ -37,7 +37,6 @@ #include #include #include -#include using namespace ::com::sun::star; @@ -259,7 +258,7 @@ bool isMainSequenceRootNode_( /** state transition handling */ -class BaseNode::StateTransition : private boost::noncopyable +class BaseNode::StateTransition { public: enum Options { NONE, FORCE }; @@ -271,6 +270,9 @@ public: clear(); } + StateTransition(const StateTransition&) = delete; + StateTransition& operator=(const StateTransition&) = delete; + bool enter( NodeState eToState, int options = NONE ) { OSL_ENSURE( meToState == INVALID, diff --git a/slideshow/source/engine/animationnodes/basenode.hxx b/slideshow/source/engine/animationnodes/basenode.hxx index 77862c53e40b..f91ee217983d 100644 --- a/slideshow/source/engine/animationnodes/basenode.hxx +++ b/slideshow/source/engine/animationnodes/basenode.hxx @@ -27,7 +27,6 @@ #include "slideshowcontext.hxx" #include "shapesubset.hxx" -#include #include namespace slideshow { @@ -74,13 +73,14 @@ class BaseContainerNode; file-private accessor methods. */ class BaseNode : public AnimationNode, - public ::osl::DebugBase, - private ::boost::noncopyable + public ::osl::DebugBase { public: BaseNode( css::uno::Reference const& xNode, ::std::shared_ptr const& pParent, NodeContext const& rContext ); + BaseNode(const BaseNode&) = delete; + BaseNode& operator=(const BaseNode&) = delete; /** Provide the node with a shared_ptr to itself. diff --git a/slideshow/source/engine/pointersymbol.hxx b/slideshow/source/engine/pointersymbol.hxx index 9bae614a6c81..a9f78500a79d 100644 --- a/slideshow/source/engine/pointersymbol.hxx +++ b/slideshow/source/engine/pointersymbol.hxx @@ -21,7 +21,6 @@ #include "eventmultiplexer.hxx" #include "unoview.hxx" -#include #include using namespace com::sun::star; @@ -33,8 +32,7 @@ class EventMultiplexer; typedef std::shared_ptr PointerSymbolSharedPtr; /// On-screen 'laser pointer' from the Impress remote control -class PointerSymbol : public ViewEventHandler, - private ::boost::noncopyable +class PointerSymbol : public ViewEventHandler { public: static PointerSymbolSharedPtr create( const css::uno::Reference& xBitmap, diff --git a/slideshow/source/engine/rehearsetimingsactivity.hxx b/slideshow/source/engine/rehearsetimingsactivity.hxx index b800f750fcb9..802e53953bd3 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.hxx +++ b/slideshow/source/engine/rehearsetimingsactivity.hxx @@ -23,7 +23,6 @@ #include "activity.hxx" #include -#include #include #include @@ -45,8 +44,7 @@ struct SlideShowContext; class EventMultiplexer; class ScreenUpdater; class RehearseTimingsActivity : public Activity, - public ViewEventHandler, - private ::boost::noncopyable + public ViewEventHandler { public: /** Creates the activity. @@ -55,6 +53,8 @@ public: const SlideShowContext& rContext ); virtual ~RehearseTimingsActivity(); + RehearseTimingsActivity(const RehearseTimingsActivity&) = delete; + RehearseTimingsActivity& operator=(const RehearseTimingsActivity&) = delete; /** Starts and shows the timer; adds to activity queue. */ diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index 08b53cef34ca..4b1f03be49b8 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -53,7 +53,6 @@ #include "intrinsicanimationactivity.hxx" #include "intrinsicanimationeventhandler.hxx" -#include #include #include @@ -129,8 +128,7 @@ double ScrollTextAnimNode::GetStateAtRelativeTime( } } -class ActivityImpl : public Activity, - private boost::noncopyable +class ActivityImpl : public Activity { public: virtual ~ActivityImpl(); @@ -140,6 +138,9 @@ public: std::shared_ptr const& pWakeupEvent, std::shared_ptr const& pDrawShape ); + ActivityImpl(const ActivityImpl&) = delete; + ActivityImpl& operator=(const ActivityImpl&) = delete; + bool enableAnimations(); // Disposable: @@ -241,14 +242,16 @@ private: }; -class IntrinsicAnimationListener : public IntrinsicAnimationEventHandler, - private boost::noncopyable +class IntrinsicAnimationListener : public IntrinsicAnimationEventHandler { public: explicit IntrinsicAnimationListener( ActivityImpl& rActivity ) : mrActivity( rActivity ) {} + IntrinsicAnimationListener(const IntrinsicAnimationListener&) = delete; + IntrinsicAnimationListener& operator=(const IntrinsicAnimationListener&) = delete; + private: virtual bool enableAnimations() override { return mrActivity.enableAnimations(); } diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.hxx b/slideshow/source/engine/shapes/drawshapesubsetting.hxx index 71457e38036c..48dca8e47490 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.hxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_DRAWSHAPESUBSETTING_HXX #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_DRAWSHAPESUBSETTING_HXX -#include - #include "doctreenode.hxx" #include "attributableshape.hxx" @@ -35,7 +33,7 @@ namespace slideshow /** This class encapsulates the subsetting aspects of a DrawShape. */ - class DrawShapeSubsetting : private boost::noncopyable + class DrawShapeSubsetting { public: /** Create empty shape subset handling. @@ -63,6 +61,12 @@ namespace slideshow DrawShapeSubsetting( const DocTreeNode& rShapeSubset, const ::std::shared_ptr< GDIMetaFile >& rMtf ); + /// Forbid copy copstruction + DrawShapeSubsetting(const DrawShapeSubsetting&) = delete; + + /// Forbid copy assignment + DrawShapeSubsetting& operator=(const DrawShapeSubsetting&) = delete; + /** Reset metafile. Use this method to completely reset the diff --git a/slideshow/source/engine/shapes/externalshapebase.cxx b/slideshow/source/engine/shapes/externalshapebase.cxx index d181ab816991..40c0d99b2df0 100644 --- a/slideshow/source/engine/shapes/externalshapebase.cxx +++ b/slideshow/source/engine/shapes/externalshapebase.cxx @@ -30,8 +30,6 @@ #include "intrinsicanimationeventhandler.hxx" #include "tools.hxx" -#include - using namespace ::com::sun::star; @@ -41,14 +39,14 @@ namespace slideshow namespace internal { class ExternalShapeBase::ExternalShapeBaseListener : public ViewEventHandler, - public IntrinsicAnimationEventHandler, - private boost::noncopyable + public IntrinsicAnimationEventHandler { public: explicit ExternalShapeBaseListener( ExternalShapeBase& rBase ) : mrBase( rBase ) {} - + ExternalShapeBaseListener(const ExternalShapeBaseListener&) = delete; + ExternalShapeBaseListener& operator=(const ExternalShapeBaseListener&) = delete; private: // ViewEventHandler diff --git a/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx b/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx index dfefa44bad4f..ba1d4817d6a8 100644 --- a/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx +++ b/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx @@ -27,7 +27,6 @@ #include "intrinsicanimationactivity.hxx" #include "intrinsicanimationeventhandler.hxx" -#include #include namespace slideshow @@ -41,8 +40,7 @@ namespace slideshow animations directly within a shape, e.g. drawing layer animations, or GIF animations. */ - class IntrinsicAnimationActivity : public Activity, - private boost::noncopyable + class IntrinsicAnimationActivity : public Activity { public: /** Create an IntrinsicAnimationActivity. @@ -69,6 +67,8 @@ namespace slideshow const ::std::vector& rTimeouts, ::std::size_t nNumLoops, CycleMode eCycleMode ); + IntrinsicAnimationActivity(const IntrinsicAnimationActivity&) = delete; + IntrinsicAnimationActivity& operator=(const IntrinsicAnimationActivity&) = delete; virtual void dispose() override; virtual double calcTimeLag() const override; @@ -93,13 +93,14 @@ namespace slideshow }; - class IntrinsicAnimationListener : public IntrinsicAnimationEventHandler, - private boost::noncopyable + class IntrinsicAnimationListener : public IntrinsicAnimationEventHandler { public: explicit IntrinsicAnimationListener( IntrinsicAnimationActivity& rActivity ) : mrActivity( rActivity ) {} + IntrinsicAnimationListener(const IntrinsicAnimationListener&) = delete; + IntrinsicAnimationListener& operator=(const IntrinsicAnimationListener&) = delete; private: diff --git a/slideshow/source/engine/shapes/viewappletshape.hxx b/slideshow/source/engine/shapes/viewappletshape.hxx index 5a3ccc0e29bb..dfef6abe72ae 100644 --- a/slideshow/source/engine/shapes/viewappletshape.hxx +++ b/slideshow/source/engine/shapes/viewappletshape.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include "viewlayer.hxx" @@ -50,7 +49,7 @@ namespace slideshow The class is able to render the associated applet on View implementations. */ - class ViewAppletShape : private boost::noncopyable + class ViewAppletShape { public: /** Create a ViewAppletShape for the given View @@ -83,6 +82,11 @@ namespace slideshow */ virtual ~ViewAppletShape(); + /// Forbid copy construction + ViewAppletShape(const ViewAppletShape&) = delete; + /// Forbid copy assignment + ViewAppletShape& operator=(const ViewAppletShape&) = delete; + /** Query the associated view layer of this shape */ ViewLayerSharedPtr getViewLayer() const; diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.hxx b/slideshow/source/engine/shapes/viewbackgroundshape.hxx index e2a57e201ee1..1985b82e1d99 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.hxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.hxx @@ -28,7 +28,6 @@ #include #include -#include #include "gdimtftools.hxx" #include "viewlayer.hxx" @@ -44,7 +43,7 @@ namespace slideshow The class is able to render the associated background on View implementations. */ - class ViewBackgroundShape : private boost::noncopyable + class ViewBackgroundShape { public: /** Create a ViewBackgroundShape for the given View @@ -58,6 +57,10 @@ namespace slideshow */ ViewBackgroundShape( const ViewLayerSharedPtr& rViewLayer, const ::basegfx::B2DRectangle& rShapeBounds ); + /// Forbid copy construction + ViewBackgroundShape(const ViewBackgroundShape&) = delete; + /// Forbid copy assignment + ViewBackgroundShape& operator=(const ViewBackgroundShape&) = delete; /** Query the associated view layer of this shape */ diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx index 1b60a77d3d0e..e935f0ab559b 100644 --- a/slideshow/source/engine/shapes/viewmediashape.hxx +++ b/slideshow/source/engine/shapes/viewmediashape.hxx @@ -24,7 +24,6 @@ #include #include -#include #include #include "viewlayer.hxx" @@ -56,7 +55,7 @@ namespace slideshow The class is able to render the associated media shape on View implementations. */ - class ViewMediaShape : private boost::noncopyable + class ViewMediaShape { public: /** Create a ViewMediaShape for the given View @@ -72,6 +71,11 @@ namespace slideshow */ virtual ~ViewMediaShape(); + /// Forbid copy construction + ViewMediaShape(const ViewMediaShape&) = delete; + /// Forbid copy assignment + ViewMediaShape& operator=(const ViewMediaShape&) = delete; + /** Query the associated view layer of this shape */ ViewLayerSharedPtr getViewLayer() const; diff --git a/slideshow/source/engine/shapes/viewshape.hxx b/slideshow/source/engine/shapes/viewshape.hxx index ccefbdabe32f..88b3f7a3b0cd 100644 --- a/slideshow/source/engine/shapes/viewshape.hxx +++ b/slideshow/source/engine/shapes/viewshape.hxx @@ -26,8 +26,6 @@ #include #include -#include - #include "tools.hxx" #include "shapeattributelayer.hxx" #include "animatedsprite.hxx" @@ -48,7 +46,7 @@ namespace slideshow The class is able to render the associated XShape on View implementations. */ - class ViewShape : private boost::noncopyable + class ViewShape { public: /** Create a ViewShape for the given View @@ -58,6 +56,11 @@ namespace slideshow */ explicit ViewShape( const ViewLayerSharedPtr& rViewLayer ); + ///Forbid copy construction + ViewShape(const ViewShape&) = delete; + /// Forbid copy assignment + ViewShape& operator=(const ViewShape&) = delete; + /** Query the associated view layer of this shape */ ViewLayerSharedPtr getViewLayer() const; diff --git a/slideshow/source/engine/slide/layer.hxx b/slideshow/source/engine/slide/layer.hxx index 3dc6a881802e..645c249c2011 100644 --- a/slideshow/source/engine/slide/layer.hxx +++ b/slideshow/source/engine/slide/layer.hxx @@ -26,8 +26,6 @@ #include "view.hxx" #include "animatableshape.hxx" -#include - #include #include @@ -58,12 +56,16 @@ namespace slideshow be called from the LayerManager. Normally, it shouldn't be possible to get hold of an instance of this class at all. */ - class Layer : public std::enable_shared_from_this, - private boost::noncopyable + class Layer : public std::enable_shared_from_this { public: typedef std::shared_ptr EndUpdater; + /// Forbid copy construction + Layer(const Layer&) = delete; + /// Forbid copy assignment + Layer& operator=(const Layer&) = delete; + /** Create background layer This method will create a layer without a ViewLayer, @@ -213,7 +215,7 @@ namespace slideshow Dummy parameter, to disambiguate from normal layer constructor */ - Layer( Dummy eFlag ); + explicit Layer( Dummy eFlag ); /** Create non-background layer diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx index f15c5fe835a6..61ccedeb73c3 100644 --- a/slideshow/source/engine/slide/layermanager.hxx +++ b/slideshow/source/engine/slide/layermanager.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_SLIDE_LAYERMANAGER_HXX #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SLIDE_LAYERMANAGER_HXX -#include - #include #include "unoview.hxx" @@ -59,7 +57,7 @@ namespace slideshow @see Layer @see Shape */ - class LayerManager : private boost::noncopyable + class LayerManager { public: /** Create a new layer manager for the given page bounds @@ -79,6 +77,12 @@ namespace slideshow const ::basegfx::B2DRange& rPageBounds, bool bDisableAnimationZOrder ); + /// Forbid copy construction + LayerManager(const LayerManager&) = delete; + + /// Forbid copy assignment + LayerManager& operator=(const LayerManager&) = delete; + /** Activate the LayerManager This method activates the LayerManager. Prior to diff --git a/slideshow/source/engine/slide/shapemanagerimpl.hxx b/slideshow/source/engine/slide/shapemanagerimpl.hxx index 63dc1c79254e..9d8cd5170ecc 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.hxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.hxx @@ -35,7 +35,6 @@ #include "shapelistenereventhandler.hxx" #include "mouseeventhandler.hxx" -#include #include #include #include @@ -53,8 +52,7 @@ class ShapeManagerImpl : public SubsettableShapeManager, public ShapeListenerEventHandler, public MouseEventHandler, public ViewUpdate, - public std::enable_shared_from_this, - private boost::noncopyable + public std::enable_shared_from_this { public: /** Create a shape event broadcaster @@ -69,6 +67,12 @@ public: const ShapeEventListenerMap& rGlobalListenersMap, const ShapeCursorMap& rGlobalCursorMap ); + /// Forbid copy construction + ShapeManagerImpl(const ShapeManagerImpl&) = delete; + + /// Forbid copy assignment + ShapeManagerImpl& operator=(const ShapeManagerImpl&) = delete; + /** Enables event listening. The initial slide content on the background layer diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx index 1e3aab9443ea..1a3ad4de8c99 100644 --- a/slideshow/source/engine/slide/userpaintoverlay.cxx +++ b/slideshow/source/engine/slide/userpaintoverlay.cxx @@ -36,7 +36,6 @@ #include "screenupdater.hxx" #include "vieweventhandler.hxx" -#include #include "slide.hxx" #include "cursormanager.hxx" diff --git a/slideshow/source/engine/slide/userpaintoverlay.hxx b/slideshow/source/engine/slide/userpaintoverlay.hxx index 8c57ba222b84..eb37554defd0 100644 --- a/slideshow/source/engine/slide/userpaintoverlay.hxx +++ b/slideshow/source/engine/slide/userpaintoverlay.hxx @@ -25,7 +25,6 @@ #include "unoview.hxx" #include "rgbcolor.hxx" -#include #include #include @@ -47,7 +46,7 @@ namespace slideshow listening for mouse clicks and moves. When the mouse is dragged, a hand sketching in the selected color is shown. */ - class UserPaintOverlay : private boost::noncopyable + class UserPaintOverlay { public: /** Create a UserPaintOverlay @@ -64,6 +63,8 @@ namespace slideshow const PolyPolygonVector& rPolygons, bool bActive); ~UserPaintOverlay(); + UserPaintOverlay(const UserPaintOverlay&) = delete; + UserPaintOverlay& operator=(const UserPaintOverlay&) = delete; PolyPolygonVector getPolygons(); void drawPolygons(); diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 053dfea69519..bc6fee9cd88f 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -51,8 +51,6 @@ #include -#include - #include #include #include @@ -377,8 +375,7 @@ public: the layer priority changes, the sprites change z order together with their parent. */ -class SlideViewLayer : public ViewLayer, - private boost::noncopyable +class SlideViewLayer : public ViewLayer { /// Smart container for all sprites issued by this layer mutable LayerSpriteContainer maSpriteContainer; @@ -442,6 +439,9 @@ public: { } + SlideViewLayer(const SlideViewLayer&) = delete; + SlideViewLayer& operator=(const SlideViewLayer&) = delete; + void updateView( const basegfx::B2DHomMatrix& rMatrix, const basegfx::B2DSize& rUserSize ) { diff --git a/slideshow/source/engine/transitions/slidechangebase.hxx b/slideshow/source/engine/transitions/slidechangebase.hxx index 192e9590bb75..fbb3d6d8d7b0 100644 --- a/slideshow/source/engine/transitions/slidechangebase.hxx +++ b/slideshow/source/engine/transitions/slidechangebase.hxx @@ -30,7 +30,6 @@ #include "soundplayer.hxx" #include -#include #include namespace cppcanvas @@ -49,10 +48,12 @@ namespace internal { implement the perform() method. */ class SlideChangeBase : public ViewEventHandler, - public NumberAnimation, - private ::boost::noncopyable + public NumberAnimation { public: + SlideChangeBase(const SlideChangeBase&) = delete; + SlideChangeBase& operator=(const SlideChangeBase&) = delete; + // NumberAnimation virtual bool operator()( double x ) override; virtual double getUnderlyingValue() const override; diff --git a/slideshow/source/engine/waitsymbol.hxx b/slideshow/source/engine/waitsymbol.hxx index 7c58c6146b23..8da60e66def2 100644 --- a/slideshow/source/engine/waitsymbol.hxx +++ b/slideshow/source/engine/waitsymbol.hxx @@ -29,7 +29,6 @@ #include "unoview.hxx" #include -#include #include namespace slideshow { @@ -39,10 +38,12 @@ class EventMultiplexer; typedef std::shared_ptr WaitSymbolSharedPtr; /// On-screen 'hour glass' for when slideshow is unresponsive -class WaitSymbol : public ViewEventHandler, - private ::boost::noncopyable +class WaitSymbol : public ViewEventHandler { public: + WaitSymbol(const WaitSymbol&) = delete; + WaitSymbol& operator=(const WaitSymbol&) = delete; + static WaitSymbolSharedPtr create( const css::uno::Reference& xBitmap, ScreenUpdater& rScreenUpdater, EventMultiplexer& rEventMultiplexer, diff --git a/slideshow/source/inc/activitiesfactory.hxx b/slideshow/source/inc/activitiesfactory.hxx index 57c8541d25b5..fb122f8c4881 100644 --- a/slideshow/source/inc/activitiesfactory.hxx +++ b/slideshow/source/inc/activitiesfactory.hxx @@ -37,7 +37,6 @@ #include "pairanimation.hxx" #include -#include /* Definition of ActivitiesFactory class */ diff --git a/slideshow/source/inc/activitiesqueue.hxx b/slideshow/source/inc/activitiesqueue.hxx index 2b03b9ff47ed..5dd2f8eeba97 100644 --- a/slideshow/source/inc/activitiesqueue.hxx +++ b/slideshow/source/inc/activitiesqueue.hxx @@ -28,7 +28,6 @@ #include #include -#include /* Definition of ActivitiesQueue class */ @@ -42,7 +41,7 @@ namespace slideshow activity objects to this class, which are called in a round-robin fashion. */ - class ActivitiesQueue : private ::boost::noncopyable + class ActivitiesQueue { public: /** Create an ActivitiesQueue. @@ -51,9 +50,11 @@ namespace slideshow Pointer to global presentation timer. Used for adjusting and holding global presentation time. */ - ActivitiesQueue( + explicit ActivitiesQueue( const std::shared_ptr< ::canvas::tools::ElapsedTime >& pPresTimer ); ~ActivitiesQueue(); + ActivitiesQueue(const ActivitiesQueue&) = delete; + ActivitiesQueue& operator=(const ActivitiesQueue&) = delete; /** Add the given activity to the queue. */ diff --git a/slideshow/source/inc/animatedsprite.hxx b/slideshow/source/inc/animatedsprite.hxx index a5980dab1787..8a49f831b3cc 100644 --- a/slideshow/source/inc/animatedsprite.hxx +++ b/slideshow/source/inc/animatedsprite.hxx @@ -31,7 +31,6 @@ #include #include -#include /* Definition of AnimatedSprite class */ @@ -47,7 +46,7 @@ namespace slideshow and all the gory details of offset calculations and rounding prevention. */ - class AnimatedSprite : private boost::noncopyable + class AnimatedSprite { public: /** Create a new AnimatedSprite, for the given metafile @@ -68,6 +67,8 @@ namespace slideshow AnimatedSprite( const ViewLayerSharedPtr& rViewLayer, const ::basegfx::B2DSize& rSpriteSizePixel, double nSpritePrio ); + AnimatedSprite(const AnimatedSprite&) = delete; + AnimatedSprite& operator=(const AnimatedSprite&) = delete; /** Resize the sprite. diff --git a/slideshow/source/inc/delayevent.hxx b/slideshow/source/inc/delayevent.hxx index fd43d2991ea7..1389b806885e 100644 --- a/slideshow/source/inc/delayevent.hxx +++ b/slideshow/source/inc/delayevent.hxx @@ -21,8 +21,6 @@ #include "event.hxx" -#include - #include namespace slideshow { @@ -30,7 +28,7 @@ namespace internal { /** Event, which delays the functor call the given amount of time */ -class Delay : public Event, private ::boost::noncopyable +class Delay : public Event { public: typedef ::std::function FunctorT; @@ -49,6 +47,8 @@ public: mnTimeout(nTimeout), maFunc(func), mbWasFired(false) {} + Delay(const Delay&) = delete; + Delay& operator=(const Delay&) = delete; // Event: virtual bool fire() override; diff --git a/slideshow/source/inc/eventmultiplexer.hxx b/slideshow/source/inc/eventmultiplexer.hxx index e39c79ec6c1b..b1a4a0054523 100644 --- a/slideshow/source/inc/eventmultiplexer.hxx +++ b/slideshow/source/inc/eventmultiplexer.hxx @@ -26,7 +26,6 @@ #include "shapelistenereventhandler.hxx" #include "vieweventhandler.hxx" -#include #include #include @@ -133,7 +132,7 @@ typedef ::std::shared_ptr< UserPaintEventHandler > UserPaintEventHandlerSharedPt after the user action occurred, but only after the given timeout. Which is actually a feature. */ -class EventMultiplexer : private ::boost::noncopyable +class EventMultiplexer { public: /** Create an event multiplexer @@ -158,6 +157,8 @@ public: EventMultiplexer( EventQueue& rEventQueue, UnoViewContainer const& rViewContainer ); ~EventMultiplexer(); + EventMultiplexer(const EventMultiplexer&) = delete; + EventMultiplexer& operator=(const EventMultiplexer&) = delete; // Management methods diff --git a/slideshow/source/inc/eventqueue.hxx b/slideshow/source/inc/eventqueue.hxx index c67e5d70d958..613135b0d1c0 100644 --- a/slideshow/source/inc/eventqueue.hxx +++ b/slideshow/source/inc/eventqueue.hxx @@ -25,7 +25,6 @@ #include "event.hxx" -#include #include #include #include @@ -40,7 +39,7 @@ namespace slideshow /** This class handles events in a presentation. Events are time instants where e.g. effects start. */ - class EventQueue : private ::boost::noncopyable + class EventQueue { public: EventQueue( @@ -49,6 +48,9 @@ namespace slideshow ~EventQueue(); + EventQueue(const EventQueue&) = delete; + EventQueue& operator=(const EventQueue&) = delete; + /** Add the given event to the queue. The event is fired at, or shortly after, its Event::getActivationTime instant. */ diff --git a/slideshow/source/inc/screenupdater.hxx b/slideshow/source/inc/screenupdater.hxx index e975f3a0b0ac..4140ed4af725 100644 --- a/slideshow/source/inc/screenupdater.hxx +++ b/slideshow/source/inc/screenupdater.hxx @@ -22,7 +22,6 @@ #include "viewupdate.hxx" #include "unoviewcontainer.hxx" -#include #include /* Definition of ScreenUpdater class */ @@ -42,11 +41,13 @@ namespace slideshow objects report any pending update, commitUpdates() does nothing. */ - class ScreenUpdater : private boost::noncopyable + class ScreenUpdater { public: explicit ScreenUpdater( UnoViewContainer const& rViewContainer ); ~ScreenUpdater(); + ScreenUpdater(const ScreenUpdater&) = delete; + ScreenUpdater& operator=(const ScreenUpdater&) = delete; /** Notify screen update diff --git a/slideshow/source/inc/shape.hxx b/slideshow/source/inc/shape.hxx index 59bbd99b71d3..d3cf3b817331 100644 --- a/slideshow/source/inc/shape.hxx +++ b/slideshow/source/inc/shape.hxx @@ -28,7 +28,6 @@ #include "viewlayer.hxx" -#include #include #include #include @@ -52,10 +51,13 @@ namespace slideshow slide's shape, providing bound rect, underlying XShape and basic paint methods. */ - class Shape : private boost::noncopyable + class Shape { public: + Shape() = default; virtual ~Shape() {} + Shape(const Shape&) = delete; + Shape& operator=(const Shape&) = delete; /** Get the associated XShape of this shape. diff --git a/slideshow/source/inc/shapeattributelayerholder.hxx b/slideshow/source/inc/shapeattributelayerholder.hxx index ef187ba2c044..12044e58eb29 100644 --- a/slideshow/source/inc/shapeattributelayerholder.hxx +++ b/slideshow/source/inc/shapeattributelayerholder.hxx @@ -23,8 +23,6 @@ #include "attributableshape.hxx" #include "shapeattributelayer.hxx" -#include - namespace slideshow { namespace internal @@ -39,7 +37,7 @@ namespace slideshow process that is required for shape and attribute layer interaction). */ - class ShapeAttributeLayerHolder : private boost::noncopyable + class ShapeAttributeLayerHolder { public: /** Create a ShapeAttributeLayerHolder instance. @@ -60,6 +58,9 @@ namespace slideshow // correctly deregistered from the shape. } + ShapeAttributeLayerHolder(const ShapeAttributeLayerHolder&) = delete; + ShapeAttributeLayerHolder& operator=(const ShapeAttributeLayerHolder&) = delete; + void reset() { if( mpShape && mpAttributeLayer ) diff --git a/slideshow/source/inc/slidebitmap.hxx b/slideshow/source/inc/slidebitmap.hxx index 6d3d0b974b50..d0e169213760 100644 --- a/slideshow/source/inc/slidebitmap.hxx +++ b/slideshow/source/inc/slidebitmap.hxx @@ -28,7 +28,6 @@ #include #include -#include namespace com { namespace sun { namespace star { namespace rendering { @@ -57,10 +56,12 @@ namespace slideshow Slide::getFinalSlideBitmap must also be adapted (they no longer need a Canvas ptr, which is actually a hack now). */ - class SlideBitmap : private boost::noncopyable + class SlideBitmap { public: - SlideBitmap( const ::cppcanvas::BitmapSharedPtr& rBitmap ); + explicit SlideBitmap( const ::cppcanvas::BitmapSharedPtr& rBitmap ); + SlideBitmap(const SlideBitmap&) = delete; + SlideBitmap& operator=(const SlideBitmap&) = delete; bool draw( const ::cppcanvas::CanvasSharedPtr& rCanvas ) const; ::basegfx::B2ISize getSize() const; diff --git a/slideshow/source/inc/smilfunctionparser.hxx b/slideshow/source/inc/smilfunctionparser.hxx index 5a2147dd6d9e..42a07be7941c 100644 --- a/slideshow/source/inc/smilfunctionparser.hxx +++ b/slideshow/source/inc/smilfunctionparser.hxx @@ -25,8 +25,6 @@ #include -#include - /* Definition of SmilFunctionParser class */ @@ -34,9 +32,13 @@ namespace slideshow { namespace internal { - class SmilFunctionParser : private boost::noncopyable + class SmilFunctionParser { public: + SmilFunctionParser() = delete; + SmilFunctionParser(const SmilFunctionParser&) = delete; + SmilFunctionParser& operator=(const SmilFunctionParser&) = delete; + /** Parse a string containing a SMIL value. This method parses a string representing @@ -144,10 +146,6 @@ namespace slideshow static ExpressionNodeSharedPtr parseSmilFunction( const OUString& rSmilFunction, const ::basegfx::B2DRectangle& rRelativeShapeBounds ); // throw ParseError - private: - // disabled constructor/destructor, since this is - // supposed to be a singleton - SmilFunctionParser(); }; } } diff --git a/slideshow/source/inc/unoviewcontainer.hxx b/slideshow/source/inc/unoviewcontainer.hxx index c1f013e41e2c..9d47c8f890db 100644 --- a/slideshow/source/inc/unoviewcontainer.hxx +++ b/slideshow/source/inc/unoviewcontainer.hxx @@ -22,8 +22,6 @@ #include -#include - #include #include @@ -43,10 +41,12 @@ namespace slideshow { /** Contains UnoViews */ - class UnoViewContainer : private boost::noncopyable + class UnoViewContainer { public: UnoViewContainer(); + UnoViewContainer(const UnoViewContainer&) = delete; + UnoViewContainer& operator=(const UnoViewContainer&) = delete; /** Add a view to this container diff --git a/slideshow/source/inc/usereventqueue.hxx b/slideshow/source/inc/usereventqueue.hxx index 25225266dcd1..d110b7bd59ce 100644 --- a/slideshow/source/inc/usereventqueue.hxx +++ b/slideshow/source/inc/usereventqueue.hxx @@ -26,8 +26,6 @@ #include "eventqueue.hxx" #include "shape.hxx" -#include - /* Definition of UserEventQueue class */ namespace slideshow { @@ -57,7 +55,7 @@ class MouseLeaveHandler; this object are fired and then all references to them are removed. */ -class UserEventQueue : private ::boost::noncopyable +class UserEventQueue { public: /** Create a user event queue @@ -82,6 +80,8 @@ public: EventQueue& rEventQueue, CursorManager& rCursorManager ); ~UserEventQueue(); + UserEventQueue(const UserEventQueue&) = delete; + UserEventQueue& operator=(const UserEventQueue&) = delete; /** Clear all registered events. diff --git a/slideshow/source/inc/wakeupevent.hxx b/slideshow/source/inc/wakeupevent.hxx index 441579cd5c3e..6992be9e761d 100644 --- a/slideshow/source/inc/wakeupevent.hxx +++ b/slideshow/source/inc/wakeupevent.hxx @@ -24,8 +24,6 @@ #include "event.hxx" #include "activitiesqueue.hxx" -#include - namespace slideshow { namespace internal { @@ -36,13 +34,14 @@ namespace internal { the EventQueue, to avoid busy-waiting for the next discrete time instant. */ -class WakeupEvent : public Event, - private ::boost::noncopyable +class WakeupEvent : public Event { public: WakeupEvent( std::shared_ptr< ::canvas::tools::ElapsedTime > const& pTimeBase, ActivitiesQueue & rActivityQueue ); + WakeupEvent(const WakeupEvent&) = delete; + WakeupEvent& operator=(const WakeupEvent&) = delete; virtual void dispose() override; virtual bool fire() override; -- cgit v1.2.3