summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-27 14:50:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-28 09:04:51 +0200
commite871c9cb7ce4f3df2ba6780be62ed46b5ee7a410 (patch)
tree9204fac0ea61289899129c30582f3a108680f6a3 /chart2
parent41d8b41767032681a9897b7551f011d450e3725e (diff)
loplugin:simplifybool in canvas..cui
Change-Id: Ib7c3b381ce4456e3d48538ee6f762ceaf2784fe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94973 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx2
-rw-r--r--chart2/source/controller/sidebar/ChartElementsPanel.cxx4
-rw-r--r--chart2/source/view/charttypes/Splines.cxx4
3 files changed, 5 insertions, 5 deletions
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index e656ef206499..27566a2a1251 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -131,7 +131,7 @@ namespace
const ::chart::LightSource & rLightSource,
sal_Int32 nIndex )
{
- if( !(0 <= nIndex && nIndex < 8) )
+ if( 0 > nIndex || nIndex >= 8 )
return;
OUString aIndex( OUString::number( nIndex + 1 ));
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index c15572717d50..346672c2bb2a 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -203,7 +203,7 @@ bool isAxisVisible(const css::uno::Reference<css::frame::XModel>& xModel, AxisTy
else if (eType == AxisType::Z_MAIN)
nDimensionIndex = 2;
- bool bMajor = !(eType == AxisType::X_SECOND || eType == AxisType::Y_SECOND);
+ bool bMajor = (eType != AxisType::X_SECOND && eType != AxisType::Y_SECOND);
bool bHasAxis = AxisHelper::isAxisShown(nDimensionIndex, bMajor, xDiagram);
return bHasAxis;
@@ -223,7 +223,7 @@ void setAxisVisible(const css::uno::Reference<css::frame::XModel>& xModel, AxisT
else if (eType == AxisType::Z_MAIN)
nDimensionIndex = 2;
- bool bMajor = !(eType == AxisType::X_SECOND || eType == AxisType::Y_SECOND);
+ bool bMajor = (eType != AxisType::X_SECOND && eType != AxisType::Y_SECOND);
if (bVisible)
AxisHelper::showAxis(nDimensionIndex, bMajor, xDiagram, comphelper::getProcessComponentContext());
diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx
index 5d5a02228690..774d5fc1d7ac 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -744,7 +744,7 @@ void SplineCalculater::CalculateBSplines(
// find the one interval with u_i <= t_k < u_(i+1)
// remember u_0 = ... = u_p = 0.0 and u_(m-p) = ... u_m = 1.0 and 0<t_k<1
lcl_tSizeType i = p;
- while (!(u[i] <= t[k] && t[k] < u[i+1]))
+ while (u[i] > t[k] || t[k] >= u[i+1])
{
++i;
}
@@ -872,7 +872,7 @@ void SplineCalculater::CalculateBSplines(
for ( lcl_tSizeType nTIndex = 0; nTIndex <= n-1; ++nTIndex)
{
for (sal_uInt32 nResolutionStep = 1;
- nResolutionStep <= nResolution && !( nTIndex == n-1 && nResolutionStep == nResolution);
+ nResolutionStep <= nResolution && ( nTIndex != n-1 || nResolutionStep != nResolution);
++nResolutionStep)
{
lcl_tSizeType nNewIndex = nTIndex * nResolution + nResolutionStep;