chart2/inc/ChartView.hxx | 2 ++ chart2/source/view/main/ChartView.cxx | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-)
New commits: commit d9f93ced823ee7d695cdd39d5124b67e07886ed7 Author: Markus Mohrhard <[email protected]> Date: Sun Jun 1 17:38:39 2014 +0200 extract the rendering code in ChartView We need it for the IOpenGLRenderer interface. Change-Id: Ic9f425b44c0efdd30956eba13ef03ba7179d35a4 diff --git a/chart2/inc/ChartView.hxx b/chart2/inc/ChartView.hxx index 156bf8a..ab552f9 100644 --- a/chart2/inc/ChartView.hxx +++ b/chart2/inc/ChartView.hxx @@ -214,6 +214,8 @@ private: //methods void impl_updateView(); + void render(); + ::com::sun::star::awt::Rectangle impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlotterContainer , const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes>& xDiagramPlusAxes_Shapes , const ::com::sun::star::awt::Point& rAvailablePos diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index a2355df..f9b7d70 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2615,13 +2615,7 @@ void ChartView::createShapes() //cleanup: remove all empty group shapes to avoid grey border lines: lcl_removeEmptyGroupShapes( mxRootShape ); - OpenGLWindow* pWindow = mrChartModel.getOpenGLWindow(); - bool bRender = pShapeFactory->preRender(pWindow); - if(bRender) - { - pShapeFactory->render(mxRootShape); - pShapeFactory->postRender(pWindow); - } + render(); if(maTimeBased.bTimeBased && maTimeBased.nFrame % 60 == 0) { @@ -2676,6 +2670,18 @@ void ChartView::createShapes() } } +void ChartView::render() +{ + AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory); + OpenGLWindow* pWindow = mrChartModel.getOpenGLWindow(); + bool bRender = pShapeFactory->preRender(pWindow); + if(bRender) + { + pShapeFactory->render(mxRootShape); + pShapeFactory->postRender(pWindow); + } +} + // util::XEventListener (base of XCloseListener) void SAL_CALL ChartView::disposing( const lang::EventObject& /* rSource */ ) throw(uno::RuntimeException, std::exception) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
