diff options
author | weigao <weigao@multicorewareinc.com> | 2014-08-03 14:38:06 +0800 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-08-06 20:45:12 +0200 |
commit | f7fef1c333971ff92e390834df1d0eae8ffadec2 (patch) | |
tree | 10e289d3817ea0995717685f930d03c3d7bd87c7 | |
parent | af01f14c8752c38b900f3536cd6791778dd2d209 (diff) |
add scene limit code for scroll mode
Change-Id: Id6ce3aa55b286a300476f3609d1e1994ce2c2768
-rw-r--r-- | chart2/source/view/charttypes/GL3DBarChart.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 69003e2c37b3..3e27e98af4f0 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -563,7 +563,7 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer glm::vec3 aBegin; aBegin.y = nYPos; glm::vec3 aEnd = aBegin; - aEnd.x = nXEnd; + aEnd.x = BENCH_MARK_MODE ? (mbScrollFlg ? nXEnd - BAR_SIZE_X : nXEnd) : nXEnd; pAxis->setPosition(aBegin, aEnd); pAxis->setLineColor(COL_BLUE); @@ -583,7 +583,7 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer opengl3D::Rectangle* pRect = static_cast<opengl3D::Rectangle*>(&maShapes.back()); glm::vec3 aTopLeft; glm::vec3 aTopRight = aTopLeft; - aTopRight.x = nXEnd + 2 * BAR_DISTANCE_X; + aTopRight.x = BENCH_MARK_MODE ? (mbScrollFlg ? nXEnd - BAR_SIZE_X : nXEnd + 2 * BAR_DISTANCE_X) : (nXEnd + 2 * BAR_DISTANCE_X); glm::vec3 aBottomRight = aTopRight; aBottomRight.y = nYPos; pRect->setPosition(aTopLeft, aTopRight, aBottomRight); @@ -597,6 +597,8 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer uno::Sequence<OUString> aCats = rCatProvider.getSimpleCategories(); for (sal_Int32 i = 0; i < aCats.getLength(); ++i) { + if (BENCH_MARK_MODE && mbScrollFlg && (i + 1 == aCats.getLength())) + break; maCategories.push_back(aCats[i]); if(aCats[i].isEmpty()) continue; |