diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-10-05 16:53:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-10-05 16:55:15 +0200 |
commit | cc7556740640e1b3f8730b939e21eaa882abc031 (patch) | |
tree | de9bf6ea2f7dd37d3a069f7556dedcd4f1952818 /sw/source | |
parent | c30defcf8e34daec6ea0455d772fe296cc26ecc9 (diff) |
Return rtl::Reference from ShapeTypeHandler::CreateAccessibleObject
...and handle related fallout
Change-Id: Ie82d853a9bf28b359d5aab9d0af01b728d68ed70
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/access/accmap.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index dbfa78d47dd8..6fc60b36d18e 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -2028,7 +2028,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( if( !xAcc.is() && bCreate ) { - ::accessibility::AccessibleShape *pAcc = nullptr; + rtl::Reference< ::accessibility::AccessibleShape> pAcc; uno::Reference < drawing::XShape > xShape( const_cast< SdrObject * >( pObj )->getUnoShape(), uno::UNO_QUERY ); @@ -2043,7 +2043,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( pAcc = rShapeTypeHandler.CreateAccessibleObject( aShapeInfo, mpShapeMap->GetInfo() ); } - xAcc = pAcc; + xAcc = pAcc.get(); OSL_ENSURE( xAcc.is(), "unknown shape type" ); if( xAcc.is() ) @@ -3204,11 +3204,11 @@ bool SwAccessibleMap::ReplaceChild ( ::accessibility::ShapeTypeHandler::Instance(); ::accessibility::AccessibleShapeInfo aShapeInfo( xShape, xParent, this ); - ::accessibility::AccessibleShape* pReplacement = + rtl::Reference< ::accessibility::AccessibleShape> pReplacement( rShapeTypeHandler.CreateAccessibleObject ( - aShapeInfo, mpShapeMap->GetInfo() ); + aShapeInfo, mpShapeMap->GetInfo() )); - uno::Reference < XAccessible > xAcc( pReplacement ); + uno::Reference < XAccessible > xAcc( pReplacement.get() ); if( xAcc.is() ) { pReplacement->Init(); |