Bug 90654 - when putting text with initals into a frame with automatic width, the frame is much too wide
Summary: when putting text with initals into a frame with automatic width, the frame i...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.6.2 release
Hardware: Other All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Frame
  Show dependency treegraph
 
Reported: 2015-04-16 14:40 UTC by Ulrich Windl
Modified: 2022-07-11 09:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document (14.53 KB, application/vnd.oasis.opendocument.text)
2015-04-16 14:40 UTC, Ulrich Windl
Details
Snapshot of what I see in LO5 master build left justified (33.40 KB, image/png)
2015-04-25 15:15 UTC, Alex Thurgood
Details
Snaspshot right justified (31.52 KB, image/png)
2015-04-25 15:17 UTC, Alex Thurgood
Details
partial screen shot: How sample document looks for me (LO 4.3.6.2) (16.22 KB, image/png)
2015-04-27 06:51 UTC, Ulrich Windl
Details
partial screen shot: What happens if I add more text to first line (LO 4.3.6.2) (19.05 KB, image/png)
2015-04-27 06:52 UTC, Ulrich Windl
Details
Screenscast showing the defect in LibreOffice 5.1.3 (openSUSE) (97.60 KB, video/webm)
2016-10-04 07:34 UTC, Ulrich Windl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Windl 2015-04-16 14:40:42 UTC
Created attachment 114825 [details]
Sample document

For a somewhat sophisticated design I ended up with a auto-width frame that is to be treated as a character at the footer line. Inside the frame I have one paragraph that has a two-line high initial enabled. When trying to put the frame right-aligned (using the right-aligned TAB), I found out that it won't work.

Looking closer I found that there is extra space at the inner right of the frame (that should adjust it's width to fit the content inside with no extra borders). The extra space is significant: In my case it's several centimeters.

While creating a text document, I found out that the first line of the paragraph causes the ill behaving.
Comment 1 Buovjaga 2015-04-18 11:02:21 UTC
(In reply to Ulrich Windl from comment #0)
> When trying to put the frame right-aligned (using the right-aligned TAB), I
> found out that it won't work.

How do you do this? Do you mean in the ruler?
Comment 2 Ulrich Windl 2015-04-20 06:49:33 UTC
(In reply to Beluga from comment #1)
> How do you do this? Do you mean in the ruler?
The footer has two pre-defined TAB stops: One at the center A centering one), and one at the right (a right-aligning one). So when I put the frame after the center tab, it should be right-aligned. Actually (as seen in the example) that doesn't matter regarding the problem: The frame is much too wide in ANY context. Just add some text in the first line inside the frame in my example and watch what happens to the right "X".
Comment 3 Alex Thurgood 2015-04-25 15:07:37 UTC
@Ulrich : when I open your document in LO master dev 500 alpha, the text in the frame is left justified, hence the space on the right, surely, that is the default behaviour ?

If I change this with Centre, or Right, or Justify buttons, I get correct results according to my choice - for example right justification does just that, the text is justified all the way to the rightside edge of the frame
Comment 4 Alex Thurgood 2015-04-25 15:12:44 UTC
@Ulrich : if I've not understood what it is you are trying to achieve, please provide step by step instructions
Comment 5 Alex Thurgood 2015-04-25 15:15:57 UTC
Created attachment 115090 [details]
Snapshot of what I see in LO5 master build left justified
Comment 6 Alex Thurgood 2015-04-25 15:17:57 UTC
Created attachment 115091 [details]
Snaspshot right justified
Comment 7 Ulrich Windl 2015-04-27 06:51:36 UTC
Created attachment 115129 [details]
partial screen shot: How sample document looks for me (LO 4.3.6.2)

Hopefully answering comments 3 and comment 4.
Comment 8 Ulrich Windl 2015-04-27 06:52:47 UTC
Created attachment 115130 [details]
partial screen shot: What happens if I add more text to first line  (LO 4.3.6.2)

Hopefully this shows that there's a major defect in the code.
Comment 9 Alex Thurgood 2015-04-27 16:52:25 UTC
OK, I can confirm this now that I understand what you are doing

Confirmed in 

Version: 5.0.0.0.alpha1+
Build ID: 950055bcb06c8edcd9062c71184f02bf8e0604e6
Locale : fr_
Comment 10 QA Administrators 2016-09-20 09:32:25 UTC Comment hidden (obsolete)
Comment 11 Ulrich Windl 2016-10-04 07:34:50 UTC
Created attachment 127797 [details]
Screenscast showing the defect in LibreOffice 5.1.3 (openSUSE)

I had 5.1.3 here for testing, and the defect is still there: I added characters at the end of the first line. The whole box increases its width even though the second line was still longer (the box should only increase its width when the first line is longer than the second line).
Comment 12 QA Administrators 2018-06-22 02:49:57 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2020-06-22 03:39:00 UTC Comment hidden (obsolete)
Comment 14 QA Administrators 2022-06-23 03:47:49 UTC Comment hidden (obsolete)
Comment 15 Ulrich Windl 2022-07-11 08:46:28 UTC
It seems the problem is fixed in version 7.2.7: I treid the original sample document, and I created a completely new one.
However I discovered another bug: If the initial first letter should be three lines high, but the text is only one line, the initial has normal size. Likewise when there are just two lines of text (the initial in only two lines high then). Only if the text has at least three lines, the size of the initial is correct. Maybe that's a different bug.
Comment 16 Buovjaga 2022-07-11 09:26:04 UTC
(In reply to Ulrich Windl from comment #15)
> It seems the problem is fixed in version 7.2.7: I treid the original sample
> document, and I created a completely new one.
> However I discovered another bug: If the initial first letter should be
> three lines high, but the text is only one line, the initial has normal
> size. Likewise when there are just two lines of text (the initial in only
> two lines high then). Only if the text has at least three lines, the size of
> the initial is correct. Maybe that's a different bug.

Thanks for testing. You could open a new report for the other issue. I recommend to first test with a master build, though.