diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-02 11:21:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-02 17:58:24 +0100 |
commit | 0249e598044b12e7f82cc6e95546687cfbbdfe38 (patch) | |
tree | d8240149ab83220d7e2bf425a981bfb453d51815 | |
parent | 5d33befeeb2452f1cfa0404483c71816fcd88314 (diff) |
use more SvxShape in chart2
Change-Id: Ib973fe1eb226ca6a55166ad8f3afeeca766ec8df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127860
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | chart2/source/view/inc/ShapeFactory.hxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/ShapeFactory.cxx | 21 |
2 files changed, 9 insertions, 14 deletions
diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx index 42468c1dd3e9..c61e6801a5ff 100644 --- a/chart2/source/view/inc/ShapeFactory.hxx +++ b/chart2/source/view/inc/ShapeFactory.hxx @@ -241,7 +241,7 @@ public: static css::uno::Reference< css::drawing::XShapes > getChartRootShape( const rtl::Reference<SvxDrawPage>& xPage ); - static void makeShapeInvisible( const css::uno::Reference< css::drawing::XShape >& xShape ); + static void makeShapeInvisible( const rtl::Reference< SvxShape >& rShape ); static void setShapeName( const css::uno::Reference< css::drawing::XShape >& xShape , const OUString& rName ); diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 7fd5249ae4d6..457045a25ac5 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -2335,21 +2335,16 @@ uno::Reference< drawing::XShapes > ShapeFactory::getChartRootShape( return xRet; } -void ShapeFactory::makeShapeInvisible( const uno::Reference< drawing::XShape >& xShape ) +void ShapeFactory::makeShapeInvisible( const rtl::Reference< SvxShape >& xShape ) { - uno::Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY ); - OSL_ENSURE(xShapeProp.is(), "created shape offers no XPropertySet"); - if( xShapeProp.is()) + try { - try - { - xShapeProp->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_NONE )); - xShapeProp->setPropertyValue( "FillStyle", uno::Any( drawing::FillStyle_NONE )); - } - catch( const uno::Exception& ) - { - TOOLS_WARN_EXCEPTION("chart2", "" ); - } + xShape->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_NONE )); + xShape->setPropertyValue( "FillStyle", uno::Any( drawing::FillStyle_NONE )); + } + catch( const uno::Exception& ) + { + TOOLS_WARN_EXCEPTION("chart2", "" ); } } |