New line break attribute "clear"

Miklos Vajna vmiklos at collabora.com
Thu Mar 17 11:16:42 UTC 2022


Hi Regina,

On Wed, Mar 16, 2022 at 04:24:10PM +0100, Regina Henschel <rb.henschel at t-online.de> wrote:
> OOXML has "left" and "right" and special rules for writing mode rtl. CSS has
> "inline-start" and "inline-end" to address writing mode. In a proposal to
> extend ODF, the behavior for other than writing mode ltr needs to be
> specified.
> 
> Have you considered vertical writing modes? The horizontal distances between
> the (vertical) lines are far too large in my build.

No, so far I only added layout for the "all" case, and tested only with
top->bottom left->right. But I'll take a look at RTL once the plain
left/right clear types are done.

> Yes, it is clearer now. Nevertheless I have some remarks:
> a) This version of a line-break has the same formatting mark as a simple
> line-break. That might be confusing. The user does not see, why the
> text-flow continues below the graphic object. MS Word has two bars in the
> formatting mark.
> b) Does your "work in progress" includes a UI?

Both of these are currently missing, but I plan to add them.

> c) How can your new kind of line-break be used via API?

Sure. Example to insert one:

https://github.com/libreoffice/core/blob/54642e58eb56282d2c172361cdedafcfad408a54/sw/qa/core/unocore/unocore.cxx#L225-L234

Example to get one:

https://github.com/libreoffice/core/blob/54642e58eb56282d2c172361cdedafcfad408a54/sw/qa/core/unocore/unocore.cxx#L268-L280

It's similar to how footnotes can be created / accessed.

> d) Does your "work in progress" includes export to epub and/or xhtml?

I'm currently focusing on ODT, DOCX, DOC, RTF, HTML and plain text.
(Implement support where possible, otherwise just check that we properly
downgrade a clearing break to a linebreak instead of loosing it.)

I think both epub and xhtml will downgrade a clearing break to a normal
linebreak out of the box, so there is no danger of loosing the linebreak
completely (which would be bad).

I'll get back to this thread when I think the feature is in a reasonable
state, because when it would make sense to file an ODF proposal for
this. (And then you can play around with the layout / UI.)

Regards,

Miklos


More information about the LibreOffice mailing list