https://bugs.documentfoundation.org/show_bug.cgi?id=154133

            Bug ID: 154133
           Summary: Writer: Erroneous handling of initial tab in hanging
                    indent paragraphs with border
           Product: LibreOffice
           Version: 7.4.5.1 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 185908
  --> https://bugs.documentfoundation.org/attachment.cgi?id=185908&action=edit
Wrong initial tabulation with negative first line indent and border

When configuring a paragraph style for negative first line indent, an implicit
tab stop is defined at left indent. Thus you can enter e.g. a term then tab to
type its definition and line up nicely with lines 2+. This works fine with
large indents.

A hanging indent may also be used for comments where word COMMENT will be
followed by a linebreak and the comment itself. It gives a compact form for the
comment without the need for two paragraph styles.

Should a comment need more than one paragraph, you start the second paragraph
with a tab and don't enter the COMMENT "title", typing the next comment
paragraph instead.

This is a form of direct formatting but works fine.

Hanging indent paragraph can be emphasised with a border. Padding space is
added to avoid visual clutter between text and border. This padding space adds
some distance between top border and text and also between text and bottom
border, good. Right indent is shifted by the padding distance too, good but
there is no feedback in the horizontal ruler.

It looks like the left indent is treated differently depending on the first
character. Note again that there is no visual feedback in the horizontal ruler
and that the markers are not positioned where text will physically be laid out.

If first character is a printable character, everything is fine and text is
offset by the padding distance. If the first character is a tab, Writer seems
to compare "padding" position to unshifted left indent (consisted with ruler
display) to decide whether it should stop at left indent or jump to next tab
stop (in the attachment, default stops every 1.25cm).

This becomes apparent when padding is slightly smaller than left_indent: text
starts at unshifted left indent and second line which is aligned at
padding+left_indent does not line up with the first one.
If padding is really smaller than left_indent, text is set as expected.
If padding is larger than left_indent, text starts at first available default
stop.

The issue seems to be in the computation of the target position after the
tabulation. IMHO padding has been forgotten.

Tested with 7.4.5.1 under Fedora Linux 37, Plasma desktop. But erroneous
behaviour has been present for ages, at least since 4.x releases.

Possibly related: bug 125336

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to