summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-06 13:32:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-14 18:03:06 +0200
commite67657d5211f6e95ddf8bd621108608573b00d5d (patch)
tree66724101dbd95721714bd40fcb4861663432774c /chart2
parent186def8f48e273c3a3b4d23b3ab2efd0d8664731 (diff)
loplugin:simplifybool more
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx2
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx2
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx2
-rw-r--r--chart2/source/view/axes/Tickmarks_Equidistant.cxx2
-rw-r--r--chart2/source/view/charttypes/BarChart.cxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx2
6 files changed, 6 insertions, 6 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 2ac9f4b7bbd5..f41b18af994a 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -533,7 +533,7 @@ IMPL_LINK_NOARG(ChartController, DoubleClickWaitingHdl, Timer *, void)
{
m_bWaitingForDoubleClick = false;
- if( !(!m_bWaitingForMouseUp && m_aSelection.maybeSwitchSelectionAfterSingleClickWasEnsured()) )
+ if( m_bWaitingForMouseUp || !m_aSelection.maybeSwitchSelectionAfterSingleClickWasEnsured() )
return;
impl_selectObjectAndNotiy();
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index b3dd7a7cfeeb..313b472be0d7 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -362,7 +362,7 @@ void ChartModel::impl_store(
//notify parent data provider after saving thus the parent document can store
//the ranges for which a load and update of the chart will be necessary
Reference< beans::XPropertySet > xPropSet( m_xParent, uno::UNO_QUERY );
- if ( !(!hasInternalDataProvider() && xPropSet.is()) )
+ if ( hasInternalDataProvider() || !xPropSet.is() )
return;
apphelper::MediaDescriptorHelper aMDHelper(rMediaDescriptor);
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 9d78d9ffc758..c1d0008098ab 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -1360,7 +1360,7 @@ Sequence< double > SAL_CALL InternalDataProvider::getDateCategories()
sal_Int32 nN=0;
for (auto const& category : aCategories)
{
- if( !( !category.empty() && (category[0]>>=fValue) ) )
+ if( category.empty() || !(category[0]>>=fValue) )
fValue = fNan;
aDoubles[nN++]=fValue;
}
diff --git a/chart2/source/view/axes/Tickmarks_Equidistant.cxx b/chart2/source/view/axes/Tickmarks_Equidistant.cxx
index 60f6e63311ad..48660a41d986 100644
--- a/chart2/source/view/axes/Tickmarks_Equidistant.cxx
+++ b/chart2/source/view/axes/Tickmarks_Equidistant.cxx
@@ -105,7 +105,7 @@ EquidistantTickFactory::EquidistantTickFactory(
m_fOuterMajorTickBorderMin_Scaled = m_fOuterMajorTickBorderMin;
m_fOuterMajorTickBorderMax_Scaled = m_fOuterMajorTickBorderMax;
- if(!(!m_rIncrement.PostEquidistant && m_xInverseScaling.is()) )
+ if(m_rIncrement.PostEquidistant || !m_xInverseScaling.is())
return;
m_fOuterMajorTickBorderMin_Scaled = m_rScale.Scaling->doScaling(m_fOuterMajorTickBorderMin);
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 3641e67b4657..da7461f38e7a 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -415,7 +415,7 @@ void BarChart::adaptOverlapAndGapwidthForGroupBarsPerAxis()
//thus the different series use the same settings
VDataSeries* pFirstSeries = getFirstSeries();
- if(!(pFirstSeries && !pFirstSeries->getGroupBarsPerAxis()) )
+ if(!pFirstSeries || pFirstSeries->getGroupBarsPerAxis())
return;
sal_Int32 nAxisIndex = pFirstSeries->getAttachedAxisIndex();
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index a66bd266634b..656503a8588b 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2503,7 +2503,7 @@ void ChartView::impl_updateView( bool bCheckLockedCtrler )
if (bCheckLockedCtrler && mrChartModel.hasControllersLocked())
return;
- if( !(m_bViewDirty && !m_bInViewUpdate) )
+ if( !m_bViewDirty || m_bInViewUpdate )
return;
m_bInViewUpdate = true;