compilerplugins/clang/test/constvars.cxx              |    2 +-
 extensions/source/logging/csvformatter.cxx            |    2 +-
 extensions/source/propctrlr/defaultforminspection.cxx |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit cf1c25e542ad58b9e242979cf1e6d9c426321c6f
Author:     Vlad Ene <[email protected]>
AuthorDate: Sat Apr 26 11:57:22 2025 +0300
Commit:     David Gilbert <[email protected]>
CommitDate: Thu May 29 23:03:23 2025 +0200

    tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
    
    Signed-off-by: Vlad Ene <[email protected]>
    Change-Id: I1b7e68e6ff8297cbd5f9cadc301161db629123f4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185428
    Tested-by: Jenkins
    Reviewed-by: David Gilbert <[email protected]>

diff --git a/compilerplugins/clang/test/constvars.cxx 
b/compilerplugins/clang/test/constvars.cxx
index 88df50f8e199..5b7cc7628d35 100644
--- a/compilerplugins/clang/test/constvars.cxx
+++ b/compilerplugins/clang/test/constvars.cxx
@@ -22,7 +22,7 @@ namespace test1
 {
 int const aFormalArgs[] = { 1, 2 };
 // expected-error@+1 {{var can be const [loplugin:constvars]}}
-static sal_uInt16 nMediaArgsCount = SAL_N_ELEMENTS(aFormalArgs);
+static sal_uInt16 nMediaArgsCount = std::size(aFormalArgs);
 sal_uInt16 foo()
 {
     (void)aFormalArgs;
diff --git a/extensions/source/logging/csvformatter.cxx 
b/extensions/source/logging/csvformatter.cxx
index a94c836b330f..f7ee96cde081 100644
--- a/extensions/source/logging/csvformatter.cxx
+++ b/extensions/source/logging/csvformatter.cxx
@@ -237,7 +237,7 @@ namespace logging
             }
 
             // ISO 8601
-            char buffer[ 
SAL_N_ELEMENTS("-32768-65535-65535T65535:65535:65535.4294967295") ];
+            char buffer[ 
std::size("-32768-65535-65535T65535:65535:65535.4294967295") ];
             const size_t buffer_size = sizeof( buffer );
             snprintf( buffer, buffer_size, "%04i-%02u-%02uT%02u:%02u:%02u.%09" 
SAL_PRIuUINT32,
                 static_cast<int>(record.LogTime.Year),
diff --git a/extensions/source/propctrlr/defaultforminspection.cxx 
b/extensions/source/propctrlr/defaultforminspection.cxx
index d6336eccf957..af035b339f62 100644
--- a/extensions/source/propctrlr/defaultforminspection.cxx
+++ b/extensions/source/propctrlr/defaultforminspection.cxx
@@ -107,7 +107,7 @@ namespace pcr
             { "com.sun.star.form.inspection.FormGeometryHandler", true }
         };
 
-        sal_Int32 nFactories = SAL_N_ELEMENTS( aFactories );
+        sal_Int32 nFactories = std::size( aFactories );
         Sequence< Any > aReturn( nFactories );
         Any* pReturn = aReturn.getArray();
         for ( sal_Int32 i = 0; i < nFactories; ++i )
@@ -137,7 +137,7 @@ namespace pcr
             { "Events",     RID_STR_EVENTS,             HID_FM_PROPDLG_TAB_EVT 
}
         };
 
-        sal_Int32 nCategories = SAL_N_ELEMENTS( aCategories );
+        sal_Int32 nCategories = std::size( aCategories );
         Sequence< PropertyCategoryDescriptor > aReturn( nCategories );
         PropertyCategoryDescriptor* pReturn = aReturn.getArray();
         for ( sal_Int32 i=0; i<nCategories; ++i, ++pReturn )

Reply via email to