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


On Sat, 2011-05-07 at 20:15 +0100, Michael Meeks wrote:
On Sat, 2011-05-07 at 13:03 -0430, Rafael Dominguez wrote:
Well it does look weird, but its the same object getting compared on
both sides, so i think theres a problem there, but better wait for
someone with more experience in the code say something about it.

      In libreoffice-3-3 we had:

#if CHART_ADDRESS_CONV_WORKAROUND
        ::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention();
        if (eConv != eConvUI)
            return ((rAddress.Parse(sToken, const_cast<ScDocument*>(pDocument), eConvUI) & 
SCA_VALID) == SCA_VALID);
#endif

      Around here instead of:

            if (!bResult && eConv != eConv)
                bResult = ((rRange.aStart.Parse(
                    aUIString, const_cast<ScDocument*>(pDocument), eConv) & SCA_VALID) == 
SCA_VALID);

      It seems pretty bogus doing the same parse again - you would hope the
function would fail in the same way :-)

The second parse is supposed to be done with eConvUI, and the if
statement is supposed to compare eConv vs eConvUI.  And the line 

::formula::FormulaGrammar::AddressConvention eConvUI =
pDocument->GetAddressConvention();

is missing in those places where the eConv != eConv condition is
evaluated.

This code was placed as a workaround to a bug where the chart addresses
were unintentionally saved using the current UI address convention,
where they were supposed to be saved using the Calc A1 address
convention at all times.  This code was initially placed probably around
the Go-OO 3.2 release, but I don't remember the exact release.

The idea was to keep that code for several releases, and eventually
remove it, which is why it was guarded with the big and bold
CHART_ADDRESS_CONV_WORKAROUND macro guard.  But alas, now that macro
guard is taken away...

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida@novell.com>


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.