Bug 133299 - Option to set the default anchor mode for images in Calc
Summary: Option to set the default anchor mode for images in Calc
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
Reported: 2020-05-23 06:43 UTC by zzz
Modified: 2021-11-02 08:40 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description zzz 2020-05-23 06:43:42 UTC
In current version, the anchor of a newly pasted image is fixed to "To Page". I want to change that default behaviour to "anchor To Cell" in the Options menu, with a new entry like: "default anchor mode when insert/paste/create image". For other types of objects(graphics,textboxes,videos etc.), I'm not sure yet of whether to share the same settings is better or not, so suggest to make each of them independently configurable (to avoid unexpected behaviour).
Also, when several images are "grouped" (object group, not the table group), the anchor mode of this new object should also honor this default setting.

Reason: For me, I always and only need "anchor To Cell". I often paste a lot of images. Forgetting to change even just one image from "To Page" to "To Cell" results in a disaster because whenever I resize or insert or delete some rows/columns or cells, the image will become orphaned on a totally different place from where I originally pasted it. This often happens somewhere far away from the visible window, found only a long time after, impossible to find when it had happened, which backup file is correct. So it is not solvable with the usual undo feature. And worse is that even if I found such an out-of-place image, I don't know where that image belonged to, so my whole work is instantly trashed. I personally never needed "anchor To Page", but some other people might, so the best solution is to make the default settings configurable. Another annoying bug/feature of current version is that even if I had anchored all images to cells, if I group some of them, the new object goes back to "anchor To Page", which is very easily forgotten to re-correct.
Excel already has the ability for user to set default paste anchor mode to "To Cell".
Comment 1 zzz 2020-06-16 03:56:58 UTC
To make it clear, this request is strictly only for Calc. I'm not sure what I want in other apps such as Writer or, um, the slides? app, but I'm quite certain that I would need them to be independently configurable. Please don't try to "integrate" them. (Although an "integration" in a different sense, to collect all settings into a single 2-dimensional matrix, would be very useful. Columns:apps; Rows:optiontrees)
Comment 2 Heiko Tietze 2020-09-09 10:18:21 UTC
Image handling was improved a lot recently and default anchoring is now To Cell. Nevertheless I can imagine some users might want to change the default. And since we have a similar request for Writer in bug 99646 it should be possible in Calc too.
Comment 3 Samuel Mehrbrodt (allotropia) 2020-09-09 10:26:28 UTC
Agree, when selecting a different value in the insert image dialog for anchoring, this should be remembered.

But I don't understand this bug, as the default is already "to cell" (as Heiko pointed out).
Comment 4 zzz 2020-09-09 12:32:14 UTC
Sorry that the reproducing condition was't clear enough.
The "To Page" mode happens when I PASTE an image from clipboard into the spreadsheet by either
* ctrl+V
* right-click|(context menu)|Paste

Re-confirmed that the symptom persists in Calc version (x64) too.
(for Menu|Insert|Image|Anchor, it does already default to "To Cell")
Comment 5 zzz 2020-09-09 12:50:09 UTC
Did a little more experiments (Windows 10; Calc version (x64)).
(A)Image copied from external apps (Firefox screenshot; IrfanView's Edit|Copy)
  Paste to Calc by
  * ctrl+V
  * right-click|(context menu)|Paste
  * Main menu|Edit|Paste
  All set the image to "To Page".
  Reproducibility 100%.

(B)Image copied from Calc
  Paste to Calc by
  * ctrl+V
  * right-click|(context menu)|Paste
  * Main menu|Edit|Paste
  All preserved the source image's anchor mode.
Comment 6 Samuel Mehrbrodt (allotropia) 2020-09-09 13:11:11 UTC
Ah so then we should set the default to be "To cell" when pasting images too.
Missed that when I changed the default for the insert image dialog.
Comment 7 Zoom 2021-11-02 08:40:16 UTC
Still relevant for pasting and drag-and-dropped images in the latest release. Currently it defaults to "to Page".

+ Would be nice to have as a configurable option.
+ A hotkey for changing anchoring mode could be useful.