summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/fmtuno.cxx
diff options
context:
space:
mode:
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()