Kaydet (Commit) a49b453a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clean up function declarations and some unused functions

Change-Id: Ia821ca4d03a467620b3ea6ea2520f0d177a5724d
üst 1531b523
......@@ -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;
......
......@@ -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"
......
......@@ -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"
......
......@@ -232,8 +232,6 @@ namespace slideshow
~LayerEndUpdate() { if(mpLayer) mpLayer->endUpdate(); }
void dismiss() { mpLayer.reset(); }
private:
LayerSharedPtr mpLayer;
};
......
......@@ -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;
......
......@@ -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
......
......@@ -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 );
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment