Kaydet (Commit) 1a946327 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#704274 Logically dead code

Change-Id: I211f24d34a0fc9b3efb6f575eb6884c334733969
üst 211b04ed
......@@ -3230,6 +3230,7 @@ Any SAL_CALL ScDataPilotItemsObj::getByName( const OUString& aName )
{
SolarMutexGuard aGuard;
Reference<XNameAccess> xMembers = GetMembers();
Any aRet;
if (xMembers.is())
{
Reference<XIndexAccess> xMembersIndex(new ScNameToIndexAccess( xMembers ));
......@@ -3240,13 +3241,16 @@ Any SAL_CALL ScDataPilotItemsObj::getByName( const OUString& aName )
{
Reference<XNamed> xMember(xMembersIndex->getByIndex(nItem), UNO_QUERY);
if (xMember.is() && (aName == xMember->getName()))
return Any( Reference< XPropertySet >( GetObjectByIndex_Impl( nItem ) ) );
{
aRet = Any( Reference< XPropertySet >( GetObjectByIndex_Impl( nItem ) ) );
break;
}
++nItem;
}
if (!bFound)
throw NoSuchElementException();
}
return Any();
return aRet;
}
Sequence<OUString> SAL_CALL ScDataPilotItemsObj::getElementNames()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment