LibreOffice
LibreOffice 26.2 SDK API Reference
Loading...
Searching...
No Matches
com::sun::star::sheet::SortNumberBehavior Constant Group Referencepublished

Describes how numbers inside text are handled in text comparisons. More...

Variables

const long ALPHA_NUMERIC = 0
 Digits inside text are compared alphanumerically.
const long DOUBLE = 1
 Comparison of text uses natural sort with decimal numbers.
const long INTEGER = 2
 Comparison of text uses natural sort with integer numbers.

Detailed Description

Describes how numbers inside text are handled in text comparisons.

The constants correspond to the ODF attribute table:embedded-number-behavior (19.628, part 3 ODF 1.4).

Since
LibreOffice 26.2

Variable Documentation

◆ ALPHA_NUMERIC

const long ALPHA_NUMERIC = 0

Digits inside text are compared alphanumerically.

"K10" < "K2" < "K3", for example.

◆ DOUBLE

const long DOUBLE = 1

Comparison of text uses natural sort with decimal numbers.

Example: "K2" < "K3" < "K10".
The number parts inside the text may be decimal numbers. Which character is considered a decimal separator, depends on the locale. Read ODF standard for details.
Example with dot as decimal separator: "K2.40" < "K2.5"

◆ INTEGER

const long INTEGER = 2

Comparison of text uses natural sort with integer numbers.

Any decimal separator is treated as ordinary character. A fractional part is handled as separate number.
Example: "K2.5" < "K2.40", because 5 < 40.