summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-18 11:33:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-18 11:34:12 +0100
commit1a9463277006e8e5a8c0b82bbf5d5ab2d5ea15ac (patch)
tree1e23dede69aeab5dae7608a755077c2fef60d594 /sc
parent211b04ed4f0ada2fc9d8cccdc15db3e00c4e3cbf (diff)
coverity#704274 Logically dead code
Change-Id: I211f24d34a0fc9b3efb6f575eb6884c334733969
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 6845eec59551..4aebc8a0ebac 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -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()