Bug 45778 - [RFE] Insert image not in a new paragraph but in the current position or as character
Summary: [RFE] Insert image not in a new paragraph but in the current position or as c...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 129299 (view as bug list)
Depends on: 87719
Blocks: Writer-Images Writer-UX Options-Dialog-Writer
  Show dependency treegraph
 
Reported: 2012-02-08 06:56 UTC by Nicolas Mailhot
Modified: 2021-08-10 15:06 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Mailhot 2012-02-08 06:56:43 UTC
When one inserts an image in writer it does not anchor it to the current paragraph but creates a new empty paragraph after the current one

This is a major PITA as it makes it woefully hard to attach an image to a specific paragraph so they're on the same page (one needs to select the anchor point and move it, which is currently badly handled in writer, especially if they are on different pages; and then you need to locate the stupid additional paragraph and cull it)

An inserted image should be inserted at the insertion point (the paragraph where the cursor is) and not somewhere else which is free to move in another place of the document
Comment 1 sasha.libreoffice 2012-03-21 07:46:15 UTC
Reproduced in 3.5.1 on Fedora 64 bit
Steps to reproduce:
0. Start Writer with some document
1. Switch to file manager (in my case was Krusader) and select picture file
2. Press Ctrl-C
3. Switch to Writer and press Ctrl-V
Expected: picture inserted in place of cursor (text caret) 
Actually: there new paragraph entered, and then picture

IMHO this behaviour should be adjustable: insert new paragraph or no, how should be anchored new picture.
Comment 2 Jose Gómez 2014-05-19 11:47:09 UTC
I can confirm the issue. Sometimes imported images appear in unexpected places.
Comment 3 Jose Gómez 2014-05-19 11:49:14 UTC
Note that when inserting images in Microsoft Word, these are by default inserted as a character, and with text wrapping enabled. This way, images have by default a space in the document (the expected space), and images don't overlap with each other.
Comment 4 QA Administrators 2015-06-08 14:41:22 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2015-06-21 16:57:11 UTC
So this is an enhancement.
Comment 6 Thomas Lendo 2018-11-14 22:01:59 UTC
Adding needsUXEval as this makes an impact of the general image handling in Writer.
Comment 7 Franklin Weng 2019-05-05 07:45:01 UTC
This problem can still be reproduced in 

版本:6.2.2.2
組建 ID:2b840030fec2aae0fd2658d8d4f9548af4e3518d
CPU 執行緒:4; OS:Linux 4.19; UI 算繪:預設; VCL: kde4; 
語言地區:zh-TW (zh_TW.UTF-8); UI語言:zh-TW
Calc: threaded

It should be a fundamental feature.
Comment 8 csongor 2019-05-07 23:38:17 UTC
This is an issue I also planned to report in a slightly different way. The way how I think it could be solved is the following. There are two options.

1,
There should be a page called Insert Image Settings under the Tools -> Option -> LibreOffice Writer item containing the following settings from the right-click menu of an image:
- Insert As: Stripped HTML/HTML format without comments/Bitmap Image
- Anchor: To Page/To Character/To Character/As Character
- Align: Left/Center/Right and Top to Anchor/Middle to Anchor/Bottom to Anchor
- Arrange: In Front of Others/Behind Others (Forward One and Back One are pointless here)
- Size: Original/Fixed Width:X/Fixed Height:Y/Fixed Size:X*Y

Yes, these things can be adjusted after the image has been inserted but if you work with a lot of images then it is quite cumbersome.

I almost always use the anchor "As Character" but I know someone who uses "To Page" all the time so it would be nice to have it as a configurable setting.

Or...

2,
The newly inserted image just should copy the settings of the last image. It looks to be easy for the Insert As, Anchor and Align settings and maybe it could work for the Arrange as well. 

Only the size setting would be missing which is bad but this solution seems to be much easier than adding a new page to the Options dialog. So I could accept this solution as well.
Comment 9 Heiko Tietze 2019-05-09 14:23:10 UTC
We talked about this topic in the design meeting. The change is welcome (and accepted by the ESC). More options may unnecessary clutter the Ui so I ask the community [1] and we would introduce it in case of a clear split. (Advanced options per expert settings are always possible.)

[1] https://twitter.com/liboDesign/status/1126492095601049600
Comment 10 jan d 2019-05-09 19:01:35 UTC
Insertion as character makes sense to me. It is easy to understand and a lot of defaults in Word make sense, too. 

I would be against yet another setting as it is easily confusing for users and can make testing and further development harder.
Comment 11 Regina Henschel 2019-05-09 20:13:49 UTC
If an image is anchored "as character", then horizontal movement and text wrap is not possible. And vertical movement will changes the line height but does not move the image to a very different position on the page. I'm sure we will get a lot of complains that "positioning image with mouse" is broken, when you will make "as character" the default.

Word knows two states, "Inline" and "Floating". "Inline" acts the same as "as character" in LibreOffice. But default in Word is "Floating".

The import of Word documents maps "Floating" to "to character".

I suggest this behavior as default:
If the cursor is in an empty paragraph, then anchor "to paragraph", and if the cursor is inside text in a paragraph, then anchor "to character".

Besides that, bug 79160 should be fixed and the file explorer should provide an additional, special style "graphic as character".
Comment 12 Heiko Tietze 2019-05-09 21:20:51 UTC
(In reply to Regina Henschel from comment #11)
> If an image is anchored "as character", then horizontal movement and text
> wrap is not possible. 

Isn't that exactly what users want? Except from the line height issue when moving up/down.
Comment 13 Heiko Tietze 2019-05-16 08:05:58 UTC
Quick poll on Twitter revealed no clear picture how users anchor 31% To Page, 39% To Paragraph, 7% To Character, 23% As Character (some comments "it depends").

Another option might clutter but would be the correct reaction to this result. And such an option is easy to understand compared to some magic function that combines the recently applied properties and takes it into the next operation (comment 8).

It might be not too difficult to add the option, so easyhack.
Comment 14 Heiko Tietze 2019-12-05 06:25:44 UTC
On bug 87720 comment 33 it's reported as fixed though without an option. QA, please verify.
Comment 15 Aron Budea 2019-12-05 06:48:23 UTC
(In reply to Heiko Tietze from comment #14)
> On bug 87720 comment 33 it's reported as fixed though without an option. QA,
> please verify.
It was changed to "As Character" and then to "To Character" by the following commits:
- https://cgit.freedesktop.org/libreoffice/core/commit/?id=4f40bf6a79de6d60da0a5090cdfeda6242e889f0
- https://cgit.freedesktop.org/libreoffice/core/commit/?id=a7528cd6f17ea5c5b29e7d607e54c62de0d9e7db

In my opinion bug 87719 has to be fixed before the default is changed to "As Character", though an option can be introduced regardless.
Comment 16 Heiko Tietze 2019-12-10 08:30:05 UTC
*** Bug 129299 has been marked as a duplicate of this bug. ***
Comment 17 Dieter 2019-12-10 10:26:39 UTC
Comment from Heiko Tietze in bug 129299: "So the default anchoring should be defined at tools > options > writer > something."

I totally agree with that proposal and would like to focus bug 45788 to this idea.