diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-19 09:50:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-19 11:31:51 +0200 |
commit | 836c40904f4424a5b7ae708171a7aab53141761a (patch) | |
tree | 5f84c7b9d57aface755ef6f4b11ccc1deb1da9c6 /chart2/source/view/main/ShapeFactory.cxx | |
parent | 4959b71cbc91dbe2c454d1d7bf2092c01c4f0cae (diff) |
loplugin:referencecasting in canvas..chart2
Change-Id: I3a3671b5c44d1a7e5ca320d3d76dd5d902382cbc
Reviewed-on: https://gerrit.libreoffice.org/75935
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view/main/ShapeFactory.cxx')
-rw-r--r-- | chart2/source/view/main/ShapeFactory.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 5d1ab0096ae1..3bcd72ff2904 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -2382,9 +2382,8 @@ uno::Reference< drawing::XShape > //set text and text properties uno::Reference< text::XText > xText( xShape, uno::UNO_QUERY ); uno::Reference< text::XTextCursor > xTextCursor( xText->createTextCursor() ); - uno::Reference< text::XTextRange > xTextRange( xTextCursor, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY ); - if( !xText.is() || !xTextRange.is() || !xTextCursor.is() || !xShapeProp.is() || !xTextProperties.is() ) + if( !xText.is() || !xTextCursor.is() || !xShapeProp.is() || !xTextProperties.is() ) return xShape; tPropertyNameValueMap aValueMap; @@ -2439,7 +2438,7 @@ uno::Reference< drawing::XShape > aLabel = ShapeFactory::getStackedString( aLabel, bStackCharacters ); xTextCursor->gotoEnd(false); - xText->insertString( xTextRange, aLabel, false ); + xText->insertString( xTextCursor, aLabel, false ); xTextCursor->gotoEnd(true); uno::Reference< beans::XPropertySet > xTargetProps( xShape, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xSourceProps( xFormattedString[0], uno::UNO_QUERY ); @@ -2461,7 +2460,7 @@ uno::Reference< drawing::XShape > for( nN=0; nN<xFormattedString.getLength();nN++ ) { xTextCursor->gotoEnd(false); - xText->insertString( xTextRange, xFormattedString[nN]->getString(), false ); + xText->insertString( xTextCursor, xFormattedString[nN]->getString(), false ); xTextCursor->gotoEnd(true); } awt::Size aOldRefSize; |