diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-11-09 10:21:49 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-11-09 10:28:49 +0000 |
commit | 0e0e3ea312dc09de6726318c3579671fec7de7ee (patch) | |
tree | fbd60fd3295dcfbc4c47fef164ede2594dde8a45 /include/svx/sdr | |
parent | d115a235bf3ff5366d992d01fb418a3eacb9d125 (diff) |
Revert "convert sdr::animation::EventList to o3tl::sorted_vector"
This reverts commit c0c69ccd2aac45e4cca0de7d4deaa6d02ec27f4d.
because soffice --headless --convert-to odp ooo75571-1.odp crashes
after this change
Diffstat (limited to 'include/svx/sdr')
-rw-r--r-- | include/svx/sdr/animation/scheduler.hxx | 49 |
1 files changed, 43 insertions, 6 deletions
diff --git a/include/svx/sdr/animation/scheduler.hxx b/include/svx/sdr/animation/scheduler.hxx index 15eaa344b9d6..1d1c16ac289d 100644 --- a/include/svx/sdr/animation/scheduler.hxx +++ b/include/svx/sdr/animation/scheduler.hxx @@ -23,24 +23,31 @@ #include <sal/types.h> #include <vcl/timer.hxx> #include <svx/svxdllapi.h> -#include <o3tl/sorted_vector.hxx> +// event class + namespace sdr { namespace animation { - class SVX_DLLPUBLIC Event { // time of event in ms sal_uInt32 mnTime; + // pointer for linked list sorted by mnTime + Event* mpNext; + public: // constructor/destructor SAL_DLLPRIVATE explicit Event(); virtual ~Event(); + // access to mpNext + SAL_DLLPRIVATE Event* GetNext() const { return mpNext; } + SAL_DLLPRIVATE void SetNext(Event* pNew); + // get/set time SAL_DLLPRIVATE sal_uInt32 GetTime() const { return mnTime; } void SetTime(sal_uInt32 nNew); @@ -48,12 +55,43 @@ namespace sdr // execute event virtual void Trigger(sal_uInt32 nTime) = 0; }; + } // end of namespace animation +} // end of namespace sdr + - struct CompareEvent +// eventlist class + +namespace sdr +{ + namespace animation + { + class SVX_DLLPUBLIC EventList { - bool operator()(Event* const& lhs, Event* const& rhs) const; + // pointer to first entry + Event* mpHead; + + public: + // constructor/destructor + SAL_DLLPRIVATE EventList(); + virtual ~EventList(); + + // insert/remove time dependent + SAL_DLLPRIVATE void Insert(Event* pNew); + SAL_DLLPRIVATE void Remove(Event* pOld); + + // get first + SAL_DLLPRIVATE Event* GetFirst() { return mpHead; } }; + } // end of namespace animation +} // end of namespace sdr + +// scheduler class + +namespace sdr +{ + namespace animation + { class SVX_DLLPUBLIC Scheduler : public Timer { // time in ms @@ -63,7 +101,7 @@ namespace sdr sal_uInt32 mnDeltaTime; // list of events - o3tl::sorted_vector<Event*, CompareEvent> maList; + EventList maList; // Flag which remembers if this timer is paused. Default // is false. @@ -97,7 +135,6 @@ namespace sdr SAL_DLLPRIVATE bool IsPaused() const { return mbIsPaused; } SAL_DLLPRIVATE void SetPaused(bool bNew); }; - } // end of namespace animation } // end of namespace sdr |