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


Hi Kohei,

On Mon, Feb 27, 2012 at 18:34, Kohei Yoshida <kohei.yoshida@suse.com> wrote:
On Mon, 2012-02-27 at 12:15 -0500, Kohei Yoshida wrote:
Hi Albert,

Pushed both of your patches to master without modifications.

Actually, now I have an issue with changing the formula syntax in the
UI.  The new value won't stick for some reason.

I'm debugging this at the moment.

Oh, sorry for that. It is probably due to one of the conversions being
incorrect. Around line 1046 in scmod.cxx you have this:

 if (rOptSet.HasItem(SID_SC_OPT_FORMULA_GRAMMAR, &pItem))
    {
        sal_uInt16 nVal = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
        ::formula::FormulaGrammar::Grammar eOld = pAppCfg->GetFormulaSyntax();
        ::formula::FormulaGrammar::Grammar eNew;

        switch (nVal)
        {
        case 0:
            eNew = ::formula::FormulaGrammar::GRAM_NATIVE;
            break;
        case 1:
            eNew = ::formula::FormulaGrammar::GRAM_NATIVE_XL_A1;
            break;
        case 2:
            eNew = ::formula::FormulaGrammar::GRAM_NATIVE_XL_R1C1;
            break;
        }

Here nVal should somehow be converted to from sal_uInt16 to
::formula::FormulaGrammar::Grammar (eNew). I fiddled around quite abit
with this and think I never got it right. The above is of course
completely wrong, it was a short-cut I was thinking about at the time,
I storing the position of the drop down list as an integer, which I
know is NOT the way to do it.

Some kind of static_cast should be used I guess but how?

/Albert

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.