this NULL check, leak and copy ctor all look a bit addled

Change-Id: I5a4f80e1f6b4cc834c921d4c4780989c90cbefe2
This commit is contained in:
Caolán McNamara 2013-12-13 10:15:15 +00:00
parent dd7a3f5fb8
commit 0b9644e244

View file

@ -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.