New line break attribute "clear"
rb.henschel at t-online.de
Wed Mar 16 15:24:10 UTC 2022
Miklos Vajna schrieb am 16.03.2022 um 10:43:
> Hi Regina,
> On Wed, Mar 16, 2022 at 10:18:44AM +0100, Regina Henschel <rb.henschel at t-online.de> wrote:
>> I wonder about the new attribute. Could you please explain it a bit (perhaps
>> on dev list?).
> Yes, let me copy the dev list.
>> I know a "clear" attribute from CSS. There it is an attribute to a
>> paragraph. Having it at line break would correspond to having it for a <br/>
>> element. That makes no sense to me.
> The new <text:line-break loext:clear="..."> attribute I added is to
> represent a clearing break. This is something HTML and DOCX has, so we
> had formatting loss when importing those formats, this extension is
> meant to fix this problem.
> OOXML documents the various types of a clearing break at 17.18.3
> ST_BrClear (Line Break Text Wrapping Restart Location), so far Writer
> layout just handles "all" and "none", the work is still in progress.
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.
> HTML has <br clear="..."> for the same.
"clear" is not an attribute in HTML, but you need to reference CSS. But
because the ODF <text:line-break> element has no way to reference a
style, your way by defining a new attribute is OK for me.
> sw/qa/extras/ooxmlexport/data/clearing-break.docx is a sample document:
> we used to incorrectly render this document without clearing breaks.
> Does that help?
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?
c) How can your new kind of line-break be used via API?
d) Does your "work in progress" includes export to epub and/or xhtml?
More information about the LibreOffice