summaryrefslogtreecommitdiff
path: root/i18npool/source/indexentry
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-21 11:53:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-22 08:29:29 +0200
commit4af6c0948be47d7816eb1b6f2137b70aba639f0d (patch)
tree3965a1709f531229a6faaeef2e9d4026a30332b8 /i18npool/source/indexentry
parent7b45044fd14661202c658923842dd629cf52961c (diff)
loplugin:flatten in filter..i18npool
Change-Id: I9024b8b614a4de83a4d927e1918f6d4904a7fccb Reviewed-on: https://gerrit.libreoffice.org/42592 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool/source/indexentry')
-rw-r--r--i18npool/source/indexentry/indexentrysupplier.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/i18npool/source/indexentry/indexentrysupplier.cxx b/i18npool/source/indexentry/indexentrysupplier.cxx
index cf6b633414dc..9b6d938c987b 100644
--- a/i18npool/source/indexentry/indexentrysupplier.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier.cxx
@@ -63,30 +63,27 @@ sal_Bool SAL_CALL IndexEntrySupplier::usePhoneticEntry( const Locale& rLocale )
OUString SAL_CALL IndexEntrySupplier::getPhoneticCandidate( const OUString& rIndexEntry,
const Locale& rLocale )
{
- if (getLocaleSpecificIndexEntrySupplier(rLocale, OUString()).is())
- return xIES->getPhoneticCandidate(rIndexEntry, rLocale);
- else
+ if (!getLocaleSpecificIndexEntrySupplier(rLocale, OUString()).is())
throw RuntimeException();
+ return xIES->getPhoneticCandidate(rIndexEntry, rLocale);
}
OUString SAL_CALL IndexEntrySupplier::getIndexKey( const OUString& rIndexEntry,
const OUString& rPhoneticEntry, const Locale& rLocale )
{
- if (xIES.is())
- return xIES->getIndexKey(rIndexEntry, rPhoneticEntry, rLocale);
- else
+ if (!xIES.is())
throw RuntimeException();
+ return xIES->getIndexKey(rIndexEntry, rPhoneticEntry, rLocale);
}
sal_Int16 SAL_CALL IndexEntrySupplier::compareIndexEntry(
const OUString& rIndexEntry1, const OUString& rPhoneticEntry1, const Locale& rLocale1,
const OUString& rIndexEntry2, const OUString& rPhoneticEntry2, const Locale& rLocale2 )
{
- if (xIES.is())
- return xIES->compareIndexEntry(rIndexEntry1, rPhoneticEntry1, rLocale1,
- rIndexEntry2, rPhoneticEntry2, rLocale2);
- else
+ if (!xIES.is())
throw RuntimeException();
+ return xIES->compareIndexEntry(rIndexEntry1, rPhoneticEntry1, rLocale1,
+ rIndexEntry2, rPhoneticEntry2, rLocale2);
}
OUString SAL_CALL IndexEntrySupplier::getIndexCharacter( const OUString& rIndexEntry,