Bug 121378 - Writer/UI: Adding Captions to Images is very Unpractical (Width of Image Changes with Width of Frame, Does not use Default Frame Style etc)
Summary: Writer/UI: Adding Captions to Images is very Unpractical (Width of Image Chan...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Keywords: needsUXEval
Depends on:
Blocks: Caption
  Show dependency treegraph
Reported: 2018-11-12 20:42 UTC by Adalbert Hanßen
Modified: 2019-05-10 19:13 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:

Bug report with some screenshots (65.02 KB, application/vnd.oasis.opendocument.text)
2018-11-12 20:44 UTC, Adalbert Hanßen
The dialog for Caption settings looks like this (76.31 KB, image/jpeg)
2018-11-13 01:46 UTC, Dieudonne Dukuzumuremyi
After inserting Caption, the cation is taken by the size of the image (56.90 KB, image/jpeg)
2018-11-13 01:47 UTC, Dieudonne Dukuzumuremyi

Note You need to log in before you can comment on or make changes to this bug.
Description Adalbert Hanßen 2018-11-12 20:42:30 UTC
This report was made with LibreOffice Writer Version:, Build ID: 65905a128db06ba48db947242809d14d3f9a93fe, CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; Locale: de-DE (de_DE.UTF-8); Calc: group threaded run on Xubuntu 16.04.3 LTS with current kernel 4.4.0-116-generic x86_64.
Probably it is present in all other versions of LO too.

If I add a caption to an image, the width of the caption is taken automatically as the width of the image. That’s quite unpractical for narrow images because the caption spans several lines and becomes unreadable. If one enlarges the width of the frame (e.g. to 100% width of the paragraph), the size of the image is also blown up to frame size of the frame introduced by the function Insert>Caption. One has to click outside the frame and its contained image, then on the image itself and reset to the original size or to the size which the image was given before. That’ very clumsy.

After the frame size has been widened, the size of the image is also blown up.
After the picture has been resized to its original size still the frame size is bigger than necessary. Although the position is set to “Below” a forced linefeed before the term is missing.

By manually resizing the frame height I finally get the size I actually wanted.

I could place a paragraph mark before Figure but no manual line break! So I also have to modify the Spacing below for the style “Figure“ to prevent a too much space below the picture.

I tried to modify the default alignment for “frame” in order to let the caption be placed in a frame
100% of the current paragraph width,
alt least 4 mm height but it shall extend automatically if the content needs more space, 
left aligned
but the caption and the image shall be centered with respect to the frame (which can be achieved by changing the default setting for the paragraph styles for Caption and Figure). Unfortunately the horizontal placement and the anchoring options are inaccessible in the dialog to modify my document’s stylesheet. They only become accessible for an existing frame anchored to a paragraph. But even then the frame is offset to the right by 2 mm (try it out: this is probably a real bug). Unfortunately I could not update the style for a frame to become the default style for any new frame. I did not find a workaround to streamline at least the placement of the caption-frame.
I propose to provide a standard frame for image captions and one for table captions which will be automatically taken for all new frames produced by the function Insert Caption.
Further observation: No footnote can be attached to a caption because subdialog items of Insert Footnote and Endnote are greyed out if the cursor is on a caption. Fortunately I can edit a caption. But it should be possible to attach a footnote to it (like image taken from …).

Steps to Reproduce:
1. Paste a narrow picture to a LO Writer document
2. Make a caption for it
3. widen the width of the caption's frame 

Actual Results:
In step 2 the width of the caption is taken from the width of the image
In step 3 the size of the picture changes. There also should be a forced linefeed after it.

Expected Results:
Size of the image does not change when the frame for the caption is resized.
It should be possible to define properties for a default frame for a caption: in the most general case one for all tables, one for all images.

One should be able to define horizontal alignment for these prototypes in the <F11> Mange Styles dialog.

Reproducible: Always

User Profile Reset: Yes

OpenGL enabled: Yes

Additional Info:
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: de-DE (de_DE.UTF-8); Calc: group threaded
Comment 1 Adalbert Hanßen 2018-11-12 20:44:14 UTC
Created attachment 146575 [details]
Bug report with some screenshots
Comment 2 Dieudonne Dukuzumuremyi 2018-11-13 01:44:06 UTC
I used LibreOffice Version: (x64)
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 8; OS: Windows 6.3; UI render: default; 
Locale: en-US (en_US); Calc: group threaded

1. Created a new Writer file
2. Insert a new Picture: Isert menu-?Image-> select image from my computer
3. Insert a Caption: Insert Menu-> Caption
4. Fill the Caption text in Dialog wizard
5. Clock Ok.

Received result:
The result is the same as you reported. The caption is taken by the size of the inserted picture.
Comment 3 Dieudonne Dukuzumuremyi 2018-11-13 01:46:21 UTC
Created attachment 146578 [details]
The dialog for Caption settings looks like this
Comment 4 Dieudonne Dukuzumuremyi 2018-11-13 01:47:20 UTC
Created attachment 146579 [details]
After inserting Caption, the cation is taken by the size of the image
Comment 5 Thomas Lendo 2018-11-30 20:50:49 UTC
For me, this is an expected behavior. I want that the frame and the picture have the same dimensions and that the picture is 'linked' to the frame so that the picture also changes when the size of the frame changes.

Many users don't know the difference between frame and picture. With the current behavior its easier for them to work with pictures that include captures.

That a caption's width is limited to the picture is a side effect of this behavior but every change would create many new bug reports.
Comment 6 Thomas Lendo 2018-11-30 20:54:03 UTC
For every frame style problem, please create a new bug. Keep it short and present reproducible steps or use cases. One bug for one issue.
Comment 7 Timur 2019-05-10 14:37:12 UTC
I would like this to be as requested. But that would require a change in image and frame logic.
Comment 8 Heiko Tietze 2019-05-10 19:12:47 UTC
The caption requires a frame so the request is to have the initial frame width like the page width (and not scale the image). I would expect "relative size" and 100% does the trick but doesn't. Regina, any idea?

Second part is about the paragraph style "Figure" that is applied to above the image and not the caption text. Reason here is that the figure that has no break nor is anchored as character. I don't see a solution.