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


Hi all,

the current implementation of custom shape commands U and T (angleellipse) is wrong in the way, that for a command U with a series parameter groups only the first it treated as command U but the second as command T. Thus a line is drawn, where no line should be. My patch fixes this. I now want to make a unit test for it. I thought, that I make a bitmap from the page or from the shape and look, whether the pixel at the place of the line has the stroke color or the background color. But I cannot create a bitmap.

I have tried to do it the same as in SdImportTest::testTdf93124 in import-tests.cxx in sd/qa/unit. But I only get a bitmap of the page without the shape.

I have some other ideas, but without success:
Save the file and examine the thumbnail. How can I load the thumbnail out of a package? Using dispatcher and convert the shape to a bitmap. How to use dispatcher in a unit test? I only now it from macros.

Other methods to get a bitmap from a page or shape?

Or do methods exists to get the color at a position without bitmap?

Or any other idea, how to test it? The erroneous line is always between the segments, so that my trick of the other tests, to look at the bounding box, does not work here.

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.