embeddedobj/source/msole/oleembed.cxx          |    2 +-
 extensions/source/abpilot/fieldmappingimpl.cxx |    4 ++--
 filter/source/config/cache/typedetection.cxx   |    2 +-
 filter/source/msfilter/countryid.cxx           |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 75e6ffe31d74ac36d8864b018008d4208a7efe73
Author:     OmkarAcharekar <[email protected]>
AuthorDate: Tue Oct 18 02:15:51 2022 +0530
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Tue Oct 18 14:24:06 2022 +0200

    tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
    
    Change-Id: I35c883a1b05a797e83a41698fa205796e681d7c8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141482
    Tested-by: Jenkins
    Tested-by: Ilmari Lauhakangas <[email protected]>
    Reviewed-by: Ilmari Lauhakangas <[email protected]>

diff --git a/embeddedobj/source/msole/oleembed.cxx 
b/embeddedobj/source/msole/oleembed.cxx
index da9b17d8a141..d06969925109 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -706,7 +706,7 @@ namespace
         };
 
         bool bCopied = false;
-        for (size_t i = 0; i < SAL_N_ELEMENTS(aStreamNames) && !bCopied; ++i)
+        for (size_t i = 0; i < std::size(aStreamNames) && !bCopied; ++i)
         {
             uno::Reference<io::XStream> xEmbeddedFile;
             try
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx 
b/extensions/source/abpilot/fieldmappingimpl.cxx
index a60c41b235f2..64197737150e 100644
--- a/extensions/source/abpilot/fieldmappingimpl.cxx
+++ b/extensions/source/abpilot/fieldmappingimpl.cxx
@@ -162,10 +162,10 @@ namespace abp
                     _rxContext, sDriverAliasesNodeName, -1, 
OConfigurationTreeRoot::CM_READONLY);
 
                 // loop through all programmatic pairs
-                DBG_ASSERT( 0 == SAL_N_ELEMENTS( pMappingProgrammatics ) % 2,
+                DBG_ASSERT( 0 == std::size( pMappingProgrammatics ) % 2,
                     "fieldmapping::defaultMapping: invalid programmatic map!" 
);
                 // number of pairs
-                sal_Int32 const nIntersectedProgrammatics = SAL_N_ELEMENTS( 
pMappingProgrammatics ) / 2;
+                sal_Int32 const nIntersectedProgrammatics =  std::size( 
pMappingProgrammatics ) / 2;
 
                 const char** pProgrammatic = pMappingProgrammatics;
                 OUString sAddressProgrammatic;
diff --git a/filter/source/config/cache/typedetection.cxx 
b/filter/source/config/cache/typedetection.cxx
index 5acaf88ed5fe..0aaa2ffa6c3d 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -284,7 +284,7 @@ int getFlatTypeRank(std::u16string_view rType)
         "math_MathType_3x", // MathType equation embedded in Word doc.
     };
 
-    size_t n = SAL_N_ELEMENTS(ranks);
+    size_t n =  std::size(ranks);
 
     for (size_t i = 0; i < n; ++i)
     {
diff --git a/filter/source/msfilter/countryid.cxx 
b/filter/source/msfilter/countryid.cxx
index 9ad504ab3272..a6f72001db17 100644
--- a/filter/source/msfilter/countryid.cxx
+++ b/filter/source/msfilter/countryid.cxx
@@ -243,7 +243,7 @@ const CountryEntry pTable[] =
     { COUNTRY_UZBEKISTAN,           LANGUAGE_UZBEK_LATIN,                   
false   }
 };
 
-const CountryEntry * const pEnd = pTable + SAL_N_ELEMENTS( pTable );
+const CountryEntry * const pEnd = pTable +  std::size( pTable );
 
 /** Predicate comparing a country ID with the member of a CountryEntry. */
 struct CountryEntryPred_Country

Reply via email to