Faulty handle position in shapes imported from MS Office
vmiklos at collabora.com
Thu Apr 11 07:59:46 UTC 2019
On Wed, Apr 10, 2019 at 02:41:17PM +0200, Regina Henschel <rb.henschel at t-online.de> wrote:
> The needed calculation depends on the shape type, the handle and the
> parameter ( X, Y, Radius, Angle) of the handle. Different handles of a shape
> can need different calculations. On the other hand, different shapes can use
> the same calculation for their handles, e.g all those, which are correct
> with the current implementation.
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.
> 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 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 195 bytes
Desc: Digital signature
More information about the LibreOffice