diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-09-23 13:52:24 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-09-23 13:54:57 -0400 |
commit | 7c1686a6e493cec75e77fa6647c33b537e493457 (patch) | |
tree | f373f62daa1f0dc20fb37c2874ae2cea6730b067 | |
parent | 3a4f5b47222a399d0745c4ae5eb000f4e75a7041 (diff) |
Some cleanup on Timer.
Use a different name for handler as 'updateTimer' is also used as
a method name within the same class. Also no need to set the interval
repeatedly & no need to stop the timer when it times out.
Change-Id: I430bc26b945d179c87310eaefd9d94986192841c
-rw-r--r-- | chart2/source/view/charttypes/GL3DBarChart.cxx | 6 | ||||
-rw-r--r-- | chart2/source/view/inc/GL3DBarChart.hxx | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 625ee69e734e..05738d7a6157 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -561,7 +561,7 @@ GL3DBarChart::GL3DBarChart( mbAutoFly = atoi(aAutoFly); } maTimer.SetTimeout(DATA_UPDATE_TIME); - maTimer.SetTimeoutHdl(LINK(this, GL3DBarChart, updateTimer)); + maTimer.SetTimeoutHdl(LINK(this, GL3DBarChart, UpdateTimerHdl)); maTimer.Start(); osl_getSystemTime(&maFPSRenderStartTime); osl_getSystemTime(&maFPSRenderEndTime); @@ -1474,11 +1474,9 @@ void GL3DBarChart::processAutoFly(sal_uInt32 nId, sal_uInt32 nColor) } } -IMPL_LINK_NOARG(GL3DBarChart, updateTimer) +IMPL_LINK_NOARG(GL3DBarChart, UpdateTimerHdl) { - maTimer.Stop(); updateScreenText(); - maTimer.SetTimeout(DATA_UPDATE_TIME); maTimer.Start(); return 0; } diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx index 30607e627d82..79d816d25f88 100644 --- a/chart2/source/view/inc/GL3DBarChart.hxx +++ b/chart2/source/view/inc/GL3DBarChart.hxx @@ -101,7 +101,7 @@ private: void updateScreenText(); void updateRenderFPS(); void updateDataUpdateFPS(); - DECL_LINK(updateTimer, void*); + DECL_LINK(UpdateTimerHdl, void*); int calcTimeInterval(TimeValue &startTime, TimeValue &endTime); float addScreenTextShape(OUString &nStr, glm::vec2 aLeftOrRightTop, float nTextHeight, bool bLeftTopFlag = true, const glm::vec4& rColor = glm::vec4(0.0f, 1.0f, 1.0f, 0.0f), |