Natural Sort to ODF

Regina Henschel rb.henschel at t-online.de
Sun Aug 24 15:42:54 UTC 2025


Hi all,
step one is ready. It brings natural sort to API. Someone time and 
interest to look at it?
https://gerrit.libreoffice.org/c/core/+/190133

Kind regards,
Regina

Regina Henschel schrieb am 21.08.2025 um 12:46:
> Hi all,
> 
> LibreOffice can sort texts in "natural sort" kind in database ranges in 
> Calc. That is an order K1, K2, K14, K107 instead of the alphanumeric 
> order K1, K107, K14, K2. But LibreOffice does not write/read to ODF, 
> that a database range uses this kind of sorting. I want to implement this.
> 
> Problem A: The according ODF attribute is table:embedded-number-behavior 
> (19.628, part 3 ODF 1.4).
> https://docs.oasis-open.org/office/OpenDocument/v1.4/cs01/part3-schema/OpenDocument-v1.4-cs01-part3-schema.html#attribute-table_embedded-number-behavior 
> 
> It has the values 'alpha-numeric', 'double', and 'integer'.
> 
> The according LibreOffice attribute in core is
> bool bNaturalSort
> in struct ScSortParam.
> 
> Thus ODF has three kinds and LO has two kinds.
>  From my tests I guess, that bNaturalSort=true corresponds to value 
> 'double'.
> 
> Problem B: There exists no UNO property for natural sort.
> Can I simply add it to css.sheet.SheetSortDescriptor2? As boolean or as 
> enum?
> 
> What do you suggest?
> 
> Kind regards,
> Regina
> 



More information about the LibreOffice mailing list