diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2018-03-25 15:23:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-26 09:30:25 +0200 |
commit | d312ff2b52c0ea2e2864518a36f6b432653c8297 (patch) | |
tree | 34d1b98329a8a56b289d82299534d4120485f1ad /include/svx/sdr | |
parent | 42af2f3b2ebd6c559e92e487b9e19ab1e9cd6e33 (diff) |
tdf#112997 multiple animated gif only one frame
Not sure what the problem is, but using a vector and just making sure
we insert into the right spot for the sorting fixes it.
Change-Id: I11c08e08a14c98ba7eb6a5d925c75bab891ecf63
Reviewed-on: https://gerrit.libreoffice.org/51829
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx/sdr')
-rw-r--r-- | include/svx/sdr/animation/scheduler.hxx | 13 | ||||
-rw-r--r-- | include/svx/sdr/overlay/overlaymanager.hxx | 2 |
2 files changed, 5 insertions, 10 deletions
diff --git a/include/svx/sdr/animation/scheduler.hxx b/include/svx/sdr/animation/scheduler.hxx index 15eaa344b9d6..1ab5c7a92237 100644 --- a/include/svx/sdr/animation/scheduler.hxx +++ b/include/svx/sdr/animation/scheduler.hxx @@ -23,7 +23,7 @@ #include <sal/types.h> #include <vcl/timer.hxx> #include <svx/svxdllapi.h> -#include <o3tl/sorted_vector.hxx> +#include <vector> namespace sdr @@ -49,11 +49,6 @@ namespace sdr virtual void Trigger(sal_uInt32 nTime) = 0; }; - struct CompareEvent - { - bool operator()(Event* const& lhs, Event* const& rhs) const; - }; - class SVX_DLLPUBLIC Scheduler : public Timer { // time in ms @@ -62,8 +57,8 @@ namespace sdr // next delta time sal_uInt32 mnDeltaTime; - // list of events - o3tl::sorted_vector<Event*, CompareEvent> maList; + // list of events, sorted by time + std::vector<Event*> mvEvents; // Flag which remembers if this timer is paused. Default // is false. @@ -90,7 +85,7 @@ namespace sdr SAL_DLLPRIVATE void checkTimeout(); // insert/remove events, wrapper to EventList methods - void InsertEvent(Event* pNew); + void InsertEvent(Event& rNew); SAL_DLLPRIVATE void RemoveEvent(Event* pOld); // get/set pause diff --git a/include/svx/sdr/overlay/overlaymanager.hxx b/include/svx/sdr/overlay/overlaymanager.hxx index 0396ec7cdd98..25cae11e9dbc 100644 --- a/include/svx/sdr/overlay/overlaymanager.hxx +++ b/include/svx/sdr/overlay/overlaymanager.hxx @@ -131,7 +131,7 @@ namespace sdr // access to maDrawinglayerOpt const SvtOptionsDrawinglayer& getDrawinglayerOpt() const { return maDrawinglayerOpt; } - void InsertEvent(sdr::animation::Event* pNew) { Scheduler::InsertEvent(pNew); } + void InsertEvent(sdr::animation::Event& rNew) { Scheduler::InsertEvent(rNew); } }; } // end of namespace overlay } // end of namespace sdr |