[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Fri Apr 18 03:34:37 PDT 2014
sc/source/ui/unoobj/dapiuno.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 1a9463277006e8e5a8c0b82bbf5d5ab2d5ea15ac
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 18 11:33:31 2014 +0100
coverity#704274 Logically dead code
Change-Id: I211f24d34a0fc9b3efb6f575eb6884c334733969
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 6845eec..4aebc8a 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()
More information about the Libreoffice-commits
mailing list