diff options
Diffstat (limited to 'svx/source/unodraw/unoshap2.cxx')
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 1ff2d3e03e9d..2c4487b4cec6 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -224,11 +224,7 @@ void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xS { ::SolarMutexGuard aGuard; - SdrObject* pSdrShape = nullptr; - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape ); - - if( pShape ) - pSdrShape = pShape->GetSdrObject(); + SdrObject* pSdrShape = SdrObject::getSdrObjectFromXShape( xShape ); if( !HasSdrObject() || pSdrShape == nullptr || pSdrShape->getParentSdrObjectFromSdrObject() != GetSdrObject() ) throw uno::RuntimeException(); @@ -414,10 +410,10 @@ void SAL_CALL SvxShapeConnector::connectStart( const uno::Reference< drawing::XC ::SolarMutexGuard aGuard; Reference< drawing::XShape > xRef( xShape, UNO_QUERY ); - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xRef ); + SdrObject* pSdrObject = SdrObject::getSdrObjectFromXShape( xRef ); - if( pShape ) - GetSdrObject()->ConnectToNode( true, pShape->GetSdrObject() ); + if( pSdrObject ) + GetSdrObject()->ConnectToNode( true, pSdrObject ); GetSdrObject()->getSdrModelFromSdrObject().SetChanged(); } @@ -428,10 +424,10 @@ void SAL_CALL SvxShapeConnector::connectEnd( const uno::Reference< drawing::XCon ::SolarMutexGuard aGuard; Reference< drawing::XShape > xRef( xShape, UNO_QUERY ); - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xRef ); + SdrObject* pSdrObject = SdrObject::getSdrObjectFromXShape( xRef ); - if( HasSdrObject() && pShape ) - GetSdrObject()->ConnectToNode( false, pShape->GetSdrObject() ); + if( HasSdrObject() && pSdrObject ) + GetSdrObject()->ConnectToNode( false, pSdrObject ); GetSdrObject()->getSdrModelFromSdrObject().SetChanged(); } |