Simplify code
Change-Id: I2ac0564a5a6714111abdcff48edff070d75892b7
This commit is contained in:
@@ -705,15 +705,7 @@ namespace accessibility
|
|||||||
if( !aChild.is() )
|
if( !aChild.is() )
|
||||||
{
|
{
|
||||||
// there is no hard reference available, create object then
|
// there is no hard reference available, create object then
|
||||||
AccessibleImageBullet* pChild = new AccessibleImageBullet( uno::Reference< XAccessible >( this ) );
|
aChild = new AccessibleImageBullet(this);
|
||||||
uno::Reference< XAccessible > xChild( static_cast< ::cppu::OWeakObject* > (pChild), uno::UNO_QUERY );
|
|
||||||
|
|
||||||
if( !xChild.is() )
|
|
||||||
throw uno::RuntimeException("Child creation failed",
|
|
||||||
uno::Reference< uno::XInterface >
|
|
||||||
( static_cast< ::cppu::OWeakObject* > (this) ) );
|
|
||||||
|
|
||||||
aChild = pChild;
|
|
||||||
|
|
||||||
aChild->SetEditSource( &GetEditSource() );
|
aChild->SetEditSource( &GetEditSource() );
|
||||||
aChild->SetParagraphIndex( GetParagraphIndex() );
|
aChild->SetParagraphIndex( GetParagraphIndex() );
|
||||||
|
@@ -164,17 +164,11 @@ namespace accessibility
|
|||||||
{
|
{
|
||||||
// there is no hard reference available, create object then
|
// there is no hard reference available, create object then
|
||||||
// #i27138#
|
// #i27138#
|
||||||
AccessibleEditableTextPara* pChild = new AccessibleEditableTextPara( xFrontEnd, this );
|
aChild = new AccessibleEditableTextPara(xFrontEnd, this);
|
||||||
uno::Reference< XAccessible > xChild( static_cast< ::cppu::OWeakObject* > (pChild), uno::UNO_QUERY );
|
|
||||||
|
|
||||||
if( !xChild.is() )
|
|
||||||
throw uno::RuntimeException("Child creation failed", xFrontEnd);
|
|
||||||
|
|
||||||
aChild = pChild;
|
|
||||||
|
|
||||||
InitChild( *aChild, rEditSource, nChild, nParagraphIndex );
|
InitChild( *aChild, rEditSource, nChild, nParagraphIndex );
|
||||||
|
|
||||||
maChildren[ nParagraphIndex ] = WeakChild( aChild, pChild->getBounds() );
|
maChildren[ nParagraphIndex ] = WeakChild( aChild, aChild->getBounds() );
|
||||||
}
|
}
|
||||||
|
|
||||||
return Child( aChild.get(), GetChild( nParagraphIndex ).second );
|
return Child( aChild.get(), GetChild( nParagraphIndex ).second );
|
||||||
|
Reference in New Issue
Block a user