Index ¦ Archives ¦ RSS

RTF shape import: group scaling and flip in LibreOffice Writer

Estimated read time: 1 minutes

Some kind of simple logo was reported to be mis-imported in the RTF filter, it looked like this:

https://farm8.staticflickr.com/7451/27320164444_f437d0418e_o.png

which is interesting, but the reference output is different:

https://farm8.staticflickr.com/7317/27898228066_f5918e59bf_o.png

With a bit of investigation, it turns out this was a flipped group shape with a few rectangles, so the mis-rendering of the logo was due to two independent problems. The first is that the child shapes inside a group shape were scaled incorrectly. See the commit for the exact details, after fixing scaling, it looked closer to the original:

https://farm8.staticflickr.com/7301/27320164424_4ce2ced16c_o.png

The second problem was that the group itself was flipped, and this was again ignored on import. After fixing that problem:

https://farm8.staticflickr.com/7228/27898228076_f89fabeb00_o.png

the result is basically the same as the reference. Both fixes are not only on master (towards LibreOffice 5.3) but also backported to LibreOffice 5.2. :-)

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.