diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-02-01 18:53:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-24 09:37:56 +0200 |
commit | f29c0b2b3e8861909fa2c6c37bf631ab01590541 (patch) | |
tree | 079aa9796ede8518a6b290f1184f25ac171173c0 /slideshow/source/engine | |
parent | 1b6a84a5a24e7e02c6066ca0fcb5a0011d2decd6 (diff) |
boost::shared_ptr->std::shared_ptr in slideshow
Change-Id: I27da6bc550488ea65ccdf1d26f8178f803f495d6
Diffstat (limited to 'slideshow/source/engine')
62 files changed, 156 insertions, 313 deletions
diff --git a/slideshow/source/engine/activities/activitiesfactory.cxx b/slideshow/source/engine/activities/activitiesfactory.cxx index fe3f01837a34..c3e026b85986 100644 --- a/slideshow/source/engine/activities/activitiesfactory.cxx +++ b/slideshow/source/engine/activities/activitiesfactory.cxx @@ -35,8 +35,8 @@ #include "continuouskeytimeactivitybase.hxx" #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <cmath> #include <vector> #include <algorithm> @@ -145,7 +145,7 @@ public: const OptionalValueType& rTo, const OptionalValueType& rBy, const ActivityParameters& rParms, - const ::boost::shared_ptr< AnimationType >& rAnim, + const ::std::shared_ptr< AnimationType >& rAnim, const Interpolator< ValueType >& rInterpolator, bool bCumulative ) : BaseType( rParms ), @@ -361,7 +361,7 @@ private: mutable ValueType maStartInterpolationValue; mutable sal_uInt32 mnIteration; - ::boost::shared_ptr< AnimationType > mpAnim; + ::std::shared_ptr< AnimationType > mpAnim; Interpolator< ValueType > maInterpolator; bool mbDynamicStartValue; bool mbCumulative; @@ -382,7 +382,7 @@ AnimationActivitySharedPtr createFromToByActivity( const uno::Any& rToAny, const uno::Any& rByAny, const ActivityParameters& rParms, - const ::boost::shared_ptr< AnimationType >& rAnim, + const ::std::shared_ptr< AnimationType >& rAnim, const Interpolator< typename AnimationType::ValueType >& rInterpolator, bool bCumulative, const ShapeSharedPtr& rShape, @@ -509,7 +509,7 @@ public: ValuesActivity( const ValueVectorType& rValues, const ActivityParameters& rParms, - const boost::shared_ptr<AnimationType>& rAnim, + const std::shared_ptr<AnimationType>& rAnim, const Interpolator< ValueType >& rInterpolator, bool bCumulative ) : BaseType( rParms ), @@ -591,7 +591,7 @@ private: ExpressionNodeSharedPtr mpFormula; - boost::shared_ptr<AnimationType> mpAnim; + std::shared_ptr<AnimationType> mpAnim; Interpolator< ValueType > maInterpolator; bool mbCumulative; }; @@ -608,7 +608,7 @@ template<class BaseType, typename AnimationType> AnimationActivitySharedPtr createValueListActivity( const uno::Sequence<uno::Any>& rValues, const ActivityParameters& rParms, - const boost::shared_ptr<AnimationType>& rAnim, + const std::shared_ptr<AnimationType>& rAnim, const Interpolator<typename AnimationType::ValueType>& rInterpolator, bool bCumulative, const ShapeSharedPtr& rShape, @@ -663,7 +663,7 @@ template<typename AnimationType> AnimationActivitySharedPtr createActivity( const ActivitiesFactory::CommonParameters& rParms, const uno::Reference< animations::XAnimate >& xNode, - const ::boost::shared_ptr< AnimationType >& rAnim, + const ::std::shared_ptr< AnimationType >& rAnim, const Interpolator< typename AnimationType::ValueType >& rInterpolator = Interpolator< typename AnimationType::ValueType >() ) { diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx index 8ef5f60e3ed5..5f035957e98c 100644 --- a/slideshow/source/engine/animationfactory.cxx +++ b/slideshow/source/engine/animationfactory.cxx @@ -591,7 +591,7 @@ namespace slideshow Type of animation to generate (determines the interface GenericAnimation will implement). */ - template< typename AnimationBase > ::boost::shared_ptr< AnimationBase > + template< typename AnimationBase > ::std::shared_ptr< AnimationBase > makeGenericAnimation( const ShapeManagerSharedPtr& rShapeManager, int nFlags, bool (ShapeAttributeLayer::*pIsValid)() const, @@ -599,7 +599,7 @@ namespace slideshow typename AnimationBase::ValueType (ShapeAttributeLayer::*pGetValue)() const, void (ShapeAttributeLayer::*pSetValue)( const typename AnimationBase::ValueType& ) ) { - return ::boost::shared_ptr< AnimationBase >( + return ::std::shared_ptr< AnimationBase >( new GenericAnimation< AnimationBase, SGI_identity< typename AnimationBase::ValueType > >( rShapeManager, diff --git a/slideshow/source/engine/animationnodes/animationaudionode.cxx b/slideshow/source/engine/animationnodes/animationaudionode.cxx index a5f9e4100713..13959bc2c4c7 100644 --- a/slideshow/source/engine/animationnodes/animationaudionode.cxx +++ b/slideshow/source/engine/animationnodes/animationaudionode.cxx @@ -59,7 +59,7 @@ void AnimationAudioNode::activate_st() createPlayer(); AnimationEventHandlerSharedPtr aHandler( - boost::dynamic_pointer_cast<AnimationEventHandler>( getSelf() ) ); + std::dynamic_pointer_cast<AnimationEventHandler>( getSelf() ) ); OSL_ENSURE( aHandler, "could not cast self to AnimationEventHandler?" ); getContext().mrEventMultiplexer.addCommandStopAudioHandler( aHandler ); @@ -100,9 +100,9 @@ void AnimationAudioNode::activate_st() struct NotifyAudioStopped { EventMultiplexer & m_rEventMultiplexer; - ::boost::shared_ptr<BaseNode> m_pSelf; + ::std::shared_ptr<BaseNode> m_pSelf; NotifyAudioStopped(EventMultiplexer & rEventMultiplexer, - ::boost::shared_ptr<BaseNode> const& pSelf) + ::std::shared_ptr<BaseNode> const& pSelf) : m_rEventMultiplexer(rEventMultiplexer), m_pSelf(pSelf) { } void operator()() @@ -114,7 +114,7 @@ struct NotifyAudioStopped void AnimationAudioNode::deactivate_st( NodeState /*eDestState*/ ) { AnimationEventHandlerSharedPtr aHandler( - boost::dynamic_pointer_cast<AnimationEventHandler>( getSelf() ) ); + std::dynamic_pointer_cast<AnimationEventHandler>( getSelf() ) ); OSL_ENSURE( aHandler, "could not cas self to AnimationEventHandler?" ); getContext().mrEventMultiplexer.removeCommandStopAudioHandler( aHandler ); diff --git a/slideshow/source/engine/animationnodes/animationaudionode.hxx b/slideshow/source/engine/animationnodes/animationaudionode.hxx index e56b3bcd6212..75bb75f4b316 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, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ); protected: diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx index 9d28fb39dae5..fbd9bb8e13e8 100644 --- a/slideshow/source/engine/animationnodes/animationbasenode.cxx +++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx @@ -432,7 +432,7 @@ AnimationBaseNode::fillCommonParameters() const double nAcceleration = 0.0; double nDeceleration = 0.0; BaseNodeSharedPtr const pSelf( getSelf() ); - for ( boost::shared_ptr<BaseNode> pNode( pSelf ); + for ( std::shared_ptr<BaseNode> pNode( pSelf ); pNode; pNode = pNode->getParentNode() ) { uno::Reference<animations::XAnimationNode> const xAnimationNode( diff --git a/slideshow/source/engine/animationnodes/animationbasenode.hxx b/slideshow/source/engine/animationnodes/animationbasenode.hxx index 8470b8827d9e..474680c7193f 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, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ); #if defined(DBG_UTIL) diff --git a/slideshow/source/engine/animationnodes/animationcolornode.hxx b/slideshow/source/engine/animationnodes/animationcolornode.hxx index 4f5002d2c5e3..fe0366f9f09e 100644 --- a/slideshow/source/engine/animationnodes/animationcolornode.hxx +++ b/slideshow/source/engine/animationnodes/animationcolornode.hxx @@ -31,7 +31,7 @@ class AnimationColorNode : public AnimationBaseNode public: AnimationColorNode( css::uno::Reference<css::animations::XAnimationNode> const& xNode, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ) : AnimationBaseNode( xNode, pParent, rContext ), mxColorNode( xNode, css::uno::UNO_QUERY_THROW ) {} diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx index 0ccc94fc7f68..9ad60892d15f 100644 --- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx +++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx @@ -36,7 +36,7 @@ namespace internal { namespace EffectCommands = css::presentation::EffectCommands; AnimationCommandNode::AnimationCommandNode( uno::Reference<animations::XAnimationNode> const& xNode, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ) : BaseNode( xNode, pParent, rContext ), mpShape(), @@ -45,7 +45,7 @@ AnimationCommandNode::AnimationCommandNode( uno::Reference<animations::XAnimatio uno::Reference< drawing::XShape > xShape( mxCommandNode->getTarget(), uno::UNO_QUERY ); ShapeSharedPtr pShape( getContext().mpSubsettableShapeManager->lookupShape( xShape ) ); - mpShape = ::boost::dynamic_pointer_cast< IExternalMediaShapeBase >( pShape ); + mpShape = ::std::dynamic_pointer_cast< IExternalMediaShapeBase >( pShape ); } void AnimationCommandNode::dispose() diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.hxx b/slideshow/source/engine/animationnodes/animationcommandnode.hxx index d252e23edce9..932524a3abb8 100644 --- a/slideshow/source/engine/animationnodes/animationcommandnode.hxx +++ b/slideshow/source/engine/animationnodes/animationcommandnode.hxx @@ -38,7 +38,7 @@ class AnimationCommandNode : public BaseNode public: AnimationCommandNode( css::uno::Reference<css::animations::XAnimationNode> const& xNode, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ); protected: diff --git a/slideshow/source/engine/animationnodes/animationnodefactory.cxx b/slideshow/source/engine/animationnodes/animationnodefactory.cxx index d20e44c26ce5..0e6140cf722b 100644 --- a/slideshow/source/engine/animationnodes/animationnodefactory.cxx +++ b/slideshow/source/engine/animationnodes/animationnodefactory.cxx @@ -50,7 +50,7 @@ #include "nodetools.hxx" #include "tools.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> using namespace ::com::sun::star; @@ -592,7 +592,7 @@ AnimationNodeSharedPtr AnimationNodeFactory::createAnimationNode( void AnimationNodeFactory::showTree( AnimationNodeSharedPtr& pRootNode ) { if( pRootNode ) - DEBUG_NODES_SHOWTREE( boost::dynamic_pointer_cast<BaseContainerNode>( + DEBUG_NODES_SHOWTREE( std::dynamic_pointer_cast<BaseContainerNode>( pRootNode).get() ); } #endif diff --git a/slideshow/source/engine/animationnodes/animationsetnode.cxx b/slideshow/source/engine/animationnodes/animationsetnode.cxx index c2f37e3aa5b7..0e19b7fb8778 100644 --- a/slideshow/source/engine/animationnodes/animationsetnode.cxx +++ b/slideshow/source/engine/animationnodes/animationsetnode.cxx @@ -56,8 +56,8 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const // AnimationBaseNode::fillCommonParameters() has set up // immediate deactivation as default when activity ends, but if (! isIndefiniteTiming( xAnimateNode->getDuration() )) { - boost::shared_ptr<AnimationSetNode> const pSelf( - boost::dynamic_pointer_cast<AnimationSetNode>(getSelf()) ); + std::shared_ptr<AnimationSetNode> const pSelf( + std::dynamic_pointer_cast<AnimationSetNode>(getSelf()) ); ENSURE_OR_THROW( pSelf, "cannot cast getSelf() to my type!" ); aParms.mpEndEvent = makeEvent( diff --git a/slideshow/source/engine/animationnodes/animationsetnode.hxx b/slideshow/source/engine/animationnodes/animationsetnode.hxx index aa48843e4819..ee63b42d9132 100644 --- a/slideshow/source/engine/animationnodes/animationsetnode.hxx +++ b/slideshow/source/engine/animationnodes/animationsetnode.hxx @@ -29,7 +29,7 @@ class AnimationSetNode : public AnimationBaseNode public: AnimationSetNode( css::uno::Reference<css::animations::XAnimationNode> const& xNode, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ) : AnimationBaseNode( xNode, pParent, rContext ) {} diff --git a/slideshow/source/engine/animationnodes/animationtransformnode.hxx b/slideshow/source/engine/animationnodes/animationtransformnode.hxx index 852eeb015aea..604a9b89840a 100644 --- a/slideshow/source/engine/animationnodes/animationtransformnode.hxx +++ b/slideshow/source/engine/animationnodes/animationtransformnode.hxx @@ -31,7 +31,7 @@ class AnimationTransformNode : public AnimationBaseNode public: AnimationTransformNode( css::uno::Reference<css::animations::XAnimationNode> const& xNode, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ) : AnimationBaseNode( xNode, pParent, rContext ), mxTransformNode( xNode, css::uno::UNO_QUERY_THROW ) {} diff --git a/slideshow/source/engine/animationnodes/animationtransitionfilternode.hxx b/slideshow/source/engine/animationnodes/animationtransitionfilternode.hxx index 38ea94d21d62..8718426188f4 100644 --- a/slideshow/source/engine/animationnodes/animationtransitionfilternode.hxx +++ b/slideshow/source/engine/animationnodes/animationtransitionfilternode.hxx @@ -31,7 +31,7 @@ class AnimationTransitionFilterNode : public AnimationBaseNode public: AnimationTransitionFilterNode( css::uno::Reference<css::animations::XAnimationNode> const& xNode, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ) : AnimationBaseNode( xNode, pParent, rContext ), mxTransitionFilterNode( xNode, css::uno::UNO_QUERY_THROW) diff --git a/slideshow/source/engine/animationnodes/basecontainernode.cxx b/slideshow/source/engine/animationnodes/basecontainernode.cxx index 17769f727a13..595334661380 100644 --- a/slideshow/source/engine/animationnodes/basecontainernode.cxx +++ b/slideshow/source/engine/animationnodes/basecontainernode.cxx @@ -177,7 +177,7 @@ void BaseContainerNode::showState() const for( std::size_t i=0; i<maChildren.size(); ++i ) { BaseNodeSharedPtr pNode = - boost::dynamic_pointer_cast<BaseNode>(maChildren[i]); + std::dynamic_pointer_cast<BaseNode>(maChildren[i]); SAL_INFO("slideshow.verbose", "Node connection: n" << debugGetNodeName(this) << diff --git a/slideshow/source/engine/animationnodes/basecontainernode.hxx b/slideshow/source/engine/animationnodes/basecontainernode.hxx index 7fb308c44ab8..06e67a1a39eb 100644 --- a/slideshow/source/engine/animationnodes/basecontainernode.hxx +++ b/slideshow/source/engine/animationnodes/basecontainernode.hxx @@ -32,7 +32,7 @@ class BaseContainerNode : public BaseNode public: BaseContainerNode( css::uno::Reference<css::animations::XAnimationNode> const& xNode, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ); /** Add given child node to this container @@ -91,7 +91,7 @@ private: const bool mbDurationIndefinite; }; -typedef ::boost::shared_ptr< BaseContainerNode > BaseContainerNodeSharedPtr; +typedef ::std::shared_ptr< BaseContainerNode > BaseContainerNodeSharedPtr; } // namespace interface } // namespace presentation diff --git a/slideshow/source/engine/animationnodes/basenode.hxx b/slideshow/source/engine/animationnodes/basenode.hxx index 0d244832d508..77862c53e40b 100644 --- a/slideshow/source/engine/animationnodes/basenode.hxx +++ b/slideshow/source/engine/animationnodes/basenode.hxx @@ -79,7 +79,7 @@ class BaseNode : public AnimationNode, { public: BaseNode( css::uno::Reference<css::animations::XAnimationNode> const& xNode, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ); /** Provide the node with a shared_ptr to itself. @@ -89,7 +89,7 @@ public: retrieve a shared_ptr to itself internally, have to set that from the outside. */ - void setSelf( const ::boost::shared_ptr< BaseNode >& rSelf ); + void setSelf( const ::std::shared_ptr< BaseNode >& rSelf ); #if defined(DBG_UTIL) @@ -97,7 +97,7 @@ public: virtual const char* getDescription() const; #endif - const ::boost::shared_ptr< BaseContainerNode >& getParentNode() const + const ::std::shared_ptr< BaseContainerNode >& getParentNode() const { return mpParent; } // Disposable: @@ -123,7 +123,7 @@ protected: EventSharedPtr() ); SlideShowContext const& getContext() const { return maContext; } - ::boost::shared_ptr<BaseNode> const& getSelf() const { return mpSelf; } + ::std::shared_ptr<BaseNode> const& getSelf() const { return mpSelf; } bool checkValidNode() const { ENSURE_OR_THROW( mpSelf, "no self ptr set!" ); @@ -191,8 +191,8 @@ private: ListenerVector maDeactivatingListeners; css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode; - ::boost::shared_ptr< BaseContainerNode > mpParent; - ::boost::shared_ptr< BaseNode > mpSelf; + ::std::shared_ptr< BaseContainerNode > mpParent; + ::std::shared_ptr< BaseNode > mpSelf; const int* mpStateTransitionTable; const double mnStartDelay; NodeState meCurrState; @@ -201,7 +201,7 @@ private: const bool mbIsMainSequenceRootNode; }; -typedef ::boost::shared_ptr< BaseNode > BaseNodeSharedPtr; +typedef ::std::shared_ptr< BaseNode > BaseNodeSharedPtr; } // namespace internal } // namespace slideshow diff --git a/slideshow/source/engine/animationnodes/nodetools.cxx b/slideshow/source/engine/animationnodes/nodetools.cxx index e38445bd10ea..e69acef0b905 100644 --- a/slideshow/source/engine/animationnodes/nodetools.cxx +++ b/slideshow/source/engine/animationnodes/nodetools.cxx @@ -63,7 +63,7 @@ namespace slideshow "lookupAttributableShape(): no shape found for given XShape" ); AttributableShapeSharedPtr pRes( - ::boost::dynamic_pointer_cast< AttributableShape >( pShape ) ); + ::std::dynamic_pointer_cast< AttributableShape >( pShape ) ); // TODO(E3): Cannot throw here, people might set animation info // for non-animatable shapes from the API. AnimationNodes must catch diff --git a/slideshow/source/engine/animationnodes/propertyanimationnode.hxx b/slideshow/source/engine/animationnodes/propertyanimationnode.hxx index 654cf85daa8a..037fea61e97e 100644 --- a/slideshow/source/engine/animationnodes/propertyanimationnode.hxx +++ b/slideshow/source/engine/animationnodes/propertyanimationnode.hxx @@ -29,7 +29,7 @@ class PropertyAnimationNode : public AnimationBaseNode public: PropertyAnimationNode( css::uno::Reference<css::animations::XAnimationNode> const& xNode, - ::boost::shared_ptr<BaseContainerNode> const& pParent, + ::std::shared_ptr<BaseContainerNode> const& pParent, NodeContext const& rContext ) : AnimationBaseNode( xNode, pParent, rContext ) {} diff --git a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx index 56dcf0c89814..68bda1a56999 100644 --- a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx +++ b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx @@ -95,7 +95,7 @@ bool SequentialTimeContainer::resolveChild( // event that will deactivate the resolved/running child: mpCurrentSkipEvent = makeEvent( std::bind( &SequentialTimeContainer::skipEffect, - boost::dynamic_pointer_cast<SequentialTimeContainer>( getSelf() ), + std::dynamic_pointer_cast<SequentialTimeContainer>( getSelf() ), pChildNode ), "SequentialTimeContainer::skipEffect, resolveChild"); diff --git a/slideshow/source/engine/animationnodes/setactivity.hxx b/slideshow/source/engine/animationnodes/setactivity.hxx index 5ed09433d5bd..166932f74e05 100644 --- a/slideshow/source/engine/animationnodes/setactivity.hxx +++ b/slideshow/source/engine/animationnodes/setactivity.hxx @@ -42,7 +42,7 @@ template <class AnimationT> class SetActivity : public AnimationActivity { public: - typedef ::boost::shared_ptr< AnimationT > AnimationSharedPtrT; + typedef ::std::shared_ptr< AnimationT > AnimationSharedPtrT; typedef typename AnimationT::ValueType ValueT; SetActivity( const ActivitiesFactory::CommonParameters& rParms, @@ -131,7 +131,7 @@ private: template <class AnimationT> AnimationActivitySharedPtr makeSetActivity( const ActivitiesFactory::CommonParameters& rParms, - const ::boost::shared_ptr< AnimationT >& rAnimation, + const ::std::shared_ptr< AnimationT >& rAnimation, const typename AnimationT::ValueType& rToValue ) { return AnimationActivitySharedPtr( diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 9ac9898508b8..dca1a1ee524e 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -30,8 +30,6 @@ #include <com/sun/star/animations/EventTrigger.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> -#include <boost/enable_shared_from_this.hpp> - using ::com::sun::star::uno::Reference; using namespace ::com::sun::star; @@ -157,7 +155,7 @@ void EffectRewinder::setRootAnimationNode ( bool EffectRewinder::rewind ( - const ::boost::shared_ptr<ScreenUpdater::UpdateLock>& rpPaintLock, + const ::std::shared_ptr<ScreenUpdater::UpdateLock>& rpPaintLock, const ::std::function<void ()>& rSlideRewindFunctor, const ::std::function<void ()>& rPreviousSlideFunctor) { @@ -298,7 +296,7 @@ bool EffectRewinder::notifyAnimationStart (const AnimationNodeSharedPtr& rpNode) { // This notification is only relevant for us when the rpNode belongs to // the main sequence. - BaseNodeSharedPtr pBaseNode (::boost::dynamic_pointer_cast<BaseNode>(rpNode)); + BaseNodeSharedPtr pBaseNode (::std::dynamic_pointer_cast<BaseNode>(rpNode)); if ( ! pBaseNode) return false; diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx index fff6fabf2096..bae92523d71c 100644 --- a/slideshow/source/engine/effectrewinder.hxx +++ b/slideshow/source/engine/effectrewinder.hxx @@ -90,7 +90,7 @@ public: is called then the other functor is not called. */ bool rewind ( - const ::boost::shared_ptr<ScreenUpdater::UpdateLock>& rpPaintLock, + const ::std::shared_ptr<ScreenUpdater::UpdateLock>& rpPaintLock, const ::std::function<void ()>& rSlideRewindFunctor, const ::std::function<void ()>& rPreviousSlideFunctor); @@ -119,7 +119,7 @@ private: EventSharedPtr mpAsynchronousRewindEvent; css::uno::Reference<css::animations::XAnimationNode> mxCurrentAnimationRootNode; - ::boost::shared_ptr<ScreenUpdater::UpdateLock> mpPaintLock; + ::std::shared_ptr<ScreenUpdater::UpdateLock> mpPaintLock; bool mbNonUserTriggeredMainSequenceEffectSeen; diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index 1001d76a8230..b71e71c71e16 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -42,22 +42,22 @@ #include "unoview.hxx" #include "unoviewcontainer.hxx" -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> #include <boost/mem_fn.hpp> +#include <memory> #include <algorithm> #include <vector> using namespace ::com::sun::star; -namespace boost + +namespace std { - // add operator== for weak_ptr + // add operator== for weak_ptr, so we can use std::find over lists of them template<typename T> bool operator==( weak_ptr<T> const& rLHS, weak_ptr<T> const& rRHS ) { - return !(rLHS<rRHS) && !(rRHS<rLHS); + return rLHS.lock().get() == rRHS.lock().get(); } } @@ -67,7 +67,7 @@ namespace internal { template <typename HandlerT> class PrioritizedHandlerEntry { - typedef boost::shared_ptr<HandlerT> HandlerSharedPtrT; + typedef std::shared_ptr<HandlerT> HandlerSharedPtrT; HandlerSharedPtrT mpHandler; double mnPrio; @@ -297,7 +297,7 @@ struct EventMultiplexerImpl setAutomaticMode(true) call is then able to regenerate the event. */ - ::boost::weak_ptr< Event > mpTickEvent; + ::std::weak_ptr< Event > mpTickEvent; bool mbIsAutoMode; }; diff --git a/slideshow/source/engine/pointersymbol.hxx b/slideshow/source/engine/pointersymbol.hxx index 4d5381e9ff7a..9bae614a6c81 100644 --- a/slideshow/source/engine/pointersymbol.hxx +++ b/slideshow/source/engine/pointersymbol.hxx @@ -21,7 +21,6 @@ #include "eventmultiplexer.hxx" #include "unoview.hxx" -#include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> #include <vector> @@ -31,7 +30,7 @@ namespace slideshow { namespace internal { class EventMultiplexer; -typedef boost::shared_ptr<class PointerSymbol> PointerSymbolSharedPtr; +typedef std::shared_ptr<class PointerSymbol> PointerSymbolSharedPtr; /// On-screen 'laser pointer' from the Impress remote control class PointerSymbol : public ViewEventHandler, diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx index d5c134250cc0..f09baac95353 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.cxx +++ b/slideshow/source/engine/rehearsetimingsactivity.cxx @@ -103,7 +103,7 @@ public: private: ::canvas::tools::ElapsedTime maTimer; double mnNextTime; - boost::weak_ptr<Activity> mpActivity; + std::weak_ptr<Activity> mpActivity; ActivitiesQueue& mrActivityQueue; }; @@ -188,10 +188,10 @@ RehearseTimingsActivity::~RehearseTimingsActivity() } } -boost::shared_ptr<RehearseTimingsActivity> RehearseTimingsActivity::create( +std::shared_ptr<RehearseTimingsActivity> RehearseTimingsActivity::create( const SlideShowContext& rContext ) { - boost::shared_ptr<RehearseTimingsActivity> pActivity( + std::shared_ptr<RehearseTimingsActivity> pActivity( new RehearseTimingsActivity( rContext )); pActivity->mpMouseHandler.reset( @@ -217,7 +217,7 @@ void RehearseTimingsActivity::start() for_each_sprite( []( const ::cppcanvas::CustomSpriteSharedPtr& pSprite ) { return pSprite->show(); } ); - mrActivitiesQueue.addActivity( shared_from_this() ); + mrActivitiesQueue.addActivity( std::shared_ptr<Activity>((Activity*)this) ); mpMouseHandler->reset(); mrEventMultiplexer.addClickHandler( diff --git a/slideshow/source/engine/rehearsetimingsactivity.hxx b/slideshow/source/engine/rehearsetimingsactivity.hxx index 40850a51b5aa..b800f750fcb9 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.hxx +++ b/slideshow/source/engine/rehearsetimingsactivity.hxx @@ -23,12 +23,11 @@ #include "activity.hxx" #include <basegfx/range/b2drange.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> #include <boost/noncopyable.hpp> #include <vector> #include <utility> +#include <memory> namespace vcl { class Font; } namespace canvas{ namespace tools{ class ElapsedTime; }} @@ -47,13 +46,12 @@ class EventMultiplexer; class ScreenUpdater; class RehearseTimingsActivity : public Activity, public ViewEventHandler, - public boost::enable_shared_from_this<RehearseTimingsActivity>, private ::boost::noncopyable { public: /** Creates the activity. */ - static boost::shared_ptr<RehearseTimingsActivity> create( + static std::shared_ptr<RehearseTimingsActivity> create( const SlideShowContext& rContext ); virtual ~RehearseTimingsActivity(); @@ -125,8 +123,8 @@ private: ::basegfx::B2DRange maSpriteRectangle; vcl::Font maFont; - boost::shared_ptr<WakeupEvent> mpWakeUpEvent; - boost::shared_ptr<MouseHandler> mpMouseHandler; + std::shared_ptr<WakeupEvent> mpWakeUpEvent; + std::shared_ptr<MouseHandler> mpMouseHandler; ::basegfx::B2IVector maSpriteSizePixel; sal_Int32 mnYOffset; bool mbActive; diff --git a/slideshow/source/engine/screenupdater.cxx b/slideshow/source/engine/screenupdater.cxx index 4efd329012af..71288685ce99 100644 --- a/slideshow/source/engine/screenupdater.cxx +++ b/slideshow/source/engine/screenupdater.cxx @@ -22,8 +22,8 @@ #include <osl/diagnose.h> -#include <boost/shared_ptr.hpp> #include <boost/mem_fn.hpp> +#include <memory> #include <vector> #include <algorithm> @@ -212,9 +212,9 @@ namespace internal } } - ::boost::shared_ptr<ScreenUpdater::UpdateLock> ScreenUpdater::createLock (const bool bStartLocked) + ::std::shared_ptr<ScreenUpdater::UpdateLock> ScreenUpdater::createLock (const bool bStartLocked) { - return ::boost::shared_ptr<ScreenUpdater::UpdateLock>(new ::UpdateLock(*this, bStartLocked)); + return ::std::shared_ptr<ScreenUpdater::UpdateLock>(new ::UpdateLock(*this, bStartLocked)); } diff --git a/slideshow/source/engine/shapes/appletshape.cxx b/slideshow/source/engine/shapes/appletshape.cxx index c9d97f9eb8c7..3f3e20a66616 100644 --- a/slideshow/source/engine/shapes/appletshape.cxx +++ b/slideshow/source/engine/shapes/appletshape.cxx @@ -20,8 +20,6 @@ #include <canvas/canvastools.hxx> -#include <boost/shared_ptr.hpp> - #include "appletshape.hxx" #include "externalshapebase.hxx" #include "vieweventhandler.hxx" @@ -268,7 +266,7 @@ namespace slideshow // No way of doing this, or? } - boost::shared_ptr<Shape> createAppletShape( + std::shared_ptr<Shape> createAppletShape( const uno::Reference< drawing::XShape >& xShape, double nPrio, const OUString& rServiceName, @@ -276,7 +274,7 @@ namespace slideshow sal_Size nNumPropEntries, const SlideShowContext& rContext ) { - boost::shared_ptr< AppletShape > pAppletShape( + std::shared_ptr< AppletShape > pAppletShape( new AppletShape(xShape, nPrio, rServiceName, diff --git a/slideshow/source/engine/shapes/appletshape.hxx b/slideshow/source/engine/shapes/appletshape.hxx index d444355c61c1..979752588cc1 100644 --- a/slideshow/source/engine/shapes/appletshape.hxx +++ b/slideshow/source/engine/shapes/appletshape.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_APPLETSHAPE_HXX #include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace com { namespace sun { namespace star { namespace drawing { @@ -35,7 +35,7 @@ namespace slideshow struct SlideShowContext; class Shape; - boost::shared_ptr<Shape> createAppletShape( + std::shared_ptr<Shape> createAppletShape( const css::uno::Reference< css::drawing::XShape >& xShape, double nPrio, const OUString& rServiceName, diff --git a/slideshow/source/engine/shapes/backgroundshape.hxx b/slideshow/source/engine/shapes/backgroundshape.hxx index 0152ad59f88c..cc7fa93477aa 100644 --- a/slideshow/source/engine/shapes/backgroundshape.hxx +++ b/slideshow/source/engine/shapes/backgroundshape.hxx @@ -21,7 +21,6 @@ #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_BACKGROUNDSHAPE_HXX #include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> namespace com { namespace sun { namespace star { namespace drawing { @@ -42,7 +41,7 @@ namespace slideshow nor attributable, those more specialized derivations of the Shape interface are not implemented here. */ - boost::shared_ptr<Shape> createBackgroundShape( + std::shared_ptr<Shape> 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/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index cc6f61cacd2c..5083a4a34ef1 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -53,10 +53,9 @@ #include "intrinsicanimationactivity.hxx" #include "intrinsicanimationeventhandler.hxx" -#include <boost/weak_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> #include <boost/noncopyable.hpp> #include <vector> +#include <memory> using namespace com::sun::star; using namespace ::slideshow::internal; @@ -131,7 +130,6 @@ double ScrollTextAnimNode::GetStateAtRelativeTime( } class ActivityImpl : public Activity, - public boost::enable_shared_from_this<ActivityImpl>, private boost::noncopyable { public: @@ -139,8 +137,8 @@ public: ActivityImpl( SlideShowContext const& rContext, - boost::shared_ptr<WakeupEvent> const& pWakeupEvent, - boost::shared_ptr<DrawShape> const& pDrawShape ); + std::shared_ptr<WakeupEvent> const& pWakeupEvent, + std::shared_ptr<DrawShape> const& pDrawShape ); bool enableAnimations(); @@ -194,8 +192,8 @@ private: SlideShowContext maContext; - boost::shared_ptr<WakeupEvent> mpWakeupEvent; - boost::weak_ptr<DrawShape> mpParentDrawShape; + std::shared_ptr<WakeupEvent> mpWakeupEvent; + std::weak_ptr<DrawShape> mpParentDrawShape; DrawShapeSharedPtr mpDrawShape; ShapeAttributeLayerHolder maShapeAttrLayer; GDIMetaFileSharedPtr mpMetaFile; @@ -736,8 +734,8 @@ bool ActivityImpl::perform() ActivityImpl::ActivityImpl( SlideShowContext const& rContext, - boost::shared_ptr<WakeupEvent> const& pWakeupEvent, - boost::shared_ptr<DrawShape> const& pParentDrawShape ) + std::shared_ptr<WakeupEvent> const& pWakeupEvent, + std::shared_ptr<DrawShape> const& pParentDrawShape ) : maContext(rContext), mpWakeupEvent(pWakeupEvent), mpParentDrawShape(pParentDrawShape), @@ -770,7 +768,7 @@ ActivityImpl::ActivityImpl( // TODO(Q3): Doing this manually, instead of using // ShapeSubset. This is because of lifetime issues (ShapeSubset // generates circular references to parent shape) - mpDrawShape = boost::dynamic_pointer_cast<DrawShape>( + mpDrawShape = std::dynamic_pointer_cast<DrawShape>( maContext.mpSubsettableShapeManager->getSubsetShape( pParentDrawShape, scrollTextNode )); @@ -861,8 +859,7 @@ ActivityImpl::ActivityImpl( bool ActivityImpl::enableAnimations() { mbIsActive = true; - return maContext.mrActivitiesQueue.addActivity( - shared_from_this() ); + return maContext.mrActivitiesQueue.addActivity( ActivitySharedPtr(this) ); } ActivityImpl::~ActivityImpl() @@ -936,15 +933,15 @@ void ActivityImpl::end() namespace slideshow { namespace internal { -boost::shared_ptr<Activity> createDrawingLayerAnimActivity( +std::shared_ptr<Activity> createDrawingLayerAnimActivity( SlideShowContext const& rContext, - boost::shared_ptr<DrawShape> const& pDrawShape ) + std::shared_ptr<DrawShape> const& pDrawShape ) { - boost::shared_ptr<Activity> pActivity; + std::shared_ptr<Activity> pActivity; try { - boost::shared_ptr<WakeupEvent> const pWakeupEvent( + std::shared_ptr<WakeupEvent> const pWakeupEvent( new WakeupEvent( rContext.mrEventQueue.getTimer(), rContext.mrActivitiesQueue ) ); pActivity.reset( new ActivityImpl( rContext, pWakeupEvent, pDrawShape ) ); diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.hxx b/slideshow/source/engine/shapes/drawinglayeranimation.hxx index 8444fe7aea05..3ebd45e1f766 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.hxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.hxx @@ -20,7 +20,6 @@ #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_DRAWINGLAYERANIMATION_HXX #include <sal/config.h> -#include <boost/shared_ptr.hpp> namespace slideshow { namespace internal { @@ -29,9 +28,9 @@ class Activity; struct SlideShowContext; class DrawShape; -boost::shared_ptr<Activity> createDrawingLayerAnimActivity( +std::shared_ptr<Activity> createDrawingLayerAnimActivity( SlideShowContext const& rContext, - boost::shared_ptr<DrawShape> const& pDrawShape ); + std::shared_ptr<DrawShape> const& pDrawShape ); } // namespace internal } // namespace presentation diff --git a/slideshow/source/engine/shapes/drawshape.hxx b/slideshow/source/engine/shapes/drawshape.hxx index 5cc1d59a9d1e..a0d98b1c9001 100644 --- a/slideshow/source/engine/shapes/drawshape.hxx +++ b/slideshow/source/engine/shapes/drawshape.hxx @@ -30,8 +30,6 @@ #include "hyperlinkarea.hxx" #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> #include <set> #include <vector> @@ -45,7 +43,7 @@ namespace slideshow struct SlideShowContext; class DrawShapeSubsetting; class DrawShape; - typedef ::boost::shared_ptr< DrawShape > DrawShapeSharedPtr; + typedef ::std::shared_ptr< DrawShape > DrawShapeSharedPtr; /** This class is the representation of a draw document's XShape, and implements the Shape, AnimatableShape, and @@ -308,7 +306,7 @@ namespace slideshow ShapeAttributeLayerSharedPtr mpAttributeLayer; // only created lazily // held here, to signal our destruction - boost::weak_ptr<Activity> mpIntrinsicAnimationActivity; + std::weak_ptr<Activity> mpIntrinsicAnimationActivity; // The attribute states, to detect attribute changes, // without buffering and querying each single attribute diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx index 6f2fb5d976e5..fab2a4096159 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx @@ -260,7 +260,7 @@ namespace slideshow mbNodeTreeInitialized = false; } - void DrawShapeSubsetting::reset( const ::boost::shared_ptr< GDIMetaFile >& rMtf ) + void DrawShapeSubsetting::reset( const ::std::shared_ptr< GDIMetaFile >& rMtf ) { reset(); mpMtf = rMtf; diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.hxx b/slideshow/source/engine/shapes/drawshapesubsetting.hxx index 12b1f97e988c..71457e38036c 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.hxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_DRAWSHAPESUBSETTING_HXX #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_DRAWSHAPESUBSETTING_HXX -#include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> #include "doctreenode.hxx" @@ -62,7 +61,7 @@ namespace slideshow generated with verbose text comments switched on). */ DrawShapeSubsetting( const DocTreeNode& rShapeSubset, - const ::boost::shared_ptr< GDIMetaFile >& rMtf ); + const ::std::shared_ptr< GDIMetaFile >& rMtf ); /** Reset metafile. @@ -75,7 +74,7 @@ namespace slideshow Metafile to retrieve subset info from (must have been generated with verbose text comments switched on). */ - void reset( const ::boost::shared_ptr< GDIMetaFile >& rMtf ); + void reset( const ::std::shared_ptr< GDIMetaFile >& rMtf ); // Shape subsetting methods @@ -215,7 +214,7 @@ namespace slideshow mutable IndexClassificatorVector maActionClassVector; /// Metafile to retrieve subset info from - ::boost::shared_ptr< GDIMetaFile > mpMtf; + ::std::shared_ptr< GDIMetaFile > mpMtf; /// Subset of the metafile represented by this object DocTreeNode maSubset; diff --git a/slideshow/source/engine/shapes/externalshapebase.hxx b/slideshow/source/engine/shapes/externalshapebase.hxx index 4455b1c2a6dd..f378f721e1cf 100644 --- a/slideshow/source/engine/shapes/externalshapebase.hxx +++ b/slideshow/source/engine/shapes/externalshapebase.hxx @@ -119,7 +119,7 @@ namespace slideshow /// The associated XShape css::uno::Reference< css::drawing::XShape > mxShape; - boost::shared_ptr<ExternalShapeBaseListener> mpListener; + std::shared_ptr<ExternalShapeBaseListener> mpListener; SubsettableShapeManagerSharedPtr mpShapeManager; EventMultiplexer& mrEventMultiplexer; diff --git a/slideshow/source/engine/shapes/gdimtftools.hxx b/slideshow/source/engine/shapes/gdimtftools.hxx index ac7190515e3e..59e91c554686 100644 --- a/slideshow/source/engine/shapes/gdimtftools.hxx +++ b/slideshow/source/engine/shapes/gdimtftools.hxx @@ -26,7 +26,6 @@ #include <com/sun/star/drawing/XDrawPage.hpp> #include <basegfx/range/b2drectangle.hxx> -#include <boost/shared_ptr.hpp> #include "tools.hxx" diff --git a/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx b/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx index a1fd73b0f671..8740272be899 100644 --- a/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx +++ b/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx @@ -28,8 +28,7 @@ #include "intrinsicanimationeventhandler.hxx" #include <boost/noncopyable.hpp> -#include <boost/enable_shared_from_this.hpp> -#include <boost/weak_ptr.hpp> +#include <memory> namespace slideshow { @@ -43,7 +42,6 @@ namespace slideshow animations, or GIF animations. */ class IntrinsicAnimationActivity : public Activity, - public boost::enable_shared_from_this<IntrinsicAnimationActivity>, private boost::noncopyable { public: @@ -83,7 +81,7 @@ namespace slideshow private: SlideShowContext maContext; - boost::weak_ptr<DrawShape> mpDrawShape; + std::weak_ptr<DrawShape> mpDrawShape; WakeupEventSharedPtr mpWakeupEvent; IntrinsicAnimationEventHandlerSharedPtr mpListener; ::std::vector<double> maTimeouts; @@ -250,8 +248,7 @@ namespace slideshow bool IntrinsicAnimationActivity::enableAnimations() { mbIsActive = true; - return maContext.mrActivitiesQueue.addActivity( - shared_from_this() ); + return maContext.mrActivitiesQueue.addActivity( ActivitySharedPtr(this) ); } diff --git a/slideshow/source/engine/shapes/mediashape.cxx b/slideshow/source/engine/shapes/mediashape.cxx index 4981117e4dc2..0213287c0b49 100644 --- a/slideshow/source/engine/shapes/mediashape.cxx +++ b/slideshow/source/engine/shapes/mediashape.cxx @@ -240,7 +240,7 @@ namespace slideshow double nPrio, const SlideShowContext& rContext) { - boost::shared_ptr< MediaShape > pMediaShape( + std::shared_ptr< MediaShape > pMediaShape( new MediaShape(xShape, nPrio, rContext)); return pMediaShape; diff --git a/slideshow/source/engine/shapes/mediashape.hxx b/slideshow/source/engine/shapes/mediashape.hxx index ca20bce5590e..ce1ba8bfe3a4 100644 --- a/slideshow/source/engine/shapes/mediashape.hxx +++ b/slideshow/source/engine/shapes/mediashape.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_MEDIASHAPE_HXX #include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace com { namespace sun { namespace star { namespace drawing @@ -36,7 +36,7 @@ namespace slideshow struct SlideShowContext; class Shape; - boost::shared_ptr<Shape> createMediaShape( + std::shared_ptr<Shape> createMediaShape( const css::uno::Reference<css::drawing::XShape >& xShape, double nPrio, const SlideShowContext& rContext); diff --git a/slideshow/source/engine/shapes/viewappletshape.hxx b/slideshow/source/engine/shapes/viewappletshape.hxx index 0f0591be46ec..5a3ccc0e29bb 100644 --- a/slideshow/source/engine/shapes/viewappletshape.hxx +++ b/slideshow/source/engine/shapes/viewappletshape.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/awt/Point.hpp> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include "viewlayer.hxx" @@ -149,7 +149,7 @@ namespace slideshow css::uno::XComponentContext> mxComponentContext; }; - typedef ::boost::shared_ptr< ViewAppletShape > ViewAppletShapeSharedPtr; + typedef ::std::shared_ptr< ViewAppletShape > ViewAppletShapeSharedPtr; } } diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.hxx b/slideshow/source/engine/shapes/viewbackgroundshape.hxx index ff08c32eed6c..e2a57e201ee1 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.hxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.hxx @@ -27,7 +27,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <cppcanvas/spritecanvas.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/noncopyable.hpp> #include "gdimtftools.hxx" @@ -87,7 +87,7 @@ namespace slideshow const ::basegfx::B2DRectangle maBounds; }; - typedef ::boost::shared_ptr< ViewBackgroundShape > ViewBackgroundShapeSharedPtr; + typedef ::std::shared_ptr< ViewBackgroundShape > ViewBackgroundShapeSharedPtr; } } diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx index 0bd98b951309..1b60a77d3d0e 100644 --- a/slideshow/source/engine/shapes/viewmediashape.hxx +++ b/slideshow/source/engine/shapes/viewmediashape.hxx @@ -23,7 +23,7 @@ #include <basegfx/range/b2drectangle.hxx> #include <com/sun/star/awt/Point.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/noncopyable.hpp> #include <vcl/vclptr.hxx> @@ -155,7 +155,7 @@ namespace slideshow bool mbIsSoundEnabled; }; - typedef ::boost::shared_ptr< ViewMediaShape > ViewMediaShapeSharedPtr; + typedef ::std::shared_ptr< ViewMediaShape > ViewMediaShapeSharedPtr; } } diff --git a/slideshow/source/engine/shapes/viewshape.hxx b/slideshow/source/engine/shapes/viewshape.hxx index 51dfaac61eca..ccefbdabe32f 100644 --- a/slideshow/source/engine/shapes/viewshape.hxx +++ b/slideshow/source/engine/shapes/viewshape.hxx @@ -26,7 +26,6 @@ #include <basegfx/range/b2drectangle.hxx> #include <basegfx/polygon/b2dpolygon.hxx> -#include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> #include "tools.hxx" @@ -36,6 +35,7 @@ #include "doctreenode.hxx" #include <vector> +#include <memory> namespace slideshow @@ -314,7 +314,7 @@ namespace slideshow mutable bool mbForceUpdate; }; - typedef ::boost::shared_ptr< ViewShape > ViewShapeSharedPtr; + typedef ::std::shared_ptr< ViewShape > ViewShapeSharedPtr; } } diff --git a/slideshow/source/engine/slide/layer.hxx b/slideshow/source/engine/slide/layer.hxx index 79b1c1c66395..3dc6a881802e 100644 --- a/slideshow/source/engine/slide/layer.hxx +++ b/slideshow/source/engine/slide/layer.hxx @@ -26,12 +26,10 @@ #include "view.hxx" #include "animatableshape.hxx" -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> #include <boost/noncopyable.hpp> -#include <boost/enable_shared_from_this.hpp> #include <vector> +#include <memory> namespace slideshow @@ -60,18 +58,18 @@ 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 boost::enable_shared_from_this<Layer>, + class Layer : public std::enable_shared_from_this<Layer>, private boost::noncopyable { public: - typedef boost::shared_ptr<LayerEndUpdate> EndUpdater; + typedef std::shared_ptr<LayerEndUpdate> EndUpdater; /** Create background layer This method will create a layer without a ViewLayer, i.e. one that displays directly on the background. */ - static ::boost::shared_ptr< Layer > createBackgroundLayer(); + static ::std::shared_ptr< Layer > createBackgroundLayer(); /** Create non-background layer @@ -79,7 +77,7 @@ namespace slideshow background, to contain shapes that should appear in front of animated objects. */ - static ::boost::shared_ptr< Layer > createLayer(); + static ::std::shared_ptr< Layer > createLayer(); /** Predicate, whether this layer is the special @@ -255,8 +253,8 @@ namespace slideshow bool mbClipSet; // true, if beginUpdate set a clip }; - typedef ::boost::shared_ptr< Layer > LayerSharedPtr; - typedef ::boost::weak_ptr< Layer > LayerWeakPtr; + typedef ::std::shared_ptr< Layer > LayerSharedPtr; + typedef ::std::weak_ptr< Layer > LayerWeakPtr; typedef ::std::vector< LayerSharedPtr > LayerVector; } diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index 22a248c7549a..861e8f5a4d63 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -32,13 +32,13 @@ using namespace ::com::sun::star; -namespace boost +namespace std { // add operator!= for weak_ptr inline bool operator!=( slideshow::internal::LayerWeakPtr const& rLHS, slideshow::internal::LayerWeakPtr const& rRHS ) { - return (rLHS<rRHS) || (rRHS<rLHS); + return rLHS.lock().get() != rRHS.lock().get(); } } diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx index 97f5425fb251..13fc4ac20f52 100644 --- a/slideshow/source/engine/slide/layermanager.hxx +++ b/slideshow/source/engine/slide/layermanager.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_SLIDE_LAYERMANAGER_HXX #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SLIDE_LAYERMANAGER_HXX -#include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> #include <cppcanvas/spritecanvas.hxx> @@ -33,6 +32,7 @@ #include <algorithm> #include <functional> +#include <memory> #include <map> #include <unordered_map> #include <vector> @@ -359,7 +359,7 @@ namespace slideshow bool mbDisableAnimationZOrder; }; - typedef ::boost::shared_ptr< LayerManager > LayerManagerSharedPtr; + typedef ::std::shared_ptr< LayerManager > LayerManagerSharedPtr; } } diff --git a/slideshow/source/engine/slide/shapemanagerimpl.cxx b/slideshow/source/engine/slide/shapemanagerimpl.cxx index facc748cbc9f..f9b62a8eff4b 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.cxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.cxx @@ -144,7 +144,7 @@ bool ShapeManagerImpl::handleMouseReleased( awt::MouseEvent const& e ) // shape hit, and shape is visible. Raise // event. - boost::shared_ptr<comphelper::OInterfaceContainerHelper2> const pCont( + std::shared_ptr<comphelper::OInterfaceContainerHelper2> const pCont( aCurrBroadcaster->second ); uno::Reference<drawing::XShape> const xShape( aCurrBroadcaster->first->getXShape() ); diff --git a/slideshow/source/engine/slide/shapemanagerimpl.hxx b/slideshow/source/engine/slide/shapemanagerimpl.hxx index 3fd8fb7035c1..01ea7745557f 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.hxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.hxx @@ -35,11 +35,10 @@ #include "shapelistenereventhandler.hxx" #include "mouseeventhandler.hxx" -#include <boost/shared_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> #include <boost/noncopyable.hpp> #include <set> #include <map> +#include <memory> namespace slideshow { namespace internal { @@ -54,7 +53,7 @@ class ShapeManagerImpl : public SubsettableShapeManager, public ShapeListenerEventHandler, public MouseEventHandler, public ViewUpdate, - public boost::enable_shared_from_this<ShapeManagerImpl>, + public std::enable_shared_from_this<ShapeManagerImpl>, private boost::noncopyable { public: @@ -119,18 +118,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 boost::shared_ptr<HyperlinkArea>& rArea ) override; + virtual void addHyperlinkArea( const std::shared_ptr<HyperlinkArea>& rArea ) override; // SubsettableShapeManager interface - virtual boost::shared_ptr<AttributableShape> getSubsetShape( - const boost::shared_ptr<AttributableShape>& rOrigShape, + virtual std::shared_ptr<AttributableShape> getSubsetShape( + const std::shared_ptr<AttributableShape>& rOrigShape, const DocTreeNode& rTreeNode ) override; virtual void revokeSubset( - const boost::shared_ptr<AttributableShape>& rOrigShape, - const boost::shared_ptr<AttributableShape>& rSubsetShape ) override; + const std::shared_ptr<AttributableShape>& rOrigShape, + const std::shared_ptr<AttributableShape>& rSubsetShape ) override; virtual void addIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr& rHandler ) override; @@ -157,7 +156,7 @@ private: typedef std::map<ShapeSharedPtr, - boost::shared_ptr< ::comphelper::OInterfaceContainerHelper2 >, + std::shared_ptr< ::comphelper::OInterfaceContainerHelper2 >, Shape::lessThanShape> ShapeToListenersMap; typedef std::map<ShapeSharedPtr, sal_Int16, Shape::lessThanShape> ShapeToCursorMap; diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 1894c7036501..863b6d2efc0e 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -219,8 +219,8 @@ private: uno::Reference< animations::XAnimationNode > mxRootNode; LayerManagerSharedPtr mpLayerManager; - boost::shared_ptr<ShapeManagerImpl> mpShapeManager; - boost::shared_ptr<SubsettableShapeManager> mpSubsettableShapeManager; + std::shared_ptr<ShapeManagerImpl> mpShapeManager; + std::shared_ptr<SubsettableShapeManager> mpSubsettableShapeManager; /// Contains common objects needed throughout the slideshow SlideShowContext maContext; @@ -917,7 +917,7 @@ void SlideImpl::applyShapeAttributes( } AttributableShapeSharedPtr pAttrShape( - ::boost::dynamic_pointer_cast< AttributableShape >( pShape ) ); + ::std::dynamic_pointer_cast< AttributableShape >( pShape ) ); if( !pAttrShape ) { @@ -1156,7 +1156,7 @@ SlideSharedPtr createSlide( const uno::Reference< drawing::XDrawPage >& bool bIntrinsicAnimationsAllowed, bool bDisableAnimationZOrder ) { - boost::shared_ptr<SlideImpl> pRet( new SlideImpl( xDrawPage, xDrawPages, xRootNode, rEventQueue, + std::shared_ptr<SlideImpl> pRet( new SlideImpl( xDrawPage, xDrawPages, xRootNode, rEventQueue, rEventMultiplexer, rScreenUpdater, rActivitiesQueue, rUserEventQueue, rCursorManager, rViewContainer, diff --git a/slideshow/source/engine/slide/userpaintoverlay.hxx b/slideshow/source/engine/slide/userpaintoverlay.hxx index 2d46309759b7..8c57ba222b84 100644 --- a/slideshow/source/engine/slide/userpaintoverlay.hxx +++ b/slideshow/source/engine/slide/userpaintoverlay.hxx @@ -26,7 +26,7 @@ #include "rgbcolor.hxx" #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> /* Definition of UserPaintOverlay class */ @@ -39,7 +39,7 @@ namespace slideshow struct SlideShowContext; class PaintOverlayHandler; - typedef ::boost::shared_ptr< class UserPaintOverlay > UserPaintOverlaySharedPtr; + typedef ::std::shared_ptr< class UserPaintOverlay > UserPaintOverlaySharedPtr; typedef ::std::vector< ::cppcanvas::PolyPolygonSharedPtr> PolyPolygonVector; /** Slide overlay, which can be painted into by the user. @@ -74,7 +74,7 @@ namespace slideshow const PolyPolygonVector& rPolygons, bool bActive ); - ::boost::shared_ptr<PaintOverlayHandler> mpHandler; + ::std::shared_ptr<PaintOverlayHandler> mpHandler; EventMultiplexer& mrMultiplexer; }; } diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index bdf15c87f31c..da94f03319b3 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -451,12 +451,12 @@ private: UserEventQueue maUserEventQueue; SubsettableShapeManagerSharedPtr mpDummyPtr; - boost::shared_ptr<SeparateListenerImpl> mpListener; + std::shared_ptr<SeparateListenerImpl> mpListener; - boost::shared_ptr<RehearseTimingsActivity> mpRehearseTimingsActivity; - boost::shared_ptr<WaitSymbol> mpWaitSymbol; + std::shared_ptr<RehearseTimingsActivity> mpRehearseTimingsActivity; + std::shared_ptr<WaitSymbol> mpWaitSymbol; - boost::shared_ptr<PointerSymbol> mpPointerSymbol; + std::shared_ptr<PointerSymbol> mpPointerSymbol; /// the current slide transition sound object: SoundPlayerSharedPtr mpCurrentSlideTransitionSound; @@ -1855,7 +1855,7 @@ void SlideShowImpl::addShapeEventListener( aIter = maShapeEventListeners.insert( ShapeEventListenerMap::value_type( xShape, - boost::shared_ptr<comphelper::OInterfaceContainerHelper2>( + std::shared_ptr<comphelper::OInterfaceContainerHelper2>( new comphelper::OInterfaceContainerHelper2(m_aMutex)))).first; } diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 65bee1bb446b..053dfea69519 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -52,8 +52,8 @@ #include <com/sun/star/presentation/XSlideShow.hpp> #include <boost/noncopyable.hpp> -#include <boost/weak_ptr.hpp> +#include <memory> #include <vector> #include <iterator> #include <algorithm> diff --git a/slideshow/source/engine/smilfunctionparser.cxx b/slideshow/source/engine/smilfunctionparser.cxx index 148d5bbce137..dcc807a16b53 100644 --- a/slideshow/source/engine/smilfunctionparser.cxx +++ b/slideshow/source/engine/smilfunctionparser.cxx @@ -76,7 +76,7 @@ namespace slideshow bool mbParseAnimationFunction; }; - typedef ::boost::shared_ptr< ParserContext > ParserContextSharedPtr; + typedef ::std::shared_ptr< ParserContext > ParserContextSharedPtr; template< typename Generator > class ShapeBoundsFunctor diff --git a/slideshow/source/engine/soundplayer.cxx b/slideshow/source/engine/soundplayer.cxx index 560693d925f3..502742ee306f 100644 --- a/slideshow/source/engine/soundplayer.cxx +++ b/slideshow/source/engine/soundplayer.cxx @@ -44,12 +44,12 @@ namespace slideshow { // TODO(Q3): Move the whole SoundPlayer class to avmedia. - boost::shared_ptr<SoundPlayer> SoundPlayer::create( + std::shared_ptr<SoundPlayer> SoundPlayer::create( EventMultiplexer & rEventMultiplexer, const OUString& rSoundURL, const uno::Reference< uno::XComponentContext>& rComponentContext ) { - boost::shared_ptr<SoundPlayer> pPlayer( + std::shared_ptr<SoundPlayer> pPlayer( new SoundPlayer( rEventMultiplexer, rSoundURL, rComponentContext ) ); diff --git a/slideshow/source/engine/sp_debug.cxx b/slideshow/source/engine/sp_debug.cxx index 664cfe297d7f..a0d1500b1b5a 100644 --- a/slideshow/source/engine/sp_debug.cxx +++ b/slideshow/source/engine/sp_debug.cxx @@ -31,11 +31,11 @@ #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) #include <boost/assert.hpp> -#include <boost/shared_ptr.hpp> #include <boost/detail/lightweight_mutex.hpp> #include <canvas/debug.hxx> #include <cstdlib> #include <map> +#include <memory> #include <deque> #include <iostream> @@ -57,140 +57,6 @@ static mutex_type & get_mutex() static void * init_mutex_before_main = &get_mutex(); -namespace -{ - class X; - - struct count_layout - { - boost::detail::sp_counted_base * pi; - int id; - }; - - struct shared_ptr_layout - { - X * px; - count_layout pn; - }; -} - -// assume 4 byte alignment for pointers when scanning -size_t const pointer_align = 4; - -typedef std::map<void const *, long> map2_type; - -static void scan_and_count(void const * area, size_t size, map_type const & m, map2_type & m2) -{ - unsigned char const * p = static_cast<unsigned char const *>(area); - - for(size_t n = 0; n + sizeof(shared_ptr_layout) <= size; p += pointer_align, n += pointer_align) - { - shared_ptr_layout const * q = reinterpret_cast<shared_ptr_layout const *>(p); - - if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != nullptr && m.count(q->pn.pi) != 0) - { - ++m2[q->pn.pi]; - } - } -} - -typedef std::deque<void const *> open_type; - -static void scan_and_mark(void const * area, size_t size, map2_type & m2, open_type & open) -{ - unsigned char const * p = static_cast<unsigned char const *>(area); - - for(size_t n = 0; n + sizeof(shared_ptr_layout) <= size; p += pointer_align, n += pointer_align) - { - shared_ptr_layout const * q = reinterpret_cast<shared_ptr_layout const *>(p); - - if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != nullptr && m2.count(q->pn.pi) != 0) - { - open.push_back(q->pn.pi); - m2.erase(q->pn.pi); - } - } -} - -static void find_unreachable_objects_impl(map_type const & m, map2_type & m2) -{ - // scan objects for shared_ptr members, compute internal counts - - { - std::cout << "... " << m.size() << " objects in m.\n"; - - for(map_type::const_iterator i = m.begin(); i != m.end(); ++i) - { - BOOST_ASSERT(static_cast<boost::detail::sp_counted_base const *>(i->first)->use_count() != 0); // there should be no inactive counts in the map - - scan_and_count(i->second.first, i->second.second, m, m2); - } - - std::cout << "... " << m2.size() << " objects in m2.\n"; - } - - // mark reachable objects - - { - open_type open; - - for(map2_type::iterator i = m2.begin(); i != m2.end(); ++i) - { - boost::detail::sp_counted_base const * p = static_cast<boost::detail::sp_counted_base const *>(i->first); - if(p->use_count() != i->second) open.push_back(p); - } - - std::cout << "... " << m2.size() << " objects in open.\n"; - - for(open_type::iterator j = open.begin(); j != open.end(); ++j) - { - m2.erase(*j); - } - - while(!open.empty()) - { - void const * p = open.front(); - open.pop_front(); - - map_type::const_iterator i = m.find(p); - BOOST_ASSERT(i != m.end()); - - scan_and_mark(i->second.first, i->second.second, m2, open); - } - } - - // m2 now contains the unreachable objects -} - -std::size_t find_unreachable_objects(bool report) -{ - map2_type m2; - -#ifdef BOOST_HAS_THREADS - - // This will work without the #ifdef, but some compilers warn - // that lock is not referenced - - mutex_type::scoped_lock lock(get_mutex()); - -#endif - - map_type const & m = get_map(); - - find_unreachable_objects_impl(m, m2); - - if(report) - { - for(map2_type::iterator j = m2.begin(); j != m2.end(); ++j) - { - map_type::const_iterator i = m.find(j->first); - BOOST_ASSERT(i != m.end()); - std::cout << "Unreachable object at " << i->second.first << ", " << i->second.second << " bytes long.\n"; - } - } - - return m2.size(); -} // debug hooks diff --git a/slideshow/source/engine/transitions/parametricpolypolygon.hxx b/slideshow/source/engine/transitions/parametricpolypolygon.hxx index d367429222cd..f35b0cc76184 100644 --- a/slideshow/source/engine/transitions/parametricpolypolygon.hxx +++ b/slideshow/source/engine/transitions/parametricpolypolygon.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_TRANSITIONS_PARAMETRICPOLYPOLYGON_HXX #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> /* Definition of ParametricPolyPolygon interface */ @@ -82,7 +82,7 @@ namespace slideshow virtual ::basegfx::B2DPolyPolygon operator()( double t ) = 0; }; - typedef ::boost::shared_ptr< ParametricPolyPolygon > ParametricPolyPolygonSharedPtr; + typedef ::std::shared_ptr< ParametricPolyPolygon > ParametricPolyPolygonSharedPtr; } } diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx index 07ca4eb8b20b..be5574289192 100644 --- a/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/slideshow/source/engine/transitions/slidechangebase.cxx @@ -176,7 +176,7 @@ void SlideChangeBase::prefetch( const AnimatableShapeSharedPtr&, return; // register ourselves for view change events - mrEventMultiplexer.addViewHandler( shared_from_this() ); + mrEventMultiplexer.addViewHandler( std::shared_ptr<ViewEventHandler>((ViewEventHandler*)this) ); // init views and create slide bitmaps for( const auto& pView : mrViewContainer ) @@ -251,7 +251,7 @@ void SlideChangeBase::end() mbSpritesVisible = false; // remove also from event multiplexer, we're dead anyway - mrEventMultiplexer.removeViewHandler( shared_from_this() ); + mrEventMultiplexer.removeViewHandler( std::shared_ptr<ViewEventHandler>((ViewEventHandler*)this) ); } bool SlideChangeBase::operator()( double nValue ) diff --git a/slideshow/source/engine/transitions/slidechangebase.hxx b/slideshow/source/engine/transitions/slidechangebase.hxx index 1af9ab04153e..192e9590bb75 100644 --- a/slideshow/source/engine/transitions/slidechangebase.hxx +++ b/slideshow/source/engine/transitions/slidechangebase.hxx @@ -29,7 +29,7 @@ #include "screenupdater.hxx" #include "soundplayer.hxx" -#include <boost/enable_shared_from_this.hpp> +#include <memory> #include <boost/noncopyable.hpp> #include <boost/optional.hpp> @@ -50,7 +50,6 @@ namespace internal { */ class SlideChangeBase : public ViewEventHandler, public NumberAnimation, - public boost::enable_shared_from_this<SlideChangeBase>, private ::boost::noncopyable { public: diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx index 6c54c400244f..d221de285a0c 100644 --- a/slideshow/source/engine/usereventqueue.cxx +++ b/slideshow/source/engine/usereventqueue.cxx @@ -494,7 +494,7 @@ private: template< typename Handler, typename Functor > void UserEventQueue::registerEvent( - boost::shared_ptr< Handler >& rHandler, + std::shared_ptr< Handler >& rHandler, const EventSharedPtr& rEvent, const Functor& rRegistrationFunctor ) { @@ -513,7 +513,7 @@ void UserEventQueue::registerEvent( template< typename Handler, typename Arg, typename Functor > void UserEventQueue::registerEvent( - boost::shared_ptr< Handler >& rHandler, + std::shared_ptr< Handler >& rHandler, const EventSharedPtr& rEvent, const Arg& rArg, const Functor& rRegistrationFunctor ) @@ -692,7 +692,7 @@ public: mnPrio(nPrio), mbAdvanceOnClick( bAdvanceOnClick ) {} - void operator()( const boost::shared_ptr<ClickEventHandler>& rHandler )const + void operator()( const std::shared_ptr<ClickEventHandler>& rHandler )const { // register the handler on _two_ sources: we want the // nextEffect events, e.g. space bar, to trigger clicks, as well! @@ -796,8 +796,8 @@ void UserEventQueue::registerMouseLeaveEvent( const EventSharedPtr& rEvent, void UserEventQueue::callSkipEffectEventHandler() { - ::boost::shared_ptr<SkipEffectEventHandler> pHandler ( - ::boost::dynamic_pointer_cast<SkipEffectEventHandler>(mpSkipEffectEventHandler)); + ::std::shared_ptr<SkipEffectEventHandler> pHandler ( + ::std::dynamic_pointer_cast<SkipEffectEventHandler>(mpSkipEffectEventHandler)); if (pHandler) pHandler->skipEffect(); } diff --git a/slideshow/source/engine/waitsymbol.hxx b/slideshow/source/engine/waitsymbol.hxx index 41d2995d85a5..7c58c6146b23 100644 --- a/slideshow/source/engine/waitsymbol.hxx +++ b/slideshow/source/engine/waitsymbol.hxx @@ -28,7 +28,7 @@ #include "eventmultiplexer.hxx" #include "unoview.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/noncopyable.hpp> #include <vector> @@ -36,7 +36,7 @@ namespace slideshow { namespace internal { class EventMultiplexer; -typedef boost::shared_ptr<class WaitSymbol> WaitSymbolSharedPtr; +typedef std::shared_ptr<class WaitSymbol> WaitSymbolSharedPtr; /// On-screen 'hour glass' for when slideshow is unresponsive class WaitSymbol : public ViewEventHandler, |