[Libreoffice-commits] core.git: editeng/source
Stephan Bergmann
sbergman at redhat.com
Wed Feb 10 07:04:47 UTC 2016
editeng/source/accessibility/AccessibleEditableTextPara.cxx | 10 +---------
editeng/source/accessibility/AccessibleParaManager.cxx | 10 ++--------
2 files changed, 3 insertions(+), 17 deletions(-)
New commits:
commit de907bf54d94c96b7939f7bc9901725454d31187
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Feb 10 08:04:22 2016 +0100
Simplify code
Change-Id: I2ac0564a5a6714111abdcff48edff070d75892b7
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 66080c2..2f13278 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -705,15 +705,7 @@ namespace accessibility
if( !aChild.is() )
{
// there is no hard reference available, create object then
- AccessibleImageBullet* pChild = new AccessibleImageBullet( uno::Reference< XAccessible >( 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 = new AccessibleImageBullet(this);
aChild->SetEditSource( &GetEditSource() );
aChild->SetParagraphIndex( GetParagraphIndex() );
diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx
index bed5541b..f57576f 100644
--- a/editeng/source/accessibility/AccessibleParaManager.cxx
+++ b/editeng/source/accessibility/AccessibleParaManager.cxx
@@ -164,17 +164,11 @@ namespace accessibility
{
// there is no hard reference available, create object then
// #i27138#
- AccessibleEditableTextPara* pChild = 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;
+ aChild = new AccessibleEditableTextPara(xFrontEnd, this);
InitChild( *aChild, rEditSource, nChild, nParagraphIndex );
- maChildren[ nParagraphIndex ] = WeakChild( aChild, pChild->getBounds() );
+ maChildren[ nParagraphIndex ] = WeakChild( aChild, aChild->getBounds() );
}
return Child( aChild.get(), GetChild( nParagraphIndex ).second );
More information about the Libreoffice-commits
mailing list