diff options
author | Radhey Parekh <radhey.parekh@gmail.com> | 2022-08-22 18:13:15 +0530 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-09-06 02:26:36 +0200 |
commit | feb8d07333544ff2206489b786b7af30744d014a (patch) | |
tree | 390a8598ac73faf539a90c9b912b6c7d1c31a635 /sc/qa | |
parent | 540a312af2f02108ea90f5d2a9f3bf573db622e5 (diff) |
tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: Ic9009eda963f922fc4d2e75a5002026eda63a7aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138686
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc_sort.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx index 0f0218753403..21b734d1d37c 100644 --- a/sc/qa/unit/ucalc_sort.cxx +++ b/sc/qa/unit/ucalc_sort.cxx @@ -487,7 +487,7 @@ void TestSort::testSortWithFormulaRefs() m_pDoc->SetString( 0, i, 0, OUString::createFromAscii(aTextData[i-1]) ); // Insert formulas in A1:A6 on the 2nd sheet. - for (size_t i = 0; i < SAL_N_ELEMENTS(aFormulaData); ++i) + for (size_t i = 0; i < std::size(aFormulaData); ++i) m_pDoc->SetString( 0, i, 1, OUString::createFromAscii(aFormulaData[i]) ); // Sort data in A2:A8 on the 1st sheet. No column header. @@ -501,7 +501,7 @@ void TestSort::testSortWithFormulaRefs() m_pDoc->Sort(0, aSortData, false, true, nullptr, nullptr); - for (size_t i = 0; i < SAL_N_ELEMENTS(aResults); ++i) + for (size_t i = 0; i < std::size(aResults); ++i) { OUString sResult = m_pDoc->GetString(0, i + 1, 0); CPPUNIT_ASSERT_EQUAL( OUString::createFromAscii( aResults[i] ), sResult ); @@ -602,7 +602,7 @@ void TestSort::testSortInFormulaGroup() 104.0, 104.0 }; - for ( SCROW i = 0; i < SCROW(SAL_N_ELEMENTS( aEntries )); ++i ) + for ( SCROW i = 0; i < SCROW(std::size( aEntries )); ++i ) { double val = m_pDoc->GetValue( aEntries[i].nCol, aEntries[i].nRow, 0 ); CPPUNIT_ASSERT_MESSAGE("Mis-matching value after sort.", @@ -790,7 +790,7 @@ void TestSort::testSortRefUpdate() m_pDoc->SetString(ScAddress(0,0,0), "Header"); double aValues[] = { 4.0, 36.0, 14.0, 29.0, 98.0, 78.0, 0.0, 99.0, 1.0 }; - size_t nCount = SAL_N_ELEMENTS(aValues); + size_t nCount = std::size(aValues); for (size_t i = 0; i < nCount; ++i) m_pDoc->SetValue(ScAddress(0,i+1,0), aValues[i]); |