diff options
author | Christina Rossmanith <ChrRossmanith@web.de> | 2012-03-20 13:51:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-20 13:51:48 +0000 |
commit | fdd18639075f6ac7b3ec2ff735e7de2bdf550964 (patch) | |
tree | 979e07e57ae09afdcfc1edf3c17ad66c85d2bf32 /sdext | |
parent | Remove unused code (diff) | |
download | core-fdd18639075f6ac7b3ec2ff735e7de2bdf550964.tar.gz core-fdd18639075f6ac7b3ec2ff735e7de2bdf550964.zip |
Remove unused code (sdext)
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/presenter/PresenterAnimation.cxx | 31 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterAnimation.hxx | 17 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterAnimator.cxx | 11 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterAnimator.hxx | 8 |
4 files changed, 2 insertions, 65 deletions
diff --git a/sdext/source/presenter/PresenterAnimation.cxx b/sdext/source/presenter/PresenterAnimation.cxx index cacf98d74444..b5c30ec64d9f 100644 --- a/sdext/source/presenter/PresenterAnimation.cxx +++ b/sdext/source/presenter/PresenterAnimation.cxx @@ -47,9 +47,7 @@ PresenterAnimation::PresenterAnimation ( const sal_uInt64 nStepDuration) : mnStartTime(GetCurrentTime()+nStartDelay), mnTotalDuration(nTotalDuration), - mnStepDuration(nStepDuration), - mpStartCallbacks(), - mpEndCallbacks() + mnStepDuration(nStepDuration) { } @@ -72,33 +70,6 @@ sal_uInt64 PresenterAnimation::GetStepDuration (void) return mnStepDuration; } -void PresenterAnimation::AddEndCallback (const Callback& rCallback) -{ - if (mpEndCallbacks.get() == NULL) - mpEndCallbacks.reset(new ::std::vector<Callback>()); - mpEndCallbacks->push_back(rCallback); -} - -void PresenterAnimation::RunStartCallbacks (void) -{ - if (mpStartCallbacks.get() != NULL) - { - ::std::vector<Callback>::const_iterator iCallback; - for (iCallback=mpStartCallbacks->begin(); iCallback!=mpStartCallbacks->end(); ++iCallback) - (*iCallback)(); - } -} - -void PresenterAnimation::RunEndCallbacks (void) -{ - if (mpEndCallbacks.get() != NULL) - { - ::std::vector<Callback>::const_iterator iCallback; - for (iCallback=mpEndCallbacks->begin(); iCallback!=mpEndCallbacks->end(); ++iCallback) - (*iCallback)(); - } -} - } } // end of namespace ::sdext::presenter /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterAnimation.hxx b/sdext/source/presenter/PresenterAnimation.hxx index fdd8de60ef70..8c2ce42bef34 100644 --- a/sdext/source/presenter/PresenterAnimation.hxx +++ b/sdext/source/presenter/PresenterAnimation.hxx @@ -83,11 +83,6 @@ public: typedef ::boost::function<void(void)> Callback; - /** Add a callback that is executed after Run() is called for the last - time. - */ - void AddEndCallback (const Callback& rCallback); - /** Called with nProgress taking on values between 0 and 1. @param nProgress A value between 0 and 1. @@ -96,22 +91,10 @@ public: */ virtual void Run (const double nProgress, const sal_uInt64 nCurrentTime) = 0; - /** Called just before Run() is called for the first time to trigger the - callbacks registered via the <method>AddStartCallback()</method>. - */ - void RunStartCallbacks (void); - - /** Called just after Run() is called for the last time to trigger the - callbacks registered via the <method>AddEndCallback()</method>. - */ - void RunEndCallbacks (void); - private: const sal_uInt64 mnStartTime; const sal_uInt64 mnTotalDuration; const sal_uInt64 mnStepDuration; - ::boost::scoped_ptr<std::vector<Callback> > mpStartCallbacks; - ::boost::scoped_ptr<std::vector<Callback> > mpEndCallbacks; }; sal_uInt64 GetCurrentTime (void); diff --git a/sdext/source/presenter/PresenterAnimator.cxx b/sdext/source/presenter/PresenterAnimator.cxx index 55c9fd516c23..a401c2a866c7 100644 --- a/sdext/source/presenter/PresenterAnimator.cxx +++ b/sdext/source/presenter/PresenterAnimator.cxx @@ -52,14 +52,6 @@ PresenterAnimator::~PresenterAnimator (void) PresenterTimer::CancelTask(mnCurrentTaskId); } -void PresenterAnimator::AddAnimation (const SharedPresenterAnimation& rpAnimation) -{ - ::osl::MutexGuard aGuard (m_aMutex); - - maFutureAnimations.insert(AnimationList::value_type(rpAnimation->GetStartTime(), rpAnimation)); - ScheduleNextRun(); -} - void PresenterAnimator::Process (void) { ::osl::MutexGuard aGuard (m_aMutex); @@ -96,8 +88,6 @@ void PresenterAnimator::Process (void) AnimationList::value_type( nCurrentTime + pAnimation->GetStepDuration(), pAnimation)); - else - pAnimation->RunEndCallbacks(); } ScheduleNextRun(); @@ -111,7 +101,6 @@ void PresenterAnimator::ActivateAnimations (const sal_uInt64 nCurrentTime) SharedPresenterAnimation pAnimation (maFutureAnimations.begin()->second); maActiveAnimations.insert(*maFutureAnimations.begin()); maFutureAnimations.erase(maFutureAnimations.begin()); - pAnimation->RunStartCallbacks(); } } diff --git a/sdext/source/presenter/PresenterAnimator.hxx b/sdext/source/presenter/PresenterAnimator.hxx index 073592b69947..2ee352271aef 100644 --- a/sdext/source/presenter/PresenterAnimator.hxx +++ b/sdext/source/presenter/PresenterAnimator.hxx @@ -37,8 +37,7 @@ namespace sdext { namespace presenter { -/** Simple animation management. Call AddAnimation to run animations - concurrently or one of the other. See PresenterAnimation for details of +/** Simple animation management. See PresenterAnimation for details of how to specify animations. */ class PresenterAnimator @@ -49,11 +48,6 @@ public: PresenterAnimator (void); virtual ~PresenterAnimator (void); - /** Add an animation. The time at which to start and end this animation - is provided by the animation itself. - */ - void AddAnimation (const SharedPresenterAnimation& rpAnimation); - private: typedef ::std::multimap<sal_uInt64,SharedPresenterAnimation> AnimationList; AnimationList maFutureAnimations; |