svx/source/accessibility/AccessibleShape.cxx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)
New commits: commit 0b9644e2443879e825fc72d5faf55080888a91b8 Author: Caolán McNamara <[email protected]> Date: Fri Dec 13 10:15:15 2013 +0000 this NULL check, leak and copy ctor all look a bit addled Change-Id: I5a4f80e1f6b4cc834c921d4c4780989c90cbefe2 diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index a72ebef..d75864f 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -424,22 +424,14 @@ uno::Reference<XAccessibleRelationSet> SAL_CALL ::utl::AccessibleRelationSetHelper* pRelationSet = new utl::AccessibleRelationSetHelper; //this mxshape is the captioned shape, only for sw - if (pRelationSet != NULL) + uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); + aSequence[0] = mpParent->GetAccessibleCaption(mxShape); + if(aSequence[0].get()) { - uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); - aSequence[0] = mpParent->GetAccessibleCaption(mxShape); - if(aSequence[0].get()) - { - pRelationSet->AddRelation( - AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) ); - } - return uno::Reference<XAccessibleRelationSet> ( - new ::utl::AccessibleRelationSetHelper (*pRelationSet)); - } - else - { - return uno::Reference<XAccessibleRelationSet>(NULL); + pRelationSet->AddRelation( + AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) ); } + return uno::Reference<XAccessibleRelationSet>(pRelationSet); } /** Return a copy of the state set.
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
