summaryrefslogtreecommitdiff
path: root/chart2/source/view/main/DummyXShape.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/view/main/DummyXShape.cxx')
-rw-r--r--chart2/source/view/main/DummyXShape.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 5a0f88eaabb3..dc22de2da6f6 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -1143,11 +1143,11 @@ void DummyXShapes::render()
}
DummyChart::DummyChart(uno::Reference< drawing::XShape > xTarget):
- m_GLRender(xTarget)
+ m_GLRender(xTarget),
+ mbNotInit(true)
{
SAL_INFO("chart2.opengl", "DummyXShape::DummyChart()-----test: ");
setName("com.sun.star.chart2.shapes");
- m_GLRender.InitOpenGL();
}
void SAL_CALL DummyChart::setPosition( const awt::Point& aPosition )
@@ -1173,6 +1173,12 @@ void SAL_CALL DummyChart::setSize( const awt::Size& aSize )
void DummyChart::render()
{
+ if(mbNotInit)
+ {
+ m_GLRender.InitOpenGL();
+ mbNotInit = false;
+ }
+
SAL_INFO("chart2.opengl", "render chart");
m_GLRender.prepareToRender();
#if 0