diff options
112 files changed, 304 insertions, 455 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, diff --git a/slideshow/source/inc/activitiesqueue.hxx b/slideshow/source/inc/activitiesqueue.hxx index 24a0031208b1..2b03b9ff47ed 100644 --- a/slideshow/source/inc/activitiesqueue.hxx +++ b/slideshow/source/inc/activitiesqueue.hxx @@ -27,7 +27,7 @@ #include <canvas/elapsedtime.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/noncopyable.hpp> diff --git a/slideshow/source/inc/activity.hxx b/slideshow/source/inc/activity.hxx index 74d96e0268e2..9897170b9edf 100644 --- a/slideshow/source/inc/activity.hxx +++ b/slideshow/source/inc/activity.hxx @@ -22,7 +22,7 @@ #include <sal/types.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include "disposable.hxx" @@ -34,7 +34,7 @@ namespace slideshow namespace internal { - class Activity : public Disposable + class Activity : public Disposable, public virtual SharedPtrAble { public: /** Perform the activity associated with this interface's @@ -84,7 +84,7 @@ namespace slideshow virtual void end() = 0; }; - typedef ::boost::shared_ptr< Activity > ActivitySharedPtr; + typedef ::std::shared_ptr< Activity > ActivitySharedPtr; } } diff --git a/slideshow/source/inc/animatableshape.hxx b/slideshow/source/inc/animatableshape.hxx index 2573eff985a5..b2dd7753fa90 100644 --- a/slideshow/source/inc/animatableshape.hxx +++ b/slideshow/source/inc/animatableshape.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_ANIMATABLESHAPE_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_ANIMATABLESHAPE_HXX -#include <boost/shared_ptr.hpp> +#include <memory> #include "shape.hxx" @@ -72,7 +72,7 @@ namespace slideshow }; - typedef ::boost::shared_ptr< AnimatableShape > AnimatableShapeSharedPtr; + typedef ::std::shared_ptr< AnimatableShape > AnimatableShapeSharedPtr; } } diff --git a/slideshow/source/inc/animatedsprite.hxx b/slideshow/source/inc/animatedsprite.hxx index 8e9520296c57..a5980dab1787 100644 --- a/slideshow/source/inc/animatedsprite.hxx +++ b/slideshow/source/inc/animatedsprite.hxx @@ -30,7 +30,7 @@ #include "viewlayer.hxx" #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/noncopyable.hpp> @@ -154,7 +154,7 @@ namespace slideshow bool mbSpriteVisible; }; - typedef ::boost::shared_ptr< AnimatedSprite > AnimatedSpriteSharedPtr; + typedef ::std::shared_ptr< AnimatedSprite > AnimatedSpriteSharedPtr; } } diff --git a/slideshow/source/inc/animation.hxx b/slideshow/source/inc/animation.hxx index 8f9e613b148f..9108b72101d6 100644 --- a/slideshow/source/inc/animation.hxx +++ b/slideshow/source/inc/animation.hxx @@ -22,6 +22,7 @@ #include <animatableshape.hxx> #include <shapeattributelayer.hxx> +#include <disposable.hxx> /* Definition of Animation interface */ @@ -43,7 +44,7 @@ namespace slideshow @see ColorAnimation @see PairAnimation */ - class Animation + class Animation : public virtual SharedPtrAble { public: virtual ~Animation() {} @@ -81,7 +82,7 @@ namespace slideshow virtual void end() = 0; }; - typedef ::boost::shared_ptr< Animation > AnimationSharedPtr; + typedef ::std::shared_ptr< Animation > AnimationSharedPtr; } } diff --git a/slideshow/source/inc/animationactivity.hxx b/slideshow/source/inc/animationactivity.hxx index 45d3d387a416..95d0fd02c8b1 100644 --- a/slideshow/source/inc/animationactivity.hxx +++ b/slideshow/source/inc/animationactivity.hxx @@ -59,7 +59,7 @@ namespace slideshow const ShapeAttributeLayerSharedPtr& rAttrLayer ) = 0; }; - typedef ::boost::shared_ptr< AnimationActivity > AnimationActivitySharedPtr; + typedef ::std::shared_ptr< AnimationActivity > AnimationActivitySharedPtr; } } diff --git a/slideshow/source/inc/animationeventhandler.hxx b/slideshow/source/inc/animationeventhandler.hxx index 7a7489487d24..2d955e6b63cd 100644 --- a/slideshow/source/inc/animationeventhandler.hxx +++ b/slideshow/source/inc/animationeventhandler.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_ANIMATIONEVENTHANDLER_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_ANIMATIONEVENTHANDLER_HXX -#include <boost/shared_ptr.hpp> +#include <memory> #include "animationnode.hxx" @@ -55,7 +55,7 @@ namespace slideshow virtual bool handleAnimationEvent( const AnimationNodeSharedPtr& rNode ) = 0; }; - typedef ::boost::shared_ptr< AnimationEventHandler > AnimationEventHandlerSharedPtr; + typedef ::std::shared_ptr< AnimationEventHandler > AnimationEventHandlerSharedPtr; } } diff --git a/slideshow/source/inc/animationnode.hxx b/slideshow/source/inc/animationnode.hxx index eb856cc5d613..f6a02dcf67ab 100644 --- a/slideshow/source/inc/animationnode.hxx +++ b/slideshow/source/inc/animationnode.hxx @@ -22,7 +22,7 @@ #include "disposable.hxx" #include <com/sun/star/animations/XAnimationNode.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace slideshow { namespace internal { @@ -123,14 +123,14 @@ public: @param rNotifee AnimationNode to notify */ virtual bool registerDeactivatingListener( - const ::boost::shared_ptr< AnimationNode >& rNotifee ) = 0; + const ::std::shared_ptr< AnimationNode >& rNotifee ) = 0; /** Called to notify another AnimationNode's deactivation @param rNotifier The instance who calls this method. */ virtual void notifyDeactivating( - const ::boost::shared_ptr< AnimationNode >& rNotifier ) = 0; + const ::std::shared_ptr< AnimationNode >& rNotifier ) = 0; /** Query node whether it has an animation pending. @@ -141,7 +141,7 @@ public: virtual bool hasPendingAnimation() const = 0; }; -typedef ::boost::shared_ptr< AnimationNode > AnimationNodeSharedPtr; +typedef ::std::shared_ptr< AnimationNode > AnimationNodeSharedPtr; } // namespace internal } // namespace presentation diff --git a/slideshow/source/inc/attributableshape.hxx b/slideshow/source/inc/attributableshape.hxx index 55f683c8e8fe..4c250e67d14e 100644 --- a/slideshow/source/inc/attributableshape.hxx +++ b/slideshow/source/inc/attributableshape.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_ATTRIBUTABLESHAPE_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_ATTRIBUTABLESHAPE_HXX -#include <boost/shared_ptr.hpp> +#include <memory> #include "animatableshape.hxx" #include "shapeattributelayer.hxx" @@ -33,7 +33,7 @@ namespace slideshow // forward declaration necessary, because methods use AttributableShapeSharedPtr class AttributableShape; - typedef ::boost::shared_ptr< AttributableShape > AttributableShapeSharedPtr; + typedef ::std::shared_ptr< AttributableShape > AttributableShapeSharedPtr; /** Represents an animatable shape, that can have its attributes changed. diff --git a/slideshow/source/inc/boolanimation.hxx b/slideshow/source/inc/boolanimation.hxx index d55fe7cd19d8..16b9271eaeb9 100644 --- a/slideshow/source/inc/boolanimation.hxx +++ b/slideshow/source/inc/boolanimation.hxx @@ -61,7 +61,7 @@ namespace slideshow virtual ValueType getUnderlyingValue() const = 0; }; - typedef ::boost::shared_ptr< BoolAnimation > BoolAnimationSharedPtr; + typedef ::std::shared_ptr< BoolAnimation > BoolAnimationSharedPtr; } } diff --git a/slideshow/source/inc/coloranimation.hxx b/slideshow/source/inc/coloranimation.hxx index d9514bb3b978..77d394572aaf 100644 --- a/slideshow/source/inc/coloranimation.hxx +++ b/slideshow/source/inc/coloranimation.hxx @@ -61,7 +61,7 @@ namespace slideshow virtual ValueType getUnderlyingValue() const = 0; }; - typedef ::boost::shared_ptr< ColorAnimation > ColorAnimationSharedPtr; + typedef ::std::shared_ptr< ColorAnimation > ColorAnimationSharedPtr; } } diff --git a/slideshow/source/inc/cursormanager.hxx b/slideshow/source/inc/cursormanager.hxx index 52473508fa2e..2607a2633cc3 100644 --- a/slideshow/source/inc/cursormanager.hxx +++ b/slideshow/source/inc/cursormanager.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SLIDESHOW_SOURCE_INC_CURSORMANAGER_HXX #include <sal/types.h> -#include <boost/shared_ptr.hpp> +#include <memory> /* Definition of CursorManager interface */ @@ -56,7 +56,7 @@ namespace slideshow virtual void resetCursor() = 0; }; - typedef ::boost::shared_ptr< CursorManager > CursorManagerSharedPtr; + typedef ::std::shared_ptr< CursorManager > CursorManagerSharedPtr; } } diff --git a/slideshow/source/inc/disposable.hxx b/slideshow/source/inc/disposable.hxx index 47dcbb2076c8..c85e3698e953 100644 --- a/slideshow/source/inc/disposable.hxx +++ b/slideshow/source/inc/disposable.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SLIDESHOW_SOURCE_INC_DISPOSABLE_HXX #include <sal/types.h> -#include <boost/shared_ptr.hpp> +#include <memory> /* Definition of Disposable interface */ @@ -30,6 +30,14 @@ namespace slideshow { namespace internal { + /** + * Base class for being a shared pointer, since quite a few of the downstream classes + * want to be stored using std::shared_ptr. + */ + class SharedPtrAble : public std::enable_shared_from_this<SharedPtrAble> + { + }; + /** Disposable interface With ref-counted objects, deleting object networks diff --git a/slideshow/source/inc/enumanimation.hxx b/slideshow/source/inc/enumanimation.hxx index e6490570462d..bb659b270f21 100644 --- a/slideshow/source/inc/enumanimation.hxx +++ b/slideshow/source/inc/enumanimation.hxx @@ -63,7 +63,7 @@ namespace slideshow virtual ValueType getUnderlyingValue() const = 0; }; - typedef ::boost::shared_ptr< EnumAnimation > EnumAnimationSharedPtr; + typedef ::std::shared_ptr< EnumAnimation > EnumAnimationSharedPtr; } } diff --git a/slideshow/source/inc/event.hxx b/slideshow/source/inc/event.hxx index 60e9727a3874..15fd0d9d65df 100644 --- a/slideshow/source/inc/event.hxx +++ b/slideshow/source/inc/event.hxx @@ -21,7 +21,7 @@ #include "disposable.hxx" #include <rtl/ustring.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> namespace slideshow { @@ -70,7 +70,7 @@ private: const OUString msDescription; }; -typedef ::boost::shared_ptr< Event > EventSharedPtr; +typedef ::std::shared_ptr< Event > EventSharedPtr; typedef ::std::vector< EventSharedPtr > VectorOfEvents; } // namespace internal diff --git a/slideshow/source/inc/eventhandler.hxx b/slideshow/source/inc/eventhandler.hxx index 4ab58e689f15..3efc5f0b4059 100644 --- a/slideshow/source/inc/eventhandler.hxx +++ b/slideshow/source/inc/eventhandler.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_EVENTHANDLER_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_EVENTHANDLER_HXX -#include <boost/shared_ptr.hpp> +#include <memory> /* Definition of EventHandler interface */ @@ -51,7 +51,7 @@ namespace slideshow virtual bool handleEvent() = 0; }; - typedef ::boost::shared_ptr< EventHandler > EventHandlerSharedPtr; + typedef ::std::shared_ptr< EventHandler > EventHandlerSharedPtr; } } diff --git a/slideshow/source/inc/eventmultiplexer.hxx b/slideshow/source/inc/eventmultiplexer.hxx index 4ae4feaa54e7..e39c79ec6c1b 100644 --- a/slideshow/source/inc/eventmultiplexer.hxx +++ b/slideshow/source/inc/eventmultiplexer.hxx @@ -28,8 +28,6 @@ #include <boost/noncopyable.hpp> #include <memory> -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> #include <com/sun/star/uno/Reference.hxx> #include "unoview.hxx" @@ -73,7 +71,7 @@ public: virtual void viewClobbered( const UnoViewSharedPtr& rView ) = 0; }; -typedef ::boost::shared_ptr< ViewRepaintHandler > ViewRepaintHandlerSharedPtr; +typedef ::std::shared_ptr< ViewRepaintHandler > ViewRepaintHandlerSharedPtr; /** Interface for handling hyperlink clicks. @@ -100,7 +98,7 @@ protected: ~HyperlinkHandler() {} }; -typedef ::boost::shared_ptr< HyperlinkHandler > HyperlinkHandlerSharedPtr; +typedef ::std::shared_ptr< HyperlinkHandler > HyperlinkHandlerSharedPtr; /** Interface for handling user paint state changes. @@ -121,7 +119,7 @@ public: virtual bool disable() = 0; }; -typedef ::boost::shared_ptr< UserPaintEventHandler > UserPaintEventHandlerSharedPtr; +typedef ::std::shared_ptr< UserPaintEventHandler > UserPaintEventHandlerSharedPtr; /** This class multiplexes user-activated and slide-show global events. @@ -587,7 +585,7 @@ public: anybody. If false is returned, no handler processed this event (and probably, nothing will happen at all) */ - bool notifyAnimationStart( const boost::shared_ptr<AnimationNode>& rNode ); + bool notifyAnimationStart( const std::shared_ptr<AnimationNode>& rNode ); /** Notify that the given node leaves its active duration. @@ -603,7 +601,7 @@ public: anybody. If false is returned, no handler processed this event (and probably, nothing will happen at all) */ - bool notifyAnimationEnd( const boost::shared_ptr<AnimationNode>& rNode ); + bool notifyAnimationEnd( const std::shared_ptr<AnimationNode>& rNode ); /** Notify that the slide animations sequence leaves its active duration. @@ -628,7 +626,7 @@ public: anybody. If false is returned, no handler processed this event (and probably, nothing will happen at all) */ - bool notifyAudioStopped( const boost::shared_ptr<AnimationNode>& rNode ); + bool notifyAudioStopped( const std::shared_ptr<AnimationNode>& rNode ); /** Notify that the show has entered or exited pause mode @@ -649,7 +647,7 @@ public: anybody. If false is returned, no handler processed this event (and probably, nothing will happen at all) */ - bool notifyCommandStopAudio( const boost::shared_ptr<AnimationNode>& rNode ); + bool notifyCommandStopAudio( const std::shared_ptr<AnimationNode>& rNode ); /** Notifies that a hyperlink has been clicked. */ diff --git a/slideshow/source/inc/expressionnode.hxx b/slideshow/source/inc/expressionnode.hxx index c80fa807ed36..8bd0b14e2e85 100644 --- a/slideshow/source/inc/expressionnode.hxx +++ b/slideshow/source/inc/expressionnode.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_EXPRESSIONNODE_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_EXPRESSIONNODE_HXX -#include <boost/shared_ptr.hpp> +#include <memory> /* Definition of ExpressionNode interface */ @@ -53,7 +53,7 @@ namespace slideshow }; - typedef ::boost::shared_ptr< AnimationFunction > AnimationFunctionSharedPtr; + typedef ::std::shared_ptr< AnimationFunction > AnimationFunctionSharedPtr; /** Refinement of AnimationFunction @@ -77,7 +77,7 @@ namespace slideshow virtual bool isConstant() const = 0; }; - typedef ::boost::shared_ptr< ExpressionNode > ExpressionNodeSharedPtr; + typedef ::std::shared_ptr< ExpressionNode > ExpressionNodeSharedPtr; } } diff --git a/slideshow/source/inc/hslcoloranimation.hxx b/slideshow/source/inc/hslcoloranimation.hxx index 5efc57e06233..159c1255e47a 100644 --- a/slideshow/source/inc/hslcoloranimation.hxx +++ b/slideshow/source/inc/hslcoloranimation.hxx @@ -61,7 +61,7 @@ namespace slideshow virtual ValueType getUnderlyingValue() const = 0; }; - typedef ::boost::shared_ptr< HSLColorAnimation > HSLColorAnimationSharedPtr; + typedef ::std::shared_ptr< HSLColorAnimation > HSLColorAnimationSharedPtr; } } diff --git a/slideshow/source/inc/hyperlinkarea.hxx b/slideshow/source/inc/hyperlinkarea.hxx index 38dd8fd2c614..52e51f8224d9 100644 --- a/slideshow/source/inc/hyperlinkarea.hxx +++ b/slideshow/source/inc/hyperlinkarea.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_HYPERLINKAREA_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_HYPERLINKAREA_HXX -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> #include <utility> @@ -74,8 +74,8 @@ namespace slideshow // make functor adaptable (to boost::bind) typedef bool result_type; - bool operator()(const boost::shared_ptr< HyperlinkArea >& rLHS, - const boost::shared_ptr< HyperlinkArea >& rRHS) const + bool operator()(const std::shared_ptr< HyperlinkArea >& rLHS, + const std::shared_ptr< HyperlinkArea >& rRHS) const { const double nPrioL( rLHS->getHyperlinkPriority() ); const double nPrioR( rRHS->getHyperlinkPriority() ); @@ -89,7 +89,7 @@ namespace slideshow ~HyperlinkArea() {} }; - typedef boost::shared_ptr< HyperlinkArea > HyperlinkAreaSharedPtr; + typedef std::shared_ptr< HyperlinkArea > HyperlinkAreaSharedPtr; } } diff --git a/slideshow/source/inc/iexternalmediashapebase.hxx b/slideshow/source/inc/iexternalmediashapebase.hxx index f382c1094adf..3a174e977c82 100644 --- a/slideshow/source/inc/iexternalmediashapebase.hxx +++ b/slideshow/source/inc/iexternalmediashapebase.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_IEXTERNALMEDIASHAPEBASE_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_IEXTERNALMEDIASHAPEBASE_HXX -#include <boost/shared_ptr.hpp> +#include <memory> #include "shape.hxx" @@ -76,7 +76,7 @@ namespace slideshow virtual void setMediaTime(double fTime) = 0; }; - typedef ::boost::shared_ptr< IExternalMediaShapeBase > IExternalMediaShapeBaseSharedPtr; + typedef ::std::shared_ptr< IExternalMediaShapeBase > IExternalMediaShapeBaseSharedPtr; } } diff --git a/slideshow/source/inc/intrinsicanimationeventhandler.hxx b/slideshow/source/inc/intrinsicanimationeventhandler.hxx index f712592734a1..6016bb22745c 100644 --- a/slideshow/source/inc/intrinsicanimationeventhandler.hxx +++ b/slideshow/source/inc/intrinsicanimationeventhandler.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_INTRINSICANIMATIONEVENTHANDLER_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_INTRINSICANIMATIONEVENTHANDLER_HXX -#include <boost/shared_ptr.hpp> +#include <memory> /* Definition of IntrinsicAnimationEventHandler interface */ @@ -44,7 +44,7 @@ namespace slideshow virtual bool disableAnimations() = 0; }; - typedef ::boost::shared_ptr< IntrinsicAnimationEventHandler > IntrinsicAnimationEventHandlerSharedPtr; + typedef ::std::shared_ptr< IntrinsicAnimationEventHandler > IntrinsicAnimationEventHandlerSharedPtr; } } diff --git a/slideshow/source/inc/listenercontainer.hxx b/slideshow/source/inc/listenercontainer.hxx index 91529069462f..e07cf3ecdecf 100644 --- a/slideshow/source/inc/listenercontainer.hxx +++ b/slideshow/source/inc/listenercontainer.hxx @@ -126,7 +126,7 @@ template< typename ListenerT > struct ListenerOperations }; template< typename ListenerTargetT > -struct ListenerOperations< boost::weak_ptr<ListenerTargetT> > +struct ListenerOperations< std::weak_ptr<ListenerTargetT> > { template< typename ContainerT, typename FuncT > @@ -135,7 +135,7 @@ struct ListenerOperations< boost::weak_ptr<ListenerTargetT> > { for( const auto& rCurr : rContainer ) { - boost::shared_ptr<ListenerTargetT> pListener( rCurr.lock() ); + std::shared_ptr<ListenerTargetT> pListener( rCurr.lock() ); if( pListener && func(pListener) ) return true; @@ -152,11 +152,11 @@ struct ListenerOperations< boost::weak_ptr<ListenerTargetT> > bool bRet(false); for( const auto& rCurr : rContainer ) { - boost::shared_ptr<ListenerTargetT> pListener( rCurr.lock() ); + std::shared_ptr<ListenerTargetT> pListener( rCurr.lock() ); if( pListener.get() && FunctionApply< typename ::std::result_of< FuncT( const typename ContainerT::value_type& ) >::type, - boost::shared_ptr<ListenerTargetT> >::apply(func,pListener) ) + std::shared_ptr<ListenerTargetT> >::apply(func,pListener) ) { bRet = true; } diff --git a/slideshow/source/inc/mouseeventhandler.hxx b/slideshow/source/inc/mouseeventhandler.hxx index 2a7d716e1170..0a25b4170bab 100644 --- a/slideshow/source/inc/mouseeventhandler.hxx +++ b/slideshow/source/inc/mouseeventhandler.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_MOUSEEVENTHANDLER_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_MOUSEEVENTHANDLER_HXX -#include <boost/shared_ptr.hpp> +#include <memory> namespace com { namespace sun { namespace star { namespace awt { @@ -107,7 +107,7 @@ namespace slideshow virtual bool handleMouseMoved( const css::awt::MouseEvent& e ) = 0; }; - typedef ::boost::shared_ptr< MouseEventHandler > MouseEventHandlerSharedPtr; + typedef ::std::shared_ptr< MouseEventHandler > MouseEventHandlerSharedPtr; } } diff --git a/slideshow/source/inc/numberanimation.hxx b/slideshow/source/inc/numberanimation.hxx index 23f3fa99ea11..147b24fa5925 100644 --- a/slideshow/source/inc/numberanimation.hxx +++ b/slideshow/source/inc/numberanimation.hxx @@ -63,7 +63,7 @@ namespace slideshow virtual ValueType getUnderlyingValue() const = 0; }; - typedef ::boost::shared_ptr< NumberAnimation > NumberAnimationSharedPtr; + typedef ::std::shared_ptr< NumberAnimation > NumberAnimationSharedPtr; } } diff --git a/slideshow/source/inc/pairanimation.hxx b/slideshow/source/inc/pairanimation.hxx index 34897964b44b..ae28f9b44fcc 100644 --- a/slideshow/source/inc/pairanimation.hxx +++ b/slideshow/source/inc/pairanimation.hxx @@ -62,7 +62,7 @@ namespace slideshow virtual ValueType getUnderlyingValue() const = 0; }; - typedef ::boost::shared_ptr< PairAnimation > PairAnimationSharedPtr; + typedef ::std::shared_ptr< PairAnimation > PairAnimationSharedPtr; } } diff --git a/slideshow/source/inc/pauseeventhandler.hxx b/slideshow/source/inc/pauseeventhandler.hxx index faa758be25fe..6ac8971ae834 100644 --- a/slideshow/source/inc/pauseeventhandler.hxx +++ b/slideshow/source/inc/pauseeventhandler.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_PAUSEEVENTHANDLER_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_PAUSEEVENTHANDLER_HXX -#include <boost/shared_ptr.hpp> +#include <memory> /* Definition of PauseHandler interface */ @@ -56,7 +56,7 @@ namespace slideshow ~PauseEventHandler() {} }; - typedef ::boost::shared_ptr< PauseEventHandler > PauseEventHandlerSharedPtr; + typedef ::std::shared_ptr< PauseEventHandler > PauseEventHandlerSharedPtr; } } diff --git a/slideshow/source/inc/screenupdater.hxx b/slideshow/source/inc/screenupdater.hxx index 85075e870e1a..384e676c6f50 100644 --- a/slideshow/source/inc/screenupdater.hxx +++ b/slideshow/source/inc/screenupdater.hxx @@ -115,7 +115,7 @@ namespace slideshow locked. When <FALSE/> then Activate() has to be called in order to lock the lock. */ - ::boost::shared_ptr<UpdateLock> createLock (const bool bStartLocked); + ::std::shared_ptr<UpdateLock> createLock (const bool bStartLocked); /** Lock updates to prevent intermediate repaints. */ diff --git a/slideshow/source/inc/shape.hxx b/slideshow/source/inc/shape.hxx index 7bcb7147a72a..59bbd99b71d3 100644 --- a/slideshow/source/inc/shape.hxx +++ b/slideshow/source/inc/shape.hxx @@ -28,8 +28,8 @@ #include "viewlayer.hxx" -#include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> +#include <memory> #include <set> #include <vector> @@ -44,7 +44,7 @@ namespace slideshow // forward declaration necessary, because methods use ShapeSharedPtr class Shape; - typedef ::boost::shared_ptr< Shape > ShapeSharedPtr; + typedef ::std::shared_ptr< Shape > ShapeSharedPtr; /** Represents a slide's shape object. @@ -249,7 +249,7 @@ namespace slideshow }; }; - typedef ::boost::shared_ptr< Shape > ShapeSharedPtr; + typedef ::std::shared_ptr< Shape > ShapeSharedPtr; /** A set which contains all shapes in an ordered fashion. */ diff --git a/slideshow/source/inc/shapeattributelayer.hxx b/slideshow/source/inc/shapeattributelayer.hxx index c4b23db7fbdc..31c8ebaf1e78 100644 --- a/slideshow/source/inc/shapeattributelayer.hxx +++ b/slideshow/source/inc/shapeattributelayer.hxx @@ -32,7 +32,7 @@ #include "rgbcolor.hxx" #include <stack> -#include <boost/shared_ptr.hpp> +#include <memory> namespace slideshow @@ -67,11 +67,11 @@ namespace slideshow ; }; - typedef ::boost::shared_ptr< State > StateSharedPtr; + typedef ::std::shared_ptr< State > StateSharedPtr; class ShapeAttributeLayer; - typedef ::boost::shared_ptr< ShapeAttributeLayer > ShapeAttributeLayerSharedPtr; + typedef ::std::shared_ptr< ShapeAttributeLayer > ShapeAttributeLayerSharedPtr; /** Encapsulates all modifiable attributes of a shape. diff --git a/slideshow/source/inc/shapelistenereventhandler.hxx b/slideshow/source/inc/shapelistenereventhandler.hxx index b52c3d2c9886..fbbd6ef38ae3 100644 --- a/slideshow/source/inc/shapelistenereventhandler.hxx +++ b/slideshow/source/inc/shapelistenereventhandler.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SLIDESHOW_SOURCE_INC_SHAPELISTENEREVENTHANDLER_HXX #include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace com { namespace sun { namespace star { namespace drawing { @@ -55,7 +55,7 @@ namespace slideshow const css::uno::Reference<css::drawing::XShape>& xShape ) = 0; }; - typedef ::boost::shared_ptr< ShapeListenerEventHandler > ShapeListenerEventHandlerSharedPtr; + typedef ::std::shared_ptr< ShapeListenerEventHandler > ShapeListenerEventHandlerSharedPtr; } } diff --git a/slideshow/source/inc/shapemanager.hxx b/slideshow/source/inc/shapemanager.hxx index 1a81e024f7b5..c2c72e231f76 100644 --- a/slideshow/source/inc/shapemanager.hxx +++ b/slideshow/source/inc/shapemanager.hxx @@ -22,7 +22,7 @@ #include "disposable.hxx" #include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace com { namespace sun { namespace star { namespace drawing { class XShape; @@ -55,7 +55,7 @@ namespace slideshow after a corresponding number of leaveAnimationMode() calls. */ - virtual void enterAnimationMode( const boost::shared_ptr<AnimatableShape>& rShape ) = 0; + virtual void enterAnimationMode( const std::shared_ptr<AnimatableShape>& rShape ) = 0; /** Notify the ShapeManager that the given Shape is no longer animated. @@ -66,7 +66,7 @@ namespace slideshow to call this method more often than enterAnimationMode(). */ - virtual void leaveAnimationMode( const boost::shared_ptr<AnimatableShape>& rShape ) = 0; + virtual void leaveAnimationMode( const std::shared_ptr<AnimatableShape>& rShape ) = 0; /** Notify that a shape needs an update @@ -77,7 +77,7 @@ namespace slideshow @param rShape Shape which needs an update */ - virtual void notifyShapeUpdate( const boost::shared_ptr<Shape>& rShape ) = 0; + virtual void notifyShapeUpdate( const std::shared_ptr<Shape>& rShape ) = 0; /** Lookup a Shape from an XShape model object @@ -88,7 +88,7 @@ namespace slideshow The XShape object, for which the representing Shape should be looked up. */ - virtual boost::shared_ptr<Shape> lookupShape( + virtual std::shared_ptr<Shape> lookupShape( css::uno::Reference< css::drawing::XShape > const & xShape ) const = 0; /** Register given shape as a hyperlink target @@ -98,10 +98,10 @@ namespace slideshow hyperlink region lookup. Must be in absolute user space coordinates. */ - virtual void addHyperlinkArea( const boost::shared_ptr<HyperlinkArea>& rArea ) = 0; + virtual void addHyperlinkArea( const std::shared_ptr<HyperlinkArea>& rArea ) = 0; }; - typedef ::boost::shared_ptr< ShapeManager > ShapeManagerSharedPtr; + typedef ::std::shared_ptr< ShapeManager > ShapeManagerSharedPtr; } } diff --git a/slideshow/source/inc/shapemaps.hxx b/slideshow/source/inc/shapemaps.hxx index 87fce1eefd2d..83d665af7598 100644 --- a/slideshow/source/inc/shapemaps.hxx +++ b/slideshow/source/inc/shapemaps.hxx @@ -23,7 +23,7 @@ #include <comphelper/interfacecontainer2.hxx> #include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <map> namespace com { namespace sun { namespace star { namespace drawing @@ -39,7 +39,7 @@ namespace slideshow { /// Maps XShape to shape listener typedef ::std::map< css::uno::Reference< css::drawing::XShape>, - boost::shared_ptr< ::comphelper::OInterfaceContainerHelper2 > + std::shared_ptr< ::comphelper::OInterfaceContainerHelper2 > > ShapeEventListenerMap; /// Maps XShape to mouse cursor diff --git a/slideshow/source/inc/shapesubset.hxx b/slideshow/source/inc/shapesubset.hxx index 6405da78ab1d..b1241870edfc 100644 --- a/slideshow/source/inc/shapesubset.hxx +++ b/slideshow/source/inc/shapesubset.hxx @@ -24,14 +24,14 @@ #include "subsettableshapemanager.hxx" #include "doctreenode.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> namespace slideshow { namespace internal { class ShapeSubset; - typedef ::boost::shared_ptr< ShapeSubset > ShapeSubsetSharedPtr; + typedef ::std::shared_ptr< ShapeSubset > ShapeSubsetSharedPtr; /* Definition of ShapeSubset class */ diff --git a/slideshow/source/inc/slide.hxx b/slideshow/source/inc/slide.hxx index 264b2a235bd5..8715931bf33b 100644 --- a/slideshow/source/inc/slide.hxx +++ b/slideshow/source/inc/slide.hxx @@ -26,7 +26,7 @@ #include "slidebitmap.hxx" #include "shapemaps.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> namespace com { namespace sun { namespace star { namespace drawing { @@ -149,7 +149,7 @@ namespace slideshow ~Slide() {} }; - typedef ::boost::shared_ptr< Slide > SlideSharedPtr; + typedef ::std::shared_ptr< Slide > SlideSharedPtr; class EventQueue; class CursorManager; diff --git a/slideshow/source/inc/slidebitmap.hxx b/slideshow/source/inc/slidebitmap.hxx index cce00ae09c81..6d3d0b974b50 100644 --- a/slideshow/source/inc/slidebitmap.hxx +++ b/slideshow/source/inc/slidebitmap.hxx @@ -27,7 +27,7 @@ #include <basegfx/point/b2dpoint.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/noncopyable.hpp> namespace com { namespace sun { namespace star { namespace rendering @@ -77,7 +77,7 @@ namespace slideshow css::uno::Reference< css::rendering::XBitmap > mxBitmap; }; - typedef ::boost::shared_ptr< SlideBitmap > SlideBitmapSharedPtr; + typedef ::std::shared_ptr< SlideBitmap > SlideBitmapSharedPtr; } } diff --git a/slideshow/source/inc/slideshowcontext.hxx b/slideshow/source/inc/slideshowcontext.hxx index 3f414aa8ab4d..7c1907321760 100644 --- a/slideshow/source/inc/slideshowcontext.hxx +++ b/slideshow/source/inc/slideshowcontext.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SLIDESHOW_SOURCE_INC_SLIDESHOWCONTEXT_HXX #include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace com{ namespace sun{ namespace star{ namespace uno { @@ -81,7 +81,7 @@ namespace slideshow @param rComponentContext To create UNO services from */ - SlideShowContext( boost::shared_ptr<SubsettableShapeManager>& rSubsettableShapeManager, + SlideShowContext( std::shared_ptr<SubsettableShapeManager>& rSubsettableShapeManager, EventQueue& rEventQueue, EventMultiplexer& rEventMultiplexer, ScreenUpdater& rScreenUpdater, @@ -92,7 +92,7 @@ namespace slideshow const css::uno::Reference< css::uno::XComponentContext>& rComponentContext ); void dispose(); - boost::shared_ptr<SubsettableShapeManager>& mpSubsettableShapeManager; + std::shared_ptr<SubsettableShapeManager>& mpSubsettableShapeManager; EventQueue& mrEventQueue; EventMultiplexer& mrEventMultiplexer; ScreenUpdater& mrScreenUpdater; diff --git a/slideshow/source/inc/soundplayer.hxx b/slideshow/source/inc/soundplayer.hxx index 1d6da3d0fbcf..737103512dec 100644 --- a/slideshow/source/inc/soundplayer.hxx +++ b/slideshow/source/inc/soundplayer.hxx @@ -26,7 +26,7 @@ #include <com/sun/star/media/XManager.hpp> #include <com/sun/star/media/XPlayer.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include "pauseeventhandler.hxx" #include "disposable.hxx" @@ -61,7 +61,7 @@ namespace slideshow the sound file is invalid, or not supported by the player service. */ - static ::boost::shared_ptr<SoundPlayer> create( + static ::std::shared_ptr<SoundPlayer> create( EventMultiplexer & rEventMultiplexer, const OUString& rSoundURL, const css::uno::Reference< css::uno::XComponentContext>& rComponentContext ); @@ -97,11 +97,11 @@ namespace slideshow EventMultiplexer & mrEventMultiplexer; // TODO(Q3): obsolete when boost::enable_shared_ptr_from_this // is available - ::boost::shared_ptr<SoundPlayer> mThis; + ::std::shared_ptr<SoundPlayer> mThis; css::uno::Reference< css::media::XPlayer > mxPlayer; }; - typedef ::boost::shared_ptr< SoundPlayer > SoundPlayerSharedPtr; + typedef ::std::shared_ptr< SoundPlayer > SoundPlayerSharedPtr; } } diff --git a/slideshow/source/inc/stringanimation.hxx b/slideshow/source/inc/stringanimation.hxx index 686edab66291..2cb26c0a94b5 100644 --- a/slideshow/source/inc/stringanimation.hxx +++ b/slideshow/source/inc/stringanimation.hxx @@ -61,7 +61,7 @@ namespace slideshow virtual ValueType getUnderlyingValue() const = 0; }; - typedef ::boost::shared_ptr< StringAnimation > StringAnimationSharedPtr; + typedef ::std::shared_ptr< StringAnimation > StringAnimationSharedPtr; } } diff --git a/slideshow/source/inc/subsettableshapemanager.hxx b/slideshow/source/inc/subsettableshapemanager.hxx index 54cc34db4200..5f6c5f473cc0 100644 --- a/slideshow/source/inc/subsettableshapemanager.hxx +++ b/slideshow/source/inc/subsettableshapemanager.hxx @@ -22,7 +22,7 @@ #include "shapemanager.hxx" #include "intrinsicanimationeventhandler.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> /* Definition of SubsettableShapeManager interface */ @@ -62,8 +62,8 @@ namespace slideshow @param rSubsetShape The subset to display in the generated shape. */ - 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 ) = 0; /** Revoke a previously queried subset shape. @@ -80,8 +80,8 @@ namespace slideshow The subset created from rOrigShape */ virtual void revokeSubset( - const boost::shared_ptr<AttributableShape>& rOrigShape, - const boost::shared_ptr<AttributableShape>& rSubsetShape ) = 0; + const std::shared_ptr<AttributableShape>& rOrigShape, + const std::shared_ptr<AttributableShape>& rSubsetShape ) = 0; // Evil hackish way of getting intrinsic animation slide-wise @@ -103,7 +103,7 @@ namespace slideshow virtual void notifyIntrinsicAnimationsDisabled() = 0; }; - typedef ::boost::shared_ptr< SubsettableShapeManager > SubsettableShapeManagerSharedPtr; + typedef ::std::shared_ptr< SubsettableShapeManager > SubsettableShapeManagerSharedPtr; } } diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx index 8075743d3ad4..811face5ca6c 100644 --- a/slideshow/source/inc/tools.hxx +++ b/slideshow/source/inc/tools.hxx @@ -37,8 +37,7 @@ #include "rgbcolor.hxx" #include "hslcolor.hxx" -#include <boost/shared_ptr.hpp> - +#include <memory> #include <functional> #include <cstdlib> #include <string.h> @@ -67,7 +66,7 @@ namespace slideshow class Shape; class ShapeAttributeLayer; - typedef ::boost::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr; + typedef ::std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr; template <typename T> inline ::std::size_t hash_value( T const * p ) @@ -123,49 +122,49 @@ namespace slideshow /// extract unary double value from Any bool extractValue( double& o_rValue, const css::uno::Any& rSourceAny, - const boost::shared_ptr<Shape>& rShape, + const std::shared_ptr<Shape>& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract int from Any bool extractValue( sal_Int32& o_rValue, const css::uno::Any& rSourceAny, - const boost::shared_ptr<Shape>& rShape, + const std::shared_ptr<Shape>& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract enum/constant group value from Any bool extractValue( sal_Int16& o_rValue, const css::uno::Any& rSourceAny, - const boost::shared_ptr<Shape>& rShape, + const std::shared_ptr<Shape>& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract color value from Any bool extractValue( RGBColor& o_rValue, const css::uno::Any& rSourceAny, - const boost::shared_ptr<Shape>& rShape, + const std::shared_ptr<Shape>& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract color value from Any bool extractValue( HSLColor& o_rValue, const css::uno::Any& rSourceAny, - const boost::shared_ptr<Shape>& rShape, + const std::shared_ptr<Shape>& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract plain string from Any bool extractValue( OUString& o_rValue, const css::uno::Any& rSourceAny, - const boost::shared_ptr<Shape>& rShape, + const std::shared_ptr<Shape>& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract bool value from Any bool extractValue( bool& o_rValue, const css::uno::Any& rSourceAny, - const boost::shared_ptr<Shape>& rShape, + const std::shared_ptr<Shape>& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract double 2-tuple from Any bool extractValue( basegfx::B2DTuple& o_rPair, const css::uno::Any& rSourceAny, - const boost::shared_ptr<Shape>& rShape, + const std::shared_ptr<Shape>& rShape, const basegfx::B2DVector& rSlideBounds ); /** Search a sequence of NamedValues for a given element. @@ -191,7 +190,7 @@ namespace slideshow */ basegfx::B2DHomMatrix getShapeTransformation( const basegfx::B2DRange& rBounds, - const boost::shared_ptr<ShapeAttributeLayer>& pAttr ); + const std::shared_ptr<ShapeAttributeLayer>& pAttr ); /** Get a shape's sprite transformation from the attribute set @@ -211,7 +210,7 @@ namespace slideshow basegfx::B2DHomMatrix getSpriteTransformation( const basegfx::B2DVector& rPixelSize, const basegfx::B2DVector& rOrigSize, - const boost::shared_ptr<ShapeAttributeLayer>& pAttr ); + const std::shared_ptr<ShapeAttributeLayer>& pAttr ); /** Calc update area for a shape. @@ -234,7 +233,7 @@ namespace slideshow basegfx::B2DRange getShapeUpdateArea( const basegfx::B2DRange& rUnitBounds, const basegfx::B2DHomMatrix& rShapeTransform, - const boost::shared_ptr<ShapeAttributeLayer>& pAttr ); + const std::shared_ptr<ShapeAttributeLayer>& pAttr ); /** Calc update area for a shape. @@ -267,7 +266,7 @@ namespace slideshow */ basegfx::B2DRange getShapePosSize( const basegfx::B2DRange& rOrigBounds, - const boost::shared_ptr<ShapeAttributeLayer>& pAttr ); + const std::shared_ptr<ShapeAttributeLayer>& pAttr ); /** Convert a plain UNO API 32 bit int to RGBColor */ diff --git a/slideshow/source/inc/unoviewcontainer.hxx b/slideshow/source/inc/unoviewcontainer.hxx index a82e12eafc41..c1f013e41e2c 100644 --- a/slideshow/source/inc/unoviewcontainer.hxx +++ b/slideshow/source/inc/unoviewcontainer.hxx @@ -22,10 +22,10 @@ #include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> #include <vector> +#include <memory> #include "unoview.hxx" @@ -82,7 +82,7 @@ namespace slideshow UnoViewVector maViews; }; - typedef ::boost::shared_ptr< UnoViewContainer > UnoViewContainerSharedPtr; + typedef ::std::shared_ptr< UnoViewContainer > UnoViewContainerSharedPtr; } } diff --git a/slideshow/source/inc/usereventqueue.hxx b/slideshow/source/inc/usereventqueue.hxx index 00d6d955a64f..25225266dcd1 100644 --- a/slideshow/source/inc/usereventqueue.hxx +++ b/slideshow/source/inc/usereventqueue.hxx @@ -228,7 +228,7 @@ private: register it via the Functor */ template< typename Handler, typename Functor > - void registerEvent( ::boost::shared_ptr< Handler >& rHandler, + void registerEvent( ::std::shared_ptr< Handler >& rHandler, const EventSharedPtr& rEvent, const Functor& rRegistrationFunctor ); @@ -241,7 +241,7 @@ private: rHandler's addEvent() method. */ template< typename Handler, typename Arg, typename Functor > - void registerEvent( ::boost::shared_ptr< Handler >& rHandler, + void registerEvent( ::std::shared_ptr< Handler >& rHandler, const EventSharedPtr& rEvent, const Arg& rArg, const Functor& rRegistrationFunctor ); @@ -250,16 +250,16 @@ private: EventQueue& mrEventQueue; CursorManager& mrCursorManager; - ::boost::shared_ptr<AllAnimationEventHandler> mpAnimationStartEventHandler; - ::boost::shared_ptr<AllAnimationEventHandler> mpAnimationEndEventHandler; - ::boost::shared_ptr<AllAnimationEventHandler> mpAudioStoppedEventHandler; - ::boost::shared_ptr<ShapeClickEventHandler> mpShapeClickEventHandler; - ::boost::shared_ptr<ClickEventHandler> mpClickEventHandler; - ::boost::shared_ptr<SkipEffectEventHandler> mpSkipEffectEventHandler; - ::boost::shared_ptr<ShapeClickEventHandler> mpShapeDoubleClickEventHandler; - ::boost::shared_ptr<ClickEventHandler> mpDoubleClickEventHandler; - ::boost::shared_ptr<MouseEnterHandler> mpMouseEnterHandler; - ::boost::shared_ptr<MouseLeaveHandler> mpMouseLeaveHandler; + ::std::shared_ptr<AllAnimationEventHandler> mpAnimationStartEventHandler; + ::std::shared_ptr<AllAnimationEventHandler> mpAnimationEndEventHandler; + ::std::shared_ptr<AllAnimationEventHandler> mpAudioStoppedEventHandler; + ::std::shared_ptr<ShapeClickEventHandler> mpShapeClickEventHandler; + ::std::shared_ptr<ClickEventHandler> mpClickEventHandler; + ::std::shared_ptr<SkipEffectEventHandler> mpSkipEffectEventHandler; + ::std::shared_ptr<ShapeClickEventHandler> mpShapeDoubleClickEventHandler; + ::std::shared_ptr<ClickEventHandler> mpDoubleClickEventHandler; + ::std::shared_ptr<MouseEnterHandler> mpMouseEnterHandler; + ::std::shared_ptr<MouseLeaveHandler> mpMouseLeaveHandler; bool mbAdvanceOnClick; }; diff --git a/slideshow/source/inc/view.hxx b/slideshow/source/inc/view.hxx index bce9d0c75217..1eaea033793a 100644 --- a/slideshow/source/inc/view.hxx +++ b/slideshow/source/inc/view.hxx @@ -22,7 +22,7 @@ #include "viewlayer.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> diff --git a/slideshow/source/inc/vieweventhandler.hxx b/slideshow/source/inc/vieweventhandler.hxx index 9f4aa3d80a4c..1c658bb90ace 100644 --- a/slideshow/source/inc/vieweventhandler.hxx +++ b/slideshow/source/inc/vieweventhandler.hxx @@ -20,10 +20,10 @@ #ifndef INCLUDED_SLIDESHOW_SOURCE_INC_VIEWEVENTHANDLER_HXX #define INCLUDED_SLIDESHOW_SOURCE_INC_VIEWEVENTHANDLER_HXX -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> +#include <memory> #include "unoview.hxx" +#include "disposable.hxx" /* Definition of ViewEventHandler interface */ @@ -39,7 +39,7 @@ namespace slideshow EventMultiplexer object, and are called from there to handle view events. */ - class ViewEventHandler + class ViewEventHandler : public virtual SharedPtrAble { public: virtual ~ViewEventHandler() {} @@ -82,8 +82,8 @@ namespace slideshow virtual void viewsChanged() = 0; }; - typedef ::boost::shared_ptr< ViewEventHandler > ViewEventHandlerSharedPtr; - typedef ::boost::weak_ptr< ViewEventHandler > ViewEventHandlerWeakPtr; + typedef ::std::shared_ptr< ViewEventHandler > ViewEventHandlerSharedPtr; + typedef ::std::weak_ptr< ViewEventHandler > ViewEventHandlerWeakPtr; } } diff --git a/slideshow/source/inc/viewlayer.hxx b/slideshow/source/inc/viewlayer.hxx index b3d3a8d647ad..0b701d472b1e 100644 --- a/slideshow/source/inc/viewlayer.hxx +++ b/slideshow/source/inc/viewlayer.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SLIDESHOW_SOURCE_INC_VIEWLAYER_HXX #include <sal/config.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <com/sun/star/geometry/IntegerSize2D.hpp> namespace basegfx diff --git a/slideshow/source/inc/viewupdate.hxx b/slideshow/source/inc/viewupdate.hxx index d6fe16f89532..8c2e512ba3d9 100644 --- a/slideshow/source/inc/viewupdate.hxx +++ b/slideshow/source/inc/viewupdate.hxx @@ -22,7 +22,7 @@ #include "disposable.hxx" #include "view.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> /* Definition of ViewUpdate interface */ @@ -54,7 +54,7 @@ namespace slideshow virtual bool needsUpdate() const = 0; }; - typedef ::boost::shared_ptr< ViewUpdate > ViewUpdateSharedPtr; + typedef ::std::shared_ptr< ViewUpdate > ViewUpdateSharedPtr; } } diff --git a/slideshow/source/inc/wakeupevent.hxx b/slideshow/source/inc/wakeupevent.hxx index 9a29c61fb60d..441579cd5c3e 100644 --- a/slideshow/source/inc/wakeupevent.hxx +++ b/slideshow/source/inc/wakeupevent.hxx @@ -76,7 +76,7 @@ private: ActivitiesQueue& mrActivityQueue; }; -typedef ::boost::shared_ptr< WakeupEvent > WakeupEventSharedPtr; +typedef ::std::shared_ptr< WakeupEvent > WakeupEventSharedPtr; } // namespace internal } // namespace presentation diff --git a/slideshow/test/tests.hxx b/slideshow/test/tests.hxx index 7ce77859903e..71971b65d0e9 100644 --- a/slideshow/test/tests.hxx +++ b/slideshow/test/tests.hxx @@ -22,7 +22,7 @@ #include "animatableshape.hxx" #include "unoview.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> namespace basegfx{ class B1DRange; class B2DRange; class B2DVector; } @@ -37,10 +37,10 @@ public: virtual bool wasClipSet() const = 0; virtual basegfx::B2DRange getBounds() const = 0; - virtual std::vector<boost::shared_ptr<TestView> > getViewLayers() const = 0; + virtual std::vector<std::shared_ptr<TestView> > getViewLayers() const = 0; }; -typedef boost::shared_ptr<TestView> TestViewSharedPtr; +typedef std::shared_ptr<TestView> TestViewSharedPtr; TestViewSharedPtr createTestView(); @@ -54,7 +54,7 @@ public: virtual sal_Int32 getAnimationCount() const = 0; }; -typedef boost::shared_ptr<TestShape> TestShapeSharedPtr; +typedef std::shared_ptr<TestShape> TestShapeSharedPtr; TestShapeSharedPtr createTestShape(const basegfx::B2DRange& rRect, double nPrio); diff --git a/slideshow/test/testview.cxx b/slideshow/test/testview.cxx index 9538e928872c..bac8ab5998ec 100644 --- a/slideshow/test/testview.cxx +++ b/slideshow/test/testview.cxx @@ -160,7 +160,7 @@ public: return maBounds; } - virtual std::vector<boost::shared_ptr<TestView> > getViewLayers() const + virtual std::vector<std::shared_ptr<TestView> > getViewLayers() const { return maViewLayers; } |