[Libreoffice-commits] core.git: 2 commits - chart2/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Tue May 27 13:31:11 PDT 2014


 chart2/source/view/charttypes/GL3DBarChart.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit f656fdeeeae66e06a559ac7eec9e1a2e5aff3114
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue May 27 22:25:18 2014 +0200

    remove one more magic number that is used in several places
    
    Change-Id: I83949b592d75899d28d9792508685e58d103ae16

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 3e9bbbc..8e1a307 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -62,6 +62,7 @@ namespace {
 
 const float TEXT_HEIGHT = 15.0f;
 const float DEFAULT_CAMERA_HEIGHT = 500.0f;
+const size_t STEPS = 100;
 const sal_uLong TIMEOUT = 5;
 
 float calculateTextWidth(const OUString& rText)
@@ -311,7 +312,7 @@ void GL3DBarChart::clickedAt(const Point& /*rPos*/, sal_uInt16 nButtons)
     mbBlockUserInput = true;
 
     const BarInformation& rBarInfo = itr->second;
-    mnStepsTotal = 100;
+    mnStepsTotal = STEPS;
     mnStep = 0;
     maCameraDirection = rBarInfo.maPos;
     render();
@@ -383,7 +384,7 @@ glm::vec3 GL3DBarChart::getCornerPosition(sal_Int8 nId)
 
 void GL3DBarChart::moveToCorner()
 {
-    mnStepsTotal = 100;
+    mnStepsTotal = STEPS;
     maStep = (getCornerPosition(mnCornerId) - maCameraPosition) / float(mnStepsTotal);
     maTimer.SetTimeout(TIMEOUT);
     maTimer.SetTimeoutHdl(LINK(this, GL3DBarChart, MoveCamera));
commit 35078f372dfba02ccb09050a74a56d266148d4d8
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue May 27 22:24:42 2014 +0200

    let us look from the top onto the chart
    
    Change-Id: I700c5f6799ba59eb858d1a12807dc7e37c4a3900

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 8f70d05..3e9bbbc 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -61,8 +61,8 @@ GL3DBarChart::~GL3DBarChart()
 namespace {
 
 const float TEXT_HEIGHT = 15.0f;
+const float DEFAULT_CAMERA_HEIGHT = 500.0f;
 const sal_uLong TIMEOUT = 5;
-const float DEFAULT_CAMERA_HEIGHT = 200.0f;
 
 float calculateTextWidth(const OUString& rText)
 {


More information about the Libreoffice-commits mailing list