diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-21 15:42:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-22 08:30:10 +0200 |
commit | b63609ba5478ed9b020c113f5704f7ea8447dec8 (patch) | |
tree | e40896646675d8b462cec7a90ca1e94e902b3746 /package/source/zippackage/ZipPackage.cxx | |
parent | 4af6c0948be47d7816eb1b6f2137b70aba639f0d (diff) |
loplugin:flatten in framework..package
Change-Id: Ide8a97eae6e2fdc7d2dcccba1480ac55a9b555bc
Reviewed-on: https://gerrit.libreoffice.org/42593
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package/source/zippackage/ZipPackage.cxx')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index d91c0785304c..cfdfde131120 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -809,13 +809,11 @@ Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName ) sTemp = aName.copy ( nOldIndex, nIndex - nOldIndex ); if ( nIndex == nOldIndex ) break; - if ( pCurrent->hasByName( sTemp ) ) - { - pPrevious = pCurrent; - pCurrent = pCurrent->doGetByName( sTemp ).pFolder; - } - else + if ( !pCurrent->hasByName( sTemp ) ) throw NoSuchElementException(THROW_WHERE ); + + pPrevious = pCurrent; + pCurrent = pCurrent->doGetByName( sTemp ).pFolder; nOldIndex = nIndex+1; } |