summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-13 10:15:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-13 12:17:50 +0000
commit0b9644e2443879e825fc72d5faf55080888a91b8 (patch)
treea8a296cbd4f270ab959d9efc37efa2c412258b1e /svx/source
parentdd7a3f5fb873b77da326eb8339c2ef9e3bf4fbd1 (diff)
this NULL check, leak and copy ctor all look a bit addled
Change-Id: I5a4f80e1f6b4cc834c921d4c4780989c90cbefe2
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx20
1 files changed, 6 insertions, 14 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index a72ebef31ffa..d75864f2595d 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.