diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-22 16:55:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-26 09:38:53 +0200 |
commit | 30b635c26d6cc07b5a84dc0d829f0b0cde3d1f5a (patch) | |
tree | 0ed53ffc7dd75bc6ca40c99453ae39fea3421462 /sc/source/ui/unoobj/TablePivotCharts.cxx | |
parent | 94c548ac6468a567aa352fc47e5d2acc34076130 (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/TablePivotCharts.cxx')
-rw-r--r-- | sc/source/ui/unoobj/TablePivotCharts.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/unoobj/TablePivotCharts.cxx b/sc/source/ui/unoobj/TablePivotCharts.cxx index 16d260fec458..6369729d772f 100644 --- a/sc/source/ui/unoobj/TablePivotCharts.cxx +++ b/sc/source/ui/unoobj/TablePivotCharts.cxx @@ -217,10 +217,10 @@ uno::Any SAL_CALL TablePivotCharts::getByIndex(sal_Int32 nIndex) throw lang::IndexOutOfBoundsException(); uno::Reference<table::XTablePivotChart> xChart(new TablePivotChart(m_pDocShell, m_nTab, aName)); - if (xChart.is()) - return uno::makeAny(xChart); - else + if (!xChart.is()) throw lang::IndexOutOfBoundsException(); + + return uno::makeAny(xChart); } uno::Type SAL_CALL TablePivotCharts::getElementType() @@ -243,10 +243,10 @@ uno::Any SAL_CALL TablePivotCharts::getByName(OUString const & rName) throw container::NoSuchElementException(); uno::Reference<table::XTablePivotChart> xChart(new TablePivotChart(m_pDocShell, m_nTab, rName)); - if (xChart.is()) - return uno::makeAny(xChart); - else + if (!xChart.is()) throw container::NoSuchElementException(); + + return uno::makeAny(xChart); } uno::Sequence<OUString> SAL_CALL TablePivotCharts::getElementNames() |