diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-24 15:26:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-24 16:50:03 +0200 |
commit | 5060c5015882b7109c54598c4ea858949beafc43 (patch) | |
tree | c8c153d73f6c6ebbe2dae768c1da72d28312efd4 /xmloff/source/chart/SchXMLChartContext.cxx | |
parent | a86818c15a6b4773ddd012db37d55b5204163c24 (diff) |
Use o3tl::make_unsigned in some places
...where a signed and an unsigned value are compared, and the signed value has
just been proven to be non-negative here
Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmloff/source/chart/SchXMLChartContext.cxx')
-rw-r--r-- | xmloff/source/chart/SchXMLChartContext.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index fb7deffd2527..23ea2f780041 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -57,6 +57,7 @@ #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> +#include <o3tl/safeint.hxx> #include <o3tl/string_view.hxx> using namespace com::sun::star; @@ -578,7 +579,7 @@ void lcl_swapPointAndSeriesStylesForDonutCharts( ::std::vector< DataRowPointStyl sal_Int32 nNewSeriesIndex = aStyle.m_nPointIndex; sal_Int32 nRepeatCount = aStyle.m_nPointRepeat; - while( nRepeatCount && (nNewSeriesIndex>=0) && (nNewSeriesIndex< static_cast<sal_Int32>(aNewSeriesVector.size()) ) ) + while( nRepeatCount && (nNewSeriesIndex>=0) && (o3tl::make_unsigned(nNewSeriesIndex)< aNewSeriesVector.size() ) ) { NewDonutSeries& rNewSeries( aNewSeriesVector[nNewSeriesIndex] ); rNewSeries.setPointStyleNameToPoint( aStyle.msStyleName, nNewPointIndex ); |