Character border (fdo#35155)
In this summer I participated in Google Summer of Code and implemented border on the character level. So in the next 4.2 version of LibreOffice users will be able to set border around a run of characters.
The character border can be specified as a direct formatting via Format -> Character -> Borders tab and it also can be the part of a character style (e.g. Format -> Styles and Formatting -> Character Style). One special case of the latter is drop caps character style.
While I was working with character border and I was testing whether it works in all cases I realized that Drop Caps has some bugs which keep me from adding my new feature. So I have to solve them before I able to keep on my original project:
1. User defined background was shifted upward
Since border is drawn at the edges of the background, it was also drawn at the wrong place.
2. Changing line height
Height of the first line was changing unexpectedly when the drop cap letter's original height was bigger than the height of the following characters. Original means the height which it would have if it wasn't a drop cap. By now this original height is ignored during height calculation of the first line.Since border rendering increase this height with the border width, line height also increased with this width.
3. ODF import loses drop caps character style (fdo#43807)
It also loses the border including by this character style.
The implementation of character attributes and the specification of ODF file format make it necessary to add automatic border merge functionality. Border merge means that if two text ranges have equal border (same line, padding and shadow) they will be rendered inside the same border.
Border merge also means background merge, since this is a general concept to draw border at the edges of the background.
File formatsList of file formats to which/from which Writer exports/imports character border:
ODT, HTML, DOC, DOCX, RTF