summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-28 10:33:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-29 08:51:48 +0200
commit1ffba0e356608fb6dbf568248e2a953b4d7fb5d6 (patch)
tree5da59640441292421f2137bc85ee7291daed137e /chart2
parentce9a41dc387966c74c1af92783a97565b5af3668 (diff)
loplugin:flatten check for throw in then clause
also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx3
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx3
2 files changed, 2 insertions, 4 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 589e8ad45a48..3bf65b1f71db 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -1357,8 +1357,7 @@ void SAL_CALL ChartDocumentWrapper::setDelegator(
if( rDelegator.is() )
throw lang::DisposedException("ChartDocumentWrapper is disposed",
static_cast< ::cppu::OWeakObject* >( this ));
- else
- return;
+ return;
}
if( rDelegator.is())
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 95d20ccf654d..f40ac477e780 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1137,8 +1137,7 @@ void WrappedDataRowSourceProperty::setPropertyValue( const Any& rOuterValue, con
sal_Int32 nNew = (sal_Int32)css::chart::ChartDataRowSource_ROWS;
if( !(rOuterValue >>= nNew) )
throw lang::IllegalArgumentException( "Property DataRowSource requires css::chart::ChartDataRowSource value", nullptr, 0 );
- else
- eChartDataRowSource = css::chart::ChartDataRowSource(nNew);
+ eChartDataRowSource = css::chart::ChartDataRowSource(nNew);
}
m_aOuterValue = rOuterValue;