Files
odfstudio/test
Regina Henschel 47eb7f4e4d tdf161948 bring natural sort to API
When sorting a database range the feature 'natural sort' can be used.
If source has the strings K3 K10 K104 K23 K2, then the result will be
K2 K3 K10 K23 K104. Alphanumerical sort results in K10 K104 K2 K23 K3.

ODF has the attribute table:embedded-number-behavior for this
(19.628 part3 ODF 1.4). Its values are 'alpha-numeric', 'double' and
'integer'. LO has the attribute bool bNaturalSort in struct ScSortParam.
The ODF method 'integer' is not implemented in LO.

Currently natural sort is not read/written with ODF and is not available
in the API. I plan three steps:
1. Make natural sort available in the API (this patch)
2. Read and write table:embedded-number-behavior attribute
3. Implement 'integer' method.

To be later able to have three values, not a boolean property is used for
the API, but a group of constant values, although currently only two
values are needed.

Change-Id: I0418d5f23400fb0479034589fc90868a1e97ce44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190133
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Tested-by: Jenkins
2025-08-26 12:53:01 +02:00
..
…
…

Test Harness Code for C++ Unit Testing

Many of these tests are run during the build process. In that case on unix, if a test fails follow the error messages to debug it under gdb.