Weekly report about character border

Cedric Bosdonnat cbosdonnat at suse.com
Mon Jul 1 00:26:41 PDT 2013

Hello Tamas,

On Sun, 2013-06-30 at 18:35 +0200, Zolnai Tamás wrote:
> Some notes about my progress in the second week.
> In this week I added the "Borders" tab page to the character dialog
> and so the UI part of the implementation works. After this I started
> to learn about character attributes, fonts and layout.


> Questions of this week (some of them are answered just partly):
>   - How to use a general attribute (e.g. background, or in our case
> border) as character attribute?

Just set it to the appropriate SfxItemSet as any other attribute.

>   - Is it necessary to add a separate character attribute or just use
> the general one?

You should may be look at what is done for the character background as
we may have the same problems there. The problem would be that the
paragraph and caracter attributes could conflict in some cases.

>   - How does the system store attributes? (SwFmt, SwAttrSet,
> SwAttrStack)

You got the proper classes. If you need some help to debug the
SfxItemSet, you can have a look at my old gdbinit here (function


>   - How to paint text lines into font structure? (e.g. overlining,
> underlining, strikethrough)

IMHO that would be too limited for borders work... remember all the
border types we can have (those specified by CSS at least).

>   - How does layout frame work? How does frame hierarchy look like?
> How to calculate the border properties of the current frame?
> (SwBorderAttr)

Do you know this wiki page explaining quite a lot of things?

Characters are at a lower level as these are SwLinePortions. You can
also debug that by exporting SW_DEBUG=t, open a sample document, and
press F12: that will dump a layout.xml in $PWD. This layout.xml will
show you quite a lot of informations on the layout structure. (Shift+F12
will do the same with a nodes.xml showing the model structure).


More information about the LibreOffice mailing list