summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-03-25 15:23:47 +0200
committerAndras Timar <andras.timar@collabora.com>2018-04-12 10:51:32 +0200
commitc02db5b88de76c49988d1cd0fd7738f8d3e7e37a (patch)
treeb2194d55d53bbb41d2e25bd030538ba94f4d55cf /include
parent749dc3060ff291e4c02731f18dddf5916e898896 (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/52009 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 2439b95b4d34e519aa2a5617a7f1e194b7864222)
Diffstat (limited to 'include')
-rw-r--r--include/svx/sdr/animation/scheduler.hxx13
-rw-r--r--include/svx/sdr/overlay/overlaymanager.hxx2
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