From 35b6d31154edd32d68e2cf8d91fe852f32945fcf Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Tue, 22 Oct 2013 19:54:44 +0200 Subject: fix crash in opengl backend Change-Id: I1257f4568e55ca545e96bda8a53f272ba8e1f0b0 --- chart2/source/view/inc/DummyXShape.hxx | 3 ++- chart2/source/view/main/DummyXShape.cxx | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'chart2') diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx index 0d56924df1c6..6cc963036e96 100644 --- a/chart2/source/view/inc/DummyXShape.hxx +++ b/chart2/source/view/inc/DummyXShape.hxx @@ -100,7 +100,7 @@ class DummyChart; struct OpenglContext; -class DummyXShape : public cppu::WeakImplHelper6< +class DummyXShape : public cppu::WeakAggImplHelper6< ::com::sun::star::drawing::XShape, com::sun::star::beans::XPropertySet, com::sun::star::beans::XMultiPropertySet, @@ -364,6 +364,7 @@ class DummyXShapes : public DummyXShape, public com::sun::star::drawing::XShapes public: virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); + virtual com::sun::star::uno::Any SAL_CALL queryAggregation( const com::sun::star::uno::Type& rType ) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL acquire() throw(); virtual void SAL_CALL release() throw(); diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 0708ad8eb8e1..164c10f4758a 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -396,12 +396,29 @@ DummyChart* DummyChart::getRootShape() return this; } +#define QUERYINT( xint ) \ + if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \ + aAny <<= uno::Reference< xint >(this) + uno::Any DummyXShapes::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException) { return DummyXShape::queryInterface(rType); } +uno::Any DummyXShapes::queryAggregation( const uno::Type & rType ) + throw(uno::RuntimeException) +{ + uno::Any aAny; + + //QUERYINT( drawing::XShapeGroup ); + QUERYINT( drawing::XShapes ); + else + return DummyXShape::queryAggregation( rType ); + + return aAny; +} + void DummyXShapes::acquire() throw() { -- cgit