summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-05-13 05:12:55 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-13 05:29:23 +0200
commit9fbafe9fe867fa727ce38612bd24431afd0100c1 (patch)
treed00bfa3705c1ff2633834c748f2f5526ec2f0ce4 /chart2
parentf02999aa267c40876f29edf37d39694b619e69ba (diff)
rerender after redrawing of the window
Change-Id: Ia967ba08a9bd0499ae5fb0865492783834204963
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx14
-rw-r--r--chart2/source/view/inc/GL3DBarChart.hxx6
2 files changed, 18 insertions, 2 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index a5d4a36bcee5..c164bd27ee24 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -33,10 +33,13 @@ GL3DBarChart::GL3DBarChart(
mrWindow(rWindow),
mrCatProvider(rCatProvider)
{
+ mrWindow.setRenderer(this);
+ mpRenderer->init();
}
GL3DBarChart::~GL3DBarChart()
{
+ mrWindow.setRenderer(NULL);
}
void GL3DBarChart::create3DShapes()
@@ -166,7 +169,6 @@ void GL3DBarChart::render()
{
mrWindow.getContext()->makeCurrent();
Size aSize = mrWindow.GetSizePixel();
- mpRenderer->init();
mpRenderer->SetSize(aSize);
mrWindow.getContext()->setWinSize(aSize);
for(boost::ptr_vector<opengl3D::Renderable3DObject>::iterator itr = maShapes.begin(),
@@ -178,6 +180,16 @@ void GL3DBarChart::render()
mrWindow.getContext()->swapBuffers();
}
+void GL3DBarChart::update()
+{
+ render();
+}
+
+void GL3DBarChart::clickedAt(const Point& )
+{
+
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx
index 7a1733e1eae3..7c1fc511ef2d 100644
--- a/chart2/source/view/inc/GL3DBarChart.hxx
+++ b/chart2/source/view/inc/GL3DBarChart.hxx
@@ -29,7 +29,7 @@ class OpenGL3DRenderer;
}
-class GL3DBarChart : public GL3DPlotterBase
+class GL3DBarChart : public GL3DPlotterBase, public IRenderer
{
public:
GL3DBarChart(
@@ -43,6 +43,10 @@ public:
virtual void render() SAL_OVERRIDE;
+ virtual void update() SAL_OVERRIDE;
+
+ virtual void clickedAt(const Point& rPos) SAL_OVERRIDE;
+
private:
css::uno::Reference<css::chart2::XChartType> mxChartType;
const boost::ptr_vector<VDataSeries>& maDataSeries;