From 60fd8f0f4490ed46dbe41b315e590cd9ce997807 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Wed, 1 Jan 2014 17:27:23 +0100 Subject: remove leftover pieces to amke factory clearly stateless again Change-Id: I0744ebed41cc1c9bbf40ef2caecb8d97baf177e6 --- chart2/source/view/inc/OpenglShapeFactory.hxx | 4 ++-- chart2/source/view/main/OpenglShapeFactory.cxx | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'chart2') diff --git a/chart2/source/view/inc/OpenglShapeFactory.hxx b/chart2/source/view/inc/OpenglShapeFactory.hxx index 95f99b146038..77c3fd297a72 100644 --- a/chart2/source/view/inc/OpenglShapeFactory.hxx +++ b/chart2/source/view/inc/OpenglShapeFactory.hxx @@ -16,6 +16,8 @@ namespace chart { namespace opengl { +// This class is stateless!!!!! +// Don't add member variables class OpenglShapeFactory : public chart::AbstractShapeFactory { public: @@ -193,8 +195,6 @@ public: virtual void setPageSize( com::sun::star::uno::Reference < com::sun::star::drawing::XShapes > xChartShapes, const com::sun::star::awt::Size& rSize ); virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) SAL_OVERRIDE; -private: - void *m_pChart; }; diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx index 041539a53963..f14636cbb13e 100644 --- a/chart2/source/view/main/OpenglShapeFactory.cxx +++ b/chart2/source/view/main/OpenglShapeFactory.cxx @@ -122,13 +122,8 @@ uno::Reference< drawing::XShapes > OpenglShapeFactory::getOrCreateChartRootShape uno::Reference< drawing::XShape > xTarget (m_xShapeFactory->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), uno::UNO_QUERY ); dummy::DummyChart *pChart = new dummy::DummyChart(xTarget); - m_pChart = (void *)pChart; SvxDummyShapeContainer* pContainer = new SvxDummyShapeContainer(pChart); xRet = pChart; -#if 0 - xRet = new dummy::DummyChart(); - m_pChart = (void *)((dummy::DummyChart *)xRet); -#endif xDrawPage->add(xTarget); xDrawPage->add(pContainer); } @@ -321,7 +316,6 @@ uno::Reference< drawing::XShape > rPosition.PositionX - (rSize.DirectionX / 2.0), rPosition.PositionY - (rSize.DirectionY / 2.0), rPosition.PositionZ ); - dummy::DummyChart *pChart = (dummy::DummyChart *)m_pChart; dummy::DummyCircle* pCircle = new dummy::DummyCircle(Position3DToAWTPoint( aCenterPosition ), Direction3DToAWTSize( rSize )); xTarget->add(pCircle); -- cgit