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:

Old result

which is interesting, but the reference output is different:

Reference result

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:

Closer to the original

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

New result

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.