From 51fb84829afbc1c0957fd1a489085613ad199f1a Mon Sep 17 00:00:00 2001 From: Gautham Krishnan Date: Tue, 1 Mar 2022 12:04:38 +0530 Subject: tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro Change-Id: If35c679839b39a01e474f7b0b0abee570e85bdd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130798 Tested-by: Jenkins Reviewed-by: Hossein --- reportdesign/source/ui/dlg/AddField.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'reportdesign') diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index e3e1fb3a71ea..6bf3cd1f0759 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -189,7 +189,7 @@ void OAddFieldWindow::Update() m_xListBox->clear(); m_aListBoxData.clear(); const OString aIds[] = { "up", "down" }; - for (size_t j = 0; j< SAL_N_ELEMENTS(aIds); ++j) + for (size_t j = 0; j< std::size(aIds); ++j) m_xActions->set_item_sensitive(aIds[j], false); OUString aTitle(RptResId(RID_STR_FIELDSELECTION)); @@ -233,7 +233,7 @@ void OAddFieldWindow::Update() m_xDialog->set_title(aTitle); if ( !m_aCommandName.isEmpty() ) { - for (size_t i = 0; i < SAL_N_ELEMENTS(aIds); ++i) + for (size_t i = 0; i < std::size(aIds); ++i) m_xActions->set_item_sensitive(aIds[i], true); } OnSelectHdl(*m_xListBox); @@ -331,7 +331,7 @@ IMPL_LINK(OAddFieldWindow, OnSortAction, const OString&, rCurItem, void) if (rCurItem == "delete") { - for (size_t j = 0; j< SAL_N_ELEMENTS(aIds); ++j) + for (size_t j = 0; j< std::size(aIds); ++j) m_xActions->set_item_active(aIds[j], false); m_xListBox->make_unsorted(); @@ -339,7 +339,7 @@ IMPL_LINK(OAddFieldWindow, OnSortAction, const OString&, rCurItem, void) return; } - for (size_t j = 0; j< SAL_N_ELEMENTS(aIds); ++j) + for (size_t j = 0; j< std::size(aIds); ++j) m_xActions->set_item_active(aIds[j], rCurItem == aIds[j]); m_xListBox->make_sorted(); -- cgit