diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2018-03-25 15:23:47 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-04 11:03:43 +0200 |
commit | 09ba4f15ec88b820fed66be339170da2fbbf11dd (patch) | |
tree | e5c58ae6a64be36b9b9f081cbed8c74429a9319a /include | |
parent | cba73f04699592c7038156f91ed92be026ed2536 (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>
(cherry picked from commit d312ff2b52c0ea2e2864518a36f6b432653c8297)
Reviewed-on: https://gerrit.libreoffice.org/52010
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-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 47ccf96ec19f..698e5c2f18e3 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 |