summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-14 18:10:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-14 18:10:00 +0200
commita49b453ad32e155217e51affc2a0b1a1b09174dd (patch)
tree1225b500f71e1ccfab23a2265324efc192ca9dcc /slideshow
parent1531b523bf6a3379739d2ec12c96ca7b94f60a65 (diff)
Clean up function declarations and some unused functions
Change-Id: Ia821ca4d03a467620b3ea6ea2520f0d177a5724d
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx8
-rw-r--r--slideshow/source/engine/animationnodes/generateevent.cxx1
-rw-r--r--slideshow/source/engine/shapes/drawinglayeranimation.cxx1
-rw-r--r--slideshow/source/engine/slide/layer.cxx2
-rw-r--r--slideshow/source/engine/slide/userpaintoverlay.cxx10
-rw-r--r--slideshow/source/engine/sp_debug.cxx50
-rw-r--r--slideshow/source/engine/usereventqueue.cxx63
-rw-r--r--slideshow/source/inc/usereventqueue.hxx3
8 files changed, 5 insertions, 133 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index 0440d9b49f43..56a080bd5c1e 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -636,14 +636,6 @@ inline basegfx::B2DVector clamp(const basegfx::B2DVector& v)
min(max(v.getY(),-1.0),1.0));
}
-// TODO(Q3): extract to basegfx
-inline basegfx::B3DVector clamp(const basegfx::B3DVector& v)
-{
- return basegfx::B3DVector(min(max(v.getX(),-1.0),1.0),
- min(max(v.getY(),-1.0),1.0),
- min(max(v.getZ(),-1.0),1.0));
-}
-
inline double randFromNeg1to1()
{
return ( ( static_cast<double>( rand() ) / static_cast<double>( RAND_MAX ) ) * 2.0 ) - 1.0;
diff --git a/slideshow/source/engine/animationnodes/generateevent.cxx b/slideshow/source/engine/animationnodes/generateevent.cxx
index 6e44563fe8dd..65a3421793b7 100644
--- a/slideshow/source/engine/animationnodes/generateevent.cxx
+++ b/slideshow/source/engine/animationnodes/generateevent.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/animations/EventTrigger.hpp>
#include <com/sun/star/animations/Event.hpp>
+#include "generateevent.hxx"
#include "shape.hxx"
#include "subsettableshapemanager.hxx"
#include "usereventqueue.hxx"
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
index ea5f511bd4d8..84193010dcac 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
@@ -42,6 +42,7 @@
#include "activity.hxx"
#include "wakeupevent.hxx"
#include "eventqueue.hxx"
+#include "drawinglayeranimation.hxx"
#include "drawshapesubsetting.hxx"
#include "drawshape.hxx"
#include "shapesubset.hxx"
diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx
index 42af078a277a..f6e2eab66f1e 100644
--- a/slideshow/source/engine/slide/layer.cxx
+++ b/slideshow/source/engine/slide/layer.cxx
@@ -232,8 +232,6 @@ namespace slideshow
~LayerEndUpdate() { if(mpLayer) mpLayer->endUpdate(); }
- void dismiss() { mpLayer.reset(); }
-
private:
LayerSharedPtr mpLayer;
};
diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx
index 142f88951787..9f56ae00a1d6 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.cxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.cxx
@@ -444,16 +444,6 @@ namespace slideshow
return false; // did not handle the event
}
-
- void update_settings( bool bUserPaintEnabled, RGBColor const& aUserPaintColor, double dUserPaintStrokeWidth )
- {
- maStrokeColor = aUserPaintColor;
- mnStrokeWidth = dUserPaintStrokeWidth;
- mbActive = bUserPaintEnabled;
- if( !mbActive )
- disable();
- }
-
private:
ScreenUpdater& mrScreenUpdater;
UnoViewVector maViews;
diff --git a/slideshow/source/engine/sp_debug.cxx b/slideshow/source/engine/sp_debug.cxx
index c481401c7077..a94980958199 100644
--- a/slideshow/source/engine/sp_debug.cxx
+++ b/slideshow/source/engine/sp_debug.cxx
@@ -32,8 +32,11 @@
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
#include <boost/assert.hpp>
+#include <boost/scoped_array.hpp>
+#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/detail/lightweight_mutex.hpp>
+#include <canvas/debug.hxx>
#include <cstdlib>
#include <map>
#include <deque>
@@ -192,53 +195,6 @@ std::size_t find_unreachable_objects(bool report)
return m2.size();
}
-typedef std::deque< boost::shared_ptr<X> > free_list_type;
-
-static void scan_and_free(void * area, size_t size, map2_type const & m2, free_list_type & free)
-{
- unsigned char * p = static_cast<unsigned char *>(area);
-
- for(size_t n = 0; n + sizeof(shared_ptr_layout) <= size; p += pointer_align, n += pointer_align)
- {
- shared_ptr_layout * q = reinterpret_cast<shared_ptr_layout *>(p);
-
- if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != 0 && m2.count(q->pn.pi) != 0 && q->px != 0)
- {
- boost::shared_ptr<X> * ppx = reinterpret_cast< boost::shared_ptr<X> * >(p);
- free.push_back(*ppx);
- ppx->reset();
- }
- }
-}
-
-void free_unreachable_objects()
-{
- free_list_type free;
-
- {
- map2_type m2;
-
-#ifdef BOOST_HAS_THREADS
-
- mutex_type::scoped_lock lock(get_mutex());
-
-#endif
-
- map_type const & m = get_map();
-
- find_unreachable_objects_impl(m, m2);
-
- 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());
- scan_and_free(i->second.first, i->second.second, m2, free);
- }
- }
-
- std::cout << "... about to free " << free.size() << " objects.\n";
-}
-
// debug hooks
namespace boost
diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx
index 38fb738c6cf9..1d4ce3cf765b 100644
--- a/slideshow/source/engine/usereventqueue.cxx
+++ b/slideshow/source/engine/usereventqueue.cxx
@@ -127,27 +127,6 @@ protected:
} // anon namespace
-class PlainEventHandler : public EventHandler,
- public EventContainer
-{
-public:
- PlainEventHandler( EventQueue & rEventQueue )
- : EventContainer(), mrEventQueue(rEventQueue) {}
-
- virtual void dispose()
- {
- clearContainer();
- }
-
- virtual bool handleEvent() SAL_OVERRIDE
- {
- return fireAllEvents( maEvents, mrEventQueue );
- }
-
-private:
- EventQueue & mrEventQueue;
-};
-
class AllAnimationEventHandler : public AnimationEventHandler
{
public:
@@ -205,22 +184,6 @@ public:
aIter->second.push_back( rEvent );
}
- bool isEmpty()
- {
- // find at least one animation with a non-empty vector
- ImpAnimationEventMap::const_iterator aCurr( maAnimationEventMap.begin() );
- const ImpAnimationEventMap::const_iterator aEnd( maAnimationEventMap.end() );
- while( aCurr != aEnd )
- {
- if( !aCurr->second.empty() )
- return false; // at least one non-empty entry found
-
- ++aCurr;
- }
-
- return true; // not a single non-empty entry found
- }
-
private:
EventQueue& mrEventQueue;
ImpAnimationEventMap maAnimationEventMap;
@@ -399,22 +362,6 @@ public:
aIter->second.push( rEvent );
}
- bool isEmpty()
- {
- // find at least one shape with a non-empty queue
- ImpShapeEventMap::reverse_iterator aCurrShape( maShapeEventMap.begin());
- ImpShapeEventMap::reverse_iterator aEndShape( maShapeEventMap.end() );
- while( aCurrShape != aEndShape )
- {
- if( !aCurrShape->second.empty() )
- return false; // at least one non-empty entry found
-
- ++aCurrShape;
- }
-
- return true; // not a single non-empty entry found
- }
-
protected:
bool hitTest( const awt::MouseEvent& e,
ImpShapeEventMap::reverse_iterator& o_rHitShape )
@@ -646,8 +593,6 @@ UserEventQueue::UserEventQueue( EventMultiplexer& rMultiplexer,
: mrMultiplexer( rMultiplexer ),
mrEventQueue( rEventQueue ),
mrCursorManager( rCursorManager ),
- mpStartEventHandler(),
- mpEndEventHandler(),
mpAnimationStartEventHandler(),
mpAnimationEndEventHandler(),
mpAudioStoppedEventHandler(),
@@ -679,14 +624,6 @@ UserEventQueue::~UserEventQueue()
void UserEventQueue::clear()
{
// unregister and delete all handlers
- if( mpStartEventHandler ) {
- mrMultiplexer.removeSlideStartHandler( mpStartEventHandler );
- mpStartEventHandler.reset();
- }
- if( mpEndEventHandler ) {
- mrMultiplexer.removeSlideEndHandler( mpEndEventHandler );
- mpEndEventHandler.reset();
- }
if( mpAnimationStartEventHandler ) {
mrMultiplexer.removeAnimationStartHandler(
mpAnimationStartEventHandler );
diff --git a/slideshow/source/inc/usereventqueue.hxx b/slideshow/source/inc/usereventqueue.hxx
index 401b99c518b4..ef6acad0f568 100644
--- a/slideshow/source/inc/usereventqueue.hxx
+++ b/slideshow/source/inc/usereventqueue.hxx
@@ -33,7 +33,6 @@
namespace slideshow {
namespace internal {
-class PlainEventHandler;
class AllAnimationEventHandler;
class ShapeClickEventHandler;
class ClickEventHandler;
@@ -261,8 +260,6 @@ private:
EventQueue& mrEventQueue;
CursorManager& mrCursorManager;
- ::boost::shared_ptr<PlainEventHandler> mpStartEventHandler;
- ::boost::shared_ptr<PlainEventHandler> mpEndEventHandler;
::boost::shared_ptr<AllAnimationEventHandler> mpAnimationStartEventHandler;
::boost::shared_ptr<AllAnimationEventHandler> mpAnimationEndEventHandler;
::boost::shared_ptr<AllAnimationEventHandler> mpAudioStoppedEventHandler;