Kaydet (Commit) eb26543b authored tarafından Markus Mohrhard's avatar Markus Mohrhard

implement top level shape and method to get it

This class contains the glcontext

Change-Id: If0418cfbfb0486396a75ab274e7b480607f8de6d
üst ca121aff
...@@ -32,6 +32,10 @@ namespace chart { ...@@ -32,6 +32,10 @@ namespace chart {
namespace dummy { namespace dummy {
class DummyChart;
struct OpenglContext;
class DummyXShape : public cppu::WeakImplHelper5< class DummyXShape : public cppu::WeakImplHelper5<
::com::sun::star::drawing::XShape, ::com::sun::star::drawing::XShape,
com::sun::star::beans::XPropertySet, com::sun::star::beans::XPropertySet,
...@@ -72,6 +76,8 @@ public: ...@@ -72,6 +76,8 @@ public:
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); 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 sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
virtual DummyChart* getRootShape();
private: private:
OUString maName; OUString maName;
com::sun::star::awt::Point maPosition; com::sun::star::awt::Point maPosition;
...@@ -81,6 +87,18 @@ private: ...@@ -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 class DummyXShapes : public DummyXShape, public com::sun::star::drawing::XShapes
{ {
public: public:
......
...@@ -155,6 +155,19 @@ void DummyXShape::setParent( const uno::Reference< uno::XInterface >& xParent ) ...@@ -155,6 +155,19 @@ void DummyXShape::setParent( const uno::Reference< uno::XInterface >& xParent )
mxParent = 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 ) uno::Any DummyXShapes::queryInterface( const uno::Type& rType )
throw(uno::RuntimeException) throw(uno::RuntimeException)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment