summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/fmtuno.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-22 16:55:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-26 09:38:53 +0200
commit30b635c26d6cc07b5a84dc0d829f0b0cde3d1f5a (patch)
tree0ed53ffc7dd75bc6ca40c99453ae39fea3421462 /sc/source/ui/unoobj/fmtuno.cxx
parent94c548ac6468a567aa352fc47e5d2acc34076130 (diff)
loplugin:flatten in sc
Change-Id: I40653af2d90ef123cf77d7223c520cba0e5a3aca Reviewed-on: https://gerrit.libreoffice.org/42661 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/unoobj/fmtuno.cxx')
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 1187454cab57..45cd9a418107 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -375,10 +375,10 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByIndex( sal_Int32 nIndex )
{
SolarMutexGuard aGuard;
uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((sal_uInt16)nIndex));
- if (xEntry.is())
- return uno::makeAny(xEntry);
- else
+ if (!xEntry.is())
throw lang::IndexOutOfBoundsException();
+
+ return uno::makeAny(xEntry);
}
uno::Type SAL_CALL ScTableConditionalFormat::getElementType()
@@ -416,10 +416,10 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByName( const OUString& aName )
break;
}
- if (xEntry.is())
- return uno::makeAny(xEntry);
- else
+ if (!xEntry.is())
throw container::NoSuchElementException();
+
+ return uno::makeAny(xEntry);
}
uno::Sequence<OUString> SAL_CALL ScTableConditionalFormat::getElementNames()