OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office] Proposal for Spreadsheets: New sort option "natural sort"(updated)


Hi Michael,

On Friday, 2007-02-09 13:50:24 +0100, Michael Brauer wrote:

> The attribute "table:embedded-number-behavior" specifies how string 
> values that contain digits are sorted. If the attribute's value is 
> "integer" or "float", string-prefixed numbers will be sorted
> in a "natural", number-aware way, i.e. A1, A2, A3, ... , A19, A20,
> instead of the normal, alpha-numeric behavior, i.e. A1, A10, A11, A12,
> ... ,A19, A2, A20, A3, A4, ... , A8, A9.

Shouldn't that be rephrased to not be restricted to string prefixes but
also allow numeric prefixes followed by an alpha-string, such that "2A"
is sorted before "10A"? At least that's what step 2 implies if #1 prefix
substring is empty, and the intended behavior:

> Step 2. Next, each of the two strings is divided into three parts:
> 1.Prefix substring 2.Numeric substring 3.Suffix substring The prefix
> substring is determined by locating the first occurrence of a digit
> character; the substring from the very first character through the
> character preceding the first digit is considered the prefix. Now, if
> the first digit happens to be the first character of the whole string,
> the prefix substring becomes empty.

  Eike

-- 
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]