Hi Regina, On Tue, Mar 19, 2019 at 08:22:44PM +0100, Regina Henschel <rb.henschel@t-online.de> wrote:
it is about bug https://bugs.documentfoundation.org/show_bug.cgi?id=124212 Adjustment handle reacts wrongly, if custom shape has a non default viewBox A fix is in https://gerrit.libreoffice.org/69439 But I have no idea how to make a unit test for it. Perhaps you?
Here is what I would try: - Crete a document manually that has a custom shape in it. - Load that in a cppunit test. - Get access to the underlying SdrObject, and downcast it to SdrObjCustomShape - Create a EnhancedCustomShape2d manually, taking a reference to your SdrObjCustomShape. - At that point you can call the SetHandleControllerPosition() function you modified in your code change and hopefully the AdjustmentValues key of the SdrObject's SdrCustomShapeGeometryItem would allow you to assert if the end result is good or bad. This is really similar to what's done already in svx/qa/unit/customshapes.cxx:267. I.e. if possible, I would try to not emulate a full actual mouse drag in the test. Regards, Miklos
Attachment:
signature.asc
Description: Digital signature