Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi Arno,

On Monday, 2012-07-23 18:16:44 -0500, Arno Teigseth wrote:

Figured out how to break my LO's language list box, so that it would
only show languages with installed checkers:

http://imgbin.org/index.php?page=image&id=8868

cool :)

But, what I'm after is sorting the listbox by
1) Languages with Installed checkers then
2) Languages without

Now, I can't find where in the listbox control source the actual
sorting takes place? Any hints?

The listbox control does that, it's enabled in
svx/source/dialog/langbox.cxx SvxLanguageBox::Init() with

    // display entries sorted
    SetStyle( GetStyle() | WB_SORT );

So if you wanted two sections sorted each you'd have to disable that,
obtain all entries - basically what's done in
SvxLanguageBox::SetLanguageList() but without calling InsertLanguage(),
sort the two sections independently and insert the sorted entries in
order.

Note though that the sort is not a mere code point sort, a usual sort
algorithm will fail for several translations and/or mixed alphanumeric
strings, details are in vcl/source/control/ilstbox.cxx
ImplEntryList::InsertEntry() and the NaturalStringSorter there above.


-----BEGIN PGP SIGNATURE-----

Btw, I'd recommend to change the signature from old style inline-PGP to
PGP/MIME so that it doesn't clutter up the message text anymore. In
Thunderbird's Account Settings go to OpenPGP Security and enable Always
use PGP/MIME. See
http://enigmail.mozdev.org/documentation/per-account.php.html

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

Attachment: pgpYSHr7H5udn.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.