diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-10-15 16:38:55 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-11-19 13:47:37 +0100 |
commit | eb26543b113f0421dbc1fffc220dc36df0542b6b (patch) | |
tree | 7e99c7262dcf506f109364eac5f37d6ff65287d4 /chart2 | |
parent | ca121aff307bcc0272282e04963679863df09b1e (diff) |
implement top level shape and method to get it
This class contains the glcontext
Change-Id: If0418cfbfb0486396a75ab274e7b480607f8de6d
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/inc/DummyXShape.hxx | 18 | ||||
-rw-r--r-- | chart2/source/view/main/DummyXShape.cxx | 13 |
2 files changed, 31 insertions, 0 deletions
diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx index 93b1936f395d..fde04f6fa1cd 100644 --- a/chart2/source/view/inc/DummyXShape.hxx +++ b/chart2/source/view/inc/DummyXShape.hxx @@ -32,6 +32,10 @@ namespace chart { namespace dummy { +class DummyChart; + +struct OpenglContext; + class DummyXShape : public cppu::WeakImplHelper5< ::com::sun::star::drawing::XShape, com::sun::star::beans::XPropertySet, @@ -72,6 +76,8 @@ public: virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + virtual DummyChart* getRootShape(); + private: OUString maName; com::sun::star::awt::Point maPosition; @@ -81,6 +87,18 @@ private: }; +class DummyChart : public DummyXShape +{ +public: + virtual DummyChart* getRootShape(); + + OpenglContext* getGlContext() { return mpContext; } + +private: + OpenglContext* mpContext; +}; + + class DummyXShapes : public DummyXShape, public com::sun::star::drawing::XShapes { public: diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 39bac9ed3147..807216be4fef 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -155,6 +155,19 @@ void DummyXShape::setParent( const uno::Reference< uno::XInterface >& xParent ) mxParent = xParent; } +DummyChart* DummyXShape::getRootShape() +{ + assert(mxParent.is()); + DummyXShape* pParent = dynamic_cast<DummyXShape*>(mxParent.get()); + assert(pParent); + return pParent->getRootShape(); +} + +DummyChart* DummyChart::getRootShape() +{ + return this; +} + uno::Any DummyXShapes::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException) { |