summaryrefslogtreecommitdiff
path: root/sw/source/uibase/misc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-26 11:32:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-26 14:16:13 +0200
commit0b4135ec9945ea627318ecf5fccc4b7d0940ff0d (patch)
tree656dfb32b2e8908e29fe41c9b83ec0cb09038c17 /sw/source/uibase/misc
parent96e3c301d87906a4728f06b4ce5a930d2090e1c2 (diff)
loplugin:flatten in sw
Change-Id: I77d92e7adc9af5c88ca1930c25a0585713f9e0d3 Reviewed-on: https://gerrit.libreoffice.org/42788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/misc')
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index 986f81bbe1fb..8790a4763986 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -613,15 +613,13 @@ Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry(
bool bCreate = ( rCompleteGroupName == GetDefName() );
std::unique_ptr< SwTextBlocks > pGlosGroup( GetGroupDoc( rCompleteGroupName, bCreate ) );
- if ( pGlosGroup.get() && !pGlosGroup->GetError() )
- {
- sal_uInt16 nIdx = pGlosGroup->GetIndex( rEntryName );
- if ( USHRT_MAX == nIdx )
- throw container::NoSuchElementException();
- }
- else
+ if ( !pGlosGroup.get() || pGlosGroup->GetError() )
throw lang::WrappedTargetException();
+ sal_uInt16 nIdx = pGlosGroup->GetIndex( rEntryName );
+ if ( USHRT_MAX == nIdx )
+ throw container::NoSuchElementException();
+
Reference< text::XAutoTextEntry > xReturn;
UnoAutoTextEntries::iterator aSearch( m_aGlossaryEntries.begin() );