[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - 2 commits - chart2/source

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


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

New commits:
commit 7045ea82bcb361ba04bc21330cd1b043fff8cd9f
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 5b9f257..2e24f06 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)
@@ -333,7 +334,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();
@@ -405,7 +406,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 67d3d15c574601d7e1a649e8301c551dbcdd5072
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 c2b29c3..5b9f257 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