Index ¦ Archives ¦ RSS

Fixing Base form image backgrounds

Estimated read time: 2 minutes

In this post I want to go further, and after touching Calc, here is my first story about Base. Of course I lie, it seems that Base forms are kind of read-only Writer documents, at least that’s how I could fix the bug I’m describing here. :-) The topic is still the same, rounding rough edges after the fill attributes rework, this time a stretched background of a Base form. (Which was not stretched at all, it was simply centered both horizontally and vertically on the page.)

I’m not entirely sure how the document from tdf#92586 is created, but the interesting part from styles.xml is:

<style:page-layout-properties ... style:repeat="no-repeat">
     <style:background-image ... style:repeat="stretch"/>
</style:page-layout-properties>

So the schema allows specifying the way how the bitmap is repeated at two places, and in the past the later attribute won, and with the rework this got lost.

An additional problem that the commit had to solve is that the attribute on the page-layout-properties XML element is mapped to our FillBitmapMode API, while the attribute with the same name on the background-image XML element is mapped to the BackGraphicLocation API, which is specific to Writer. As a result, now there is a compatibility map from the old enumeration to the new one, that’s how the bug document is now rendered the same again, as in the past.

The fix is already backported to the libreoffice-5-0 branch.

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