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


Miklos Vajna schrieb am 11-Apr-19 um 09:59:
Hi Regina,
I might be wrong, but I would expect that the evaluation of the formulas
don't depend on the shape type. If it does, it feels we don't understand
the general rule, so we work the problem around with evaluating a
formula in different ways for different shape types.

Evaluating the formulas _is_ independent from shape type. But for getting the adjustment value, you need to revers the calculation.
Shortened example for evaluating the formula:
To get the y position of the handle:
wedgeRectCallout: y = vertical center + adjust * height / 100000
star4 : y = vertical center - adjust * height / 100000
diagStripe : y = height * adjust / 100000

Currently we have only "adjust = y * 100000 / height" to get the adjustment value from the position. That fits to the diagStripe but not to wedgeRectCallout and star4.

The problem with the ooxml-shapes is, that they bind the handle position to a formula result and not directly to the adjustment value.


Would that be OK? If yes, which are suitable C++ tools to do that and where
should the parts be placed?

Sure, if special-casing on the shape type improves the situation, then
it's better than nothing.

I would like a generic solution too, but I see no way to do it.

 I would keep it simple: just create an enum
with the different cases, and then you can have a switch to handle each.
If the function gets large, extract the handling of complicated cases to
their own functions.

I think I'll just start and work out a concrete proposal. Then it might be easier to discuss possible better solutions.

Kind regards
Regina


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.