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


Hi,

On 07.06.2020 3:50, Michael wrote:
I was looking at TDF 133647
<https://bugs.documentfoundation.org/show_bug.cgi?id=133647>, and I
guess, taking a step back, I'm not sure why there is an SwCalc class at
all. Shouldn't LibreOffice Writer be leveraging code from sc for
computing the result of a formula in a table?

I also used to think that way; and of course, it seems like that would
be great at the first glance. But actually, the formula in Writer's
table is just a specific case of more general formula in Writer - and
these formulas may appear in multiple places. E.g., in Insert Formula,
Set Variable and other fields' Value; in Hidden text/paragraph or
Database fields' Conditions; in sections' conditions. All them should
behave consistently, allow using document properties, and allow to refer
to others - like referring from a table cell to variables set somewhere
in the document. [1] [2]

Formulas in tables only add references to other cells (including between
tables), but share the same syntax. If one would consider changing to
Calc engine for computations, many aspects would need to be addressed,
including compatibility.

But in any case, the problem in tdf#133647 seems to be import/export
one, where syntax like sum(1,2,3) must be converted to sum 1|2|3. It
doesn't need changing SwCalc class itself.

[1] https://help.libreoffice.org/6.4/en-US/text/swriter/01/04090200.html
[2] https://help.libreoffice.org/6.4/en-US/text/swriter/02/14020000.html

-- 
Best regards,
Mike Kaganski

Attachment: pEpkey.asc
Description: application/pgp-keys


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.