[Libreoffice-commits] core.git: chart2/source
Dr. David Alan Gilbert (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 25 06:58:25 UTC 2021
chart2/source/view/axes/VAxisProperties.cxx | 3 +--
chart2/source/view/main/VLegend.cxx | 5 ++---
2 files changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 0d5a0bf753dbc5ec3c3320a47972ccbe819787bb
Author: Dr. David Alan Gilbert <dave at treblig.org>
AuthorDate: Sun Jan 24 17:44:39 2021 +0000
Commit: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
CommitDate: Mon Jan 25 07:57:44 2021 +0100
chart2: Merge some if's
Spotted by cppchecker, some sets of if's that can be merged since they
have identical conditions.
Change-Id: I28c35767eb96e31ab059abcfc014423704c988f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109862
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx
index 27a4950a886b..c6e296e277ed 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -286,10 +286,9 @@ void AxisProperties::init( bool bCartesian )
{
maLabelAlignment.mfLabelDirection *= -1.0;
maLabelAlignment.mfInnerTickDirection *= -1.0;
- }
- if( bIsYAxisPosition )
maLabelAlignment.meAlignment = lcl_getLabelAlignmentForYAxis(*this);
+ }
else
maLabelAlignment.meAlignment = lcl_getLabelAlignmentForXAxis(*this);
}
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 704a48872bf5..77e6b5800dc5 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -348,10 +348,9 @@ awt::Size lcl_placeLegendEntries(
//all good proceed with next entry
continue;
}
- }
- if( nCurrentColumn < nCurrentColumnCount )
+
aColumnWidths[nCurrentColumn] = std::max( nNewWidth, aColumnWidths[nCurrentColumn] );
- else
+ } else
aColumnWidths.push_back(nNewWidth);
//do the columns still fit into the given size?
More information about the Libreoffice-commits
mailing list