From 8b327cd86d71d71d2f5f883321e5d53e3b42ed4e Mon Sep 17 00:00:00 2001 From: VaibhavMalik4187 Date: Fri, 4 Feb 2022 17:36:52 +0530 Subject: tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro Change-Id: I4f5258ca5b37e9b1b4237c5d29e4a9e5362fa855 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129116 Reviewed-by: Arkadiy Illarionov Reviewed-by: Mike Kaganski Tested-by: Jenkins --- chart2/qa/extras/chart2export.cxx | 2 +- chart2/source/controller/dialogs/res_BarGeometry.cxx | 2 +- chart2/source/controller/dialogs/res_DataLabel.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'chart2') diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index a5c2e20cc58c..bca7897025a0 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -932,7 +932,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX() { 2, css::drawing::LineStyle_SOLID, 0x00FF0000 } // solid red }; - for (size_t i = 0; i < SAL_N_ELEMENTS(aDataPoints); ++i) + for (size_t i = 0; i < std::size(aDataPoints); ++i) { xPropSet = xDataSeries->getDataPointByIndex(aDataPoints[i].mnIndex); CPPUNIT_ASSERT(xPropSet.is()); diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx b/chart2/source/controller/dialogs/res_BarGeometry.cxx index 182d391aac33..97befbe1f8f5 100644 --- a/chart2/source/controller/dialogs/res_BarGeometry.cxx +++ b/chart2/source/controller/dialogs/res_BarGeometry.cxx @@ -27,7 +27,7 @@ BarGeometryResources::BarGeometryResources(weld::Builder* pBuilder) : m_xFT_Geometry(pBuilder->weld_label("shapeft")) , m_xLB_Geometry(pBuilder->weld_tree_view("shape")) { - for (size_t i = 0; i < SAL_N_ELEMENTS(CHART_TYPE); ++i) + for (size_t i = 0; i < std::size(CHART_TYPE); ++i) m_xLB_Geometry->append_text(SchResId(CHART_TYPE[i])); m_xLB_Geometry->set_size_request(-1, m_xLB_Geometry->get_height_rows(SAL_N_ELEMENTS(CHART_TYPE))); diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index a51e9d79a860..5630e94baba2 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -333,7 +333,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) const SfxPoolItem *pPoolItem = nullptr; if( rInAttrs.GetItemState(SCHATTR_DATADESCR_SEPARATOR, true, &pPoolItem) == SfxItemState::SET ) - for(size_t i=0; i < SAL_N_ELEMENTS(our_aLBEntryMap); ++i ) + for(size_t i=0; i < std::size(our_aLBEntryMap); ++i ) { if( our_aLBEntryMap[i] == static_cast(pPoolItem)->GetValue()) m_xLB_Separator->set_active( i ); -- cgit