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


Hi julien2412,

On Saturday, 2015-06-06 07:54:57 -0700, julien2412 wrote:

I created a bugtracker for this, see
https://bugs.documentfoundation.org//show_bug.cgi?id=91899

It's not a bug ;)

I'm looking for a way to do this:
     91             bResult &= oSheet.getCellByPosition
     92                 (CA.Column,
CA.Row).getFormula().equals(<translateFunctionInLocaleUI>("Filter"));

What you probably want instead is to execute the test always in an en-US
locale, translating a formula expression between locales without
compiling the formula in one locale and outputting the code in another
locale as string would be hard to achieve if not impossible. In general
you want to run ~all tests in an en-US locale and not an arbitrary
locale inherited from the system.

In this case it's the UI locale/language that's relevant for
spreadhsheet function names AND the locale for representation of numeric
values.

Instead of changing the UI locale you can also switch the function names
to English in Tools -> Options -> Calc -> Formula "Use English function
names".

Changing locales and function names should be available through the
configuration access API, but I don't know by heart.

Another possibility would be to use the XFormulaTokens interface at the
cell object and getTokens() and compare the returned
sequence<FormulaToken> to known values or ones obtained through
XFormulaOpCodeMapper::getMappings(), but I doubt you want to get into
that for your problem..

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

Attachment: pgpC2Bff84lik.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.