Hi Regina,

On Wed, Apr 10, 2019 at 02:41:17PM +0200, Regina Henschel 
<rb.hensc...@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.

Regards,

Miklos

Attachment: signature.asc
Description: Digital signature

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to