diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-12-13 12:05:19 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-01-29 08:09:19 +0100 |
commit | 7a24673115ca7492c3176034321f6beb77576b7d (patch) | |
tree | 0774f4af6ad7a1358e63b770369016d47d9c0db1 /chart2 | |
parent | ba5285f4e1b9f15a55e6ec40ea1ea916af9a3280 (diff) |
add ugly hack to work around SvxDrawPage::add only accepting SvxShape
Change-Id: I77c292b088a1a1797fba10cc514167a1f3dca917
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/Library_chartopengl.mk | 1 | ||||
-rw-r--r-- | chart2/source/view/main/OpenglShapeFactory.cxx | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/chart2/Library_chartopengl.mk b/chart2/Library_chartopengl.mk index 220012e351ab..2532fc3c4f83 100644 --- a/chart2/Library_chartopengl.mk +++ b/chart2/Library_chartopengl.mk @@ -35,6 +35,7 @@ $(eval $(call gb_Library_use_libraries,chartopengl,\ cppu \ cppuhelper \ sal \ + svxcore \ vcl \ $(gb_UWINAPI) \ )) diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx index 65a73084a793..5a6ecb77d989 100644 --- a/chart2/source/view/main/OpenglShapeFactory.cxx +++ b/chart2/source/view/main/OpenglShapeFactory.cxx @@ -46,6 +46,7 @@ #include <rtl/math.hxx> #include <svx/svdocirc.hxx> #include <svx/svdopath.hxx> +#include <svx/unoshape.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/matrix/b3dhommatrix.hxx> @@ -95,7 +96,7 @@ uno::Reference< drawing::XShapes > getChartShape( xProp->getPropertyValue( UNO_NAME_MISC_OBJ_NAME ) >>= aRet; if( aRet.equals("com.sun.star.chart2.shapes") ) { - xRet = uno::Reference< drawing::XShapes >( xShape, uno::UNO_QUERY ); + xRet = dynamic_cast<SvxDummyShapeContainer*>(xShape.get())->getWrappedShape(); break; } } @@ -119,12 +120,13 @@ uno::Reference< drawing::XShapes > OpenglShapeFactory::getOrCreateChartRootShape "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(uno::Reference< drawing::XShape >(xRet, uno::UNO_QUERY_THROW)); + xDrawPage->add(pContainer); } return xRet; } |