diff options
Diffstat (limited to 'chart2/source/controller/accessibility/AccessibleChartShape.cxx')
-rw-r--r-- | chart2/source/controller/accessibility/AccessibleChartShape.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleChartShape.cxx b/chart2/source/controller/accessibility/AccessibleChartShape.cxx index cba557c683d7..d9c2f7071338 100644 --- a/chart2/source/controller/accessibility/AccessibleChartShape.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartShape.cxx @@ -38,27 +38,27 @@ AccessibleChartShape::AccessibleChartShape( const AccessibleElementInfo& rAccInfo ) :impl::AccessibleChartShape_Base( rAccInfo, true/*bMayHaveChildren*/, false/*bAlwaysTransparent*/ ) { - if ( rAccInfo.m_aOID.isAdditionalShape() ) - { - Reference< drawing::XShape > xShape( rAccInfo.m_aOID.getAdditionalShape() ); - Reference< XAccessible > xParent; - if ( rAccInfo.m_pParent ) - { - xParent.set( rAccInfo.m_pParent ); - } - ::accessibility::AccessibleShapeInfo aShapeInfo( xShape, xParent ); - - m_aShapeTreeInfo.SetSdrView( rAccInfo.m_pSdrView ); - m_aShapeTreeInfo.SetController( nullptr ); - m_aShapeTreeInfo.SetDevice( VCLUnoHelper::GetWindow( rAccInfo.m_xWindow ) ); - m_aShapeTreeInfo.SetViewForwarder( rAccInfo.m_pViewForwarder ); - - ::accessibility::ShapeTypeHandler& rShapeHandler = ::accessibility::ShapeTypeHandler::Instance(); - m_pAccShape = rShapeHandler.CreateAccessibleObject( aShapeInfo, m_aShapeTreeInfo ); - if ( m_pAccShape.is() ) - { - m_pAccShape->Init(); - } + if ( !rAccInfo.m_aOID.isAdditionalShape() ) + return; + + Reference< drawing::XShape > xShape( rAccInfo.m_aOID.getAdditionalShape() ); + Reference< XAccessible > xParent; + if ( rAccInfo.m_pParent ) + { + xParent.set( rAccInfo.m_pParent ); + } + ::accessibility::AccessibleShapeInfo aShapeInfo( xShape, xParent ); + + m_aShapeTreeInfo.SetSdrView( rAccInfo.m_pSdrView ); + m_aShapeTreeInfo.SetController( nullptr ); + m_aShapeTreeInfo.SetDevice( VCLUnoHelper::GetWindow( rAccInfo.m_xWindow ) ); + m_aShapeTreeInfo.SetViewForwarder( rAccInfo.m_pViewForwarder ); + + ::accessibility::ShapeTypeHandler& rShapeHandler = ::accessibility::ShapeTypeHandler::Instance(); + m_pAccShape = rShapeHandler.CreateAccessibleObject( aShapeInfo, m_aShapeTreeInfo ); + if ( m_pAccShape.is() ) + { + m_pAccShape->Init(); } } |