[Libreoffice-bugs] [Bug 131302] New: Hidden hard linebreak character inserted between image and its caption

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Mar 12 07:30:26 UTC 2020


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

            Bug ID: 131302
           Summary: Hidden hard linebreak character inserted between image
                    and its caption
           Product: LibreOffice
           Version: 5.3.0.3 release
          Hardware: All
               URL: https://ask.libreoffice.org/en/question/233189/
                OS: All
            Status: UNCONFIRMED
          Keywords: bibisected, bisected, regression
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com
                CC: caolanm at redhat.com

When a caption is added to an image, there's a hidden linebreak character
between the image and the inserted caption.

Steps:
1. Insert an image
2. Right-click it and add caption with some text
=> this creates a frame holding the original image (now having "As Character"
anchoring) plus inserted caption, both in the same paragraph
3. Select the image (not the frame!) and drag its lower right handle to shrink
it to allow the image and its caption to be on the same line
4. Put cursor in the caption, and use left arrow key to step through characters
up to the image

There's a step when the cursor gets to the left of the first character of the
caption, staying between the caption and the image, when the next press of left
arrow does not move it, but only changes its size. The next press after that
finally moves it to the left of the image.

The hidden character may be selected, and its direct formatting be cleared to
make it not hidden.

The user-visible problem with the character is that it's shown as leading space
in figure index (see https://ask.libreoffice.org/en/question/233189/).

In versions 5.0 and earlier, the image was anchored "to paragraph", and there
was no characters before first character of caption in the caption's paragraph.

The hard break was introduced for v.5.1 in
https://gerrit.libreoffice.org/plugins/gitiles/core/+/93ab0ff24cb71c36c9e7958046e96d7472b5af90
(related to tdf#93676).

The hidden attribute was introduced for v.5.3 in
https://gerrit.libreoffice.org/plugins/gitiles/core/+/feedd45ba2dd308af2d3a1b2f64681b9467535b6
(which BTW broke the idea that hard break should keep the graphic separated
from the caption text if the outer frame is resized).

Removing the character doesn't bring immediately observable problems (it works
as with it, because hidden hard break does effectively nothing for text flow).
However, simply removing it looks incorrect if potential fix for tdf#65323 is
taken into account (which would make an as-char image to behave as printed
"alphabetic-like" character, which could disallow automatic line break between
the image and the immediately following alphabetic character). IMO, a better
fix would be to keep image anchored as character (as it is now), but make a
separate paragraph for it (using the same Figure paragraph style; separate
dedicated style seems to not be required, since figure index does not list
paragraphs without number range field), and put the caption on the next
paragraph.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200312/679cc301/attachment.htm>


More information about the Libreoffice-bugs mailing list