Bug 147021 - Use std::size() or std::ssize() instead of SAL_N_ELEMENTS() macro
Summary: Use std::size() or std::ssize() instead of SAL_N_ELEMENTS() macro
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0 target:7.5.0 reviewed:20...
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2022-01-27 15:01 UTC by Hossein
Modified: 2024-03-25 12:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2022-01-27 15:01:18 UTC
The SAL_N_ELEMENTS() macro is defined in 'include/sal/macros.h'. It calculates the number of elements in an array at compile time. According the comments, "the argument must be an array and not a pointer".

These are some examples from the above file:

    SAL_N_ELEMENTS("foo");

    char aFoo[]="foo";
    SAL_N_ELEMENTS(aFoo);

This macro, uses sizeof() operator to calculate the "sizeof (arr) / sizeof ((arr)[0]))".

Now we can use std::size() instead of SAL_N_ELEMENTS() macro. The result would be constexpr, compile-time constant expression.

As an example, this code:

    for (unsigned i = 0; i != SAL_N_ELEMENTS(aFoo); ++i)
    {
        ...
    }

can be converted into this one:

    for (unsigned i = 0; i != std::size(aFoo); ++i)
    {
        ...
    }

One pitfall would be comparing the result with a signed value. Then, either you have to cast the result to a signed value, or use an unsigned value for the other side of the comparison.
Comment 1 Stephan Bergmann 2022-01-27 15:47:54 UTC
(In reply to Hossein from comment #0)
> One pitfall would be comparing the result with a signed value. Then, either
> you have to cast the result to a signed value, or use an unsigned value for
> the other side of the comparison.

If there's need, we can make available C++20

> template<class T, ptrdiff_t N> constexpr ptrdiff_t ssize(const T (&array)[N]) noexcept;

as o3tl::ssize for the time being.  (Also, if it is known that the other side of the comparison, even though of signed type, must be non-negative, like e.g. a call to OUString::getLength, then o3tl::make_unsigned from o3tl/safeint.hxx is a good choice.)
Comment 2 Mike Kaganski 2022-01-29 10:05:28 UTC
Note also, that there are cases where std::size can't give a compile-time constant, unlike the SAL_N_ELEMENTS macro. That may be e.g. when a class contains an array member, and a static_assert checks the array dimension in its constructor. In that case, a "'this' can't be used in constant expression" error would result after the replacement. Usually, there's a way to restructure such cases, to avoid use of static asserts, and ensure the tested invariant some other way.
Comment 3 Commit Notification 2022-02-06 20:39:10 UTC
VaibhavMalik4187 committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8b327cd86d71d71d2f5f883321e5d53e3b42ed4e

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2022-02-09 22:18:18 UTC
Hossein committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a5c6fbe247ee9f9b2fba828d1360748c3fe4642b

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Hossein 2022-02-09 22:20:47 UTC
(In reply to Commit Notification from comment #4)
> Hossein committed a patch related to this issue.
> It has been pushed to "master":
This is an example for changing the type of the variable to a suitable unsigned type.
https://git.libreoffice.org/core/commit/a5c6fbe247ee9f9b2fba828d1360748c3fe4642b

The signed loop index variable of type 'int' is converted into 'size_t' to match the return value of std::size() which is unsigned
Comment 6 Commit Notification 2022-03-09 23:40:51 UTC
Gautham Krishnan committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/51fb84829afbc1c0957fd1a489085613ad199f1a

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2022-03-16 08:14:34 UTC
psidiumcode committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5b320aa058504becae6ac6746926b481b326a24d

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2022-03-18 17:31:37 UTC
Sinduja Y committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a40ed687a3e2f8e1d17705fcd7d397ba09398cb6

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2022-05-09 18:43:02 UTC
Pragat Pandya committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6abc09926c9b55a445b906303f56c6ec7fdeabf9

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2022-05-30 10:22:25 UTC
Roman Kuznetsov committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d694b572c7262a326ac7ceac2e558f3fc6c78df4

tdf#147021 Use std::size() instead SAL_N_ELEMENTS macro

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2022-05-30 10:24:35 UTC
Roman Kuznetsov committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/81aad6d53fa792dd95732e401ecb298714f699f4

tdf#147021 Use std::size() instead SAL_N_ELEMENTS macro

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2022-06-20 10:26:25 UTC
jsala committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2c68c419c1fce6de1a81e1f13a84b7069125a204

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2022-07-22 14:51:02 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5b04eed4d22c9e3caa76e195582b15862e9261b6

tdf#147021 Use std::size in {Read,Write}JobSetup

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Hossein 2022-07-22 14:57:38 UTC
Re-evaluating the EasyHack in 2022

This issue is still relevant. There are still several instances of SAL_N_ELEMENTS() macro in use:

$ git grep SAL_N_ELEMENTS|wc -l
1897
Comment 15 Commit Notification 2022-08-03 11:09:07 UTC
ehsan committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e010a57ab2489464719fb73ad0aea6e4e4c60383

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2022-09-04 18:04:59 UTC
jsala committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9e7e95a57b7c16941d9fdc59f806c1f9e4263379

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2022-09-05 15:17:28 UTC
jsala committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/35a7e40d372d3211061465346825cf543a095f6d

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2022-09-05 16:58:08 UTC
jsala committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8dc57426c3bd3385c30b9007991af8496b315f9a

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2022-09-06 00:27:25 UTC
Radhey Parekh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/feb8d07333544ff2206489b786b7af30744d014a

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2022-09-07 20:19:22 UTC
Tomoyuki Kubota committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/86498bcd73050e44ea5ea53c384edb0baf033d16

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2022-10-12 17:43:24 UTC
jsala committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b26793b907ce823e5cce38f6fe93b420ebe38579

tdf#147021 REVERT Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Aron Budea 2022-10-17 00:15:48 UTC
Let's keep the default assignee, as this is a generic task that can be worked on by several different contributors.
Comment 23 treebian 2022-10-17 19:23:59 UTC
(In reply to Aron Budea from comment #22)
> Let's keep the default assignee, as this is a generic task that can be
> worked on by several different contributors.

Understood, thank you for your help
Comment 24 Commit Notification 2022-10-18 12:25:06 UTC
OmkarAcharekar committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/75e6ffe31d74ac36d8864b018008d4208a7efe73

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 25 Commit Notification 2022-10-29 18:15:06 UTC
insanetree committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/07b6e34397037722d40b2013eef21085eca4f235

tdf#147021: SAL_N_ELEMENTS changed to std::size

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 26 Commit Notification 2022-11-06 00:23:26 UTC
jsala committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/04a58d7eae2b26559efd48ff7cdd23cec1c2187c

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 Commit Notification 2022-11-22 14:29:38 UTC
Leonid Ryzhov committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/49737dff4b7b46c44f8c8e1c4de0291309eef78e

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 28 Commit Notification 2023-03-09 19:44:59 UTC
Vinit Agarwal committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d898620cb47e0d794d4033fdfa13b049f972a9ff

tdf#147021 - Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 29 Commit Notification 2023-05-30 13:38:33 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4998370216bbea3bcaff7fac2d62cbb4ac978c5d

tdf#145538,tdf#147021: sw/source: range based loops

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 30 Commit Notification 2023-06-02 14:59:49 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7bec1689fcbe9102aa220739b6113118d9a8dd1f

tdf#145538,tdf#147021: qa: range based loops

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 31 Commit Notification 2023-06-13 14:22:19 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9bc3c4fa8d380bd7ae5689692cc80f815bed4707

tdf#147021: sw/source use std::size() instead of SAL_N_ELEMENTS

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Commit Notification 2023-06-13 14:23:21 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/880bc4255099132557fe8d7d36a50c06f05cf5a1

tdf#147021: vcl/* KeyboardReplacements SAL_N_ELEMENTS removal

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 33 Commit Notification 2023-06-13 14:25:24 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c437ccaab235320995af8c272705ac7c01784dd8

tdf#147021: sc/source/filter SAL_N_ELEMENTS usage

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 34 Dave Gilbert 2023-07-17 12:43:02 UTC
I'd appreciate review on:
  https://gerrit.libreoffice.org/c/core/+/153889

which takes out a chunk of the SAL_N_ELEMENTS using span types.
(Large but mostly mechanical)
Comment 35 Commit Notification 2023-07-28 05:07:36 UTC
sahil committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0c45d90cfb1cc60218fbce3743df442b1f1d3f70

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 36 Commit Notification 2023-09-04 13:51:00 UTC
Adam Seskunas committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b1b002c293ddf38be125dc9083f41eb27452c450

tdf#147021 use std::size instead of SAL_N_ELEMENTS

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 37 Buovjaga 2023-10-10 05:20:00 UTC
Now our baseline allows the use of std::ssize()
Comment 38 Commit Notification 2023-10-12 17:11:02 UTC
Deepika Goyal committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0cd703c699334ed96a5743aae977207ba9a2a74b

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 39 Commit Notification 2023-10-19 12:19:47 UTC
Willian Pessoa committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fec4d0fb9992811d1217624d8eda95eac6da4220

tdf#147021 Use std::size() in editeng

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 40 pabhiramrishi 2023-11-19 16:06:07 UTC Comment hidden (obsolete)
Comment 41 pabhiramrishi 2023-11-19 16:55:27 UTC Comment hidden (obsolete)
Comment 42 Commit Notification 2023-12-08 16:14:31 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9924561a094f1b3b2b78700bd1f1638d9608f881

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 43 Commit Notification 2023-12-08 23:47:10 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/82f30ac55a90a0f0915d4016c760c5c38db087f1

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 44 Commit Notification 2023-12-08 23:48:12 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4a49d7a3a98ccdca52ea0a4475d05235a111ec0a

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 45 Commit Notification 2023-12-08 23:52:19 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/abdb93ce28febd7c4b4e5dad164ee8a394b499b9

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 46 Commit Notification 2023-12-12 09:57:34 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/80785bb26a1f96d5f5bced7940473d22af00cb60

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 47 Commit Notification 2024-02-29 07:19:59 UTC
Keldin Maldonado (KNM) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c78679b349573d718f8641071928d5f2edb47efa

tdf#147021 replace SAL_N_ELEMENTS() with std::size()

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 48 Commit Notification 2024-03-05 19:40:28 UTC
Sujatro Bhadra committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/58d2abd2ed85beed48a7677f2b186914c6f2a6c9

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 49 Commit Notification 2024-03-25 12:15:24 UTC
Mohit Marathe committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/913437f3cd79c4f64151b98366fcc8a90bb66dac

tdf#147021 replace SAL_N_ELEMENTS() with std::size()

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.