summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/TablePivotCharts.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/TablePivotCharts.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/TablePivotCharts.cxx')
-rw-r--r--sc/source/ui/unoobj/TablePivotCharts.cxx12
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()