Hi Miklos,
Miklos Vajna schrieb am 20-Mar-19 um 09:28:
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.
Thank you.
That works, at least locally. Let's see what Gerrit says.
I.e. if possible, I would try to not emulate a full actual mouse drag in
the test.
Not emulating a full actual mouse drag makes things a lot easier.
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.