Inserting comments in Writer Documents - unexpected behaviors

In writer, one can insert comments in selected text objects for any purpose, as shown here:

https://help.libreoffice.org/latest/en-US/text/shared/01/04050000.html

If the commented selection is a text, and if it is copied or cut and then pasted in a different location, the comment is preserved. However, if the comment is anchored to a formula object (Math), or an image (e.g. a Bitmap Image, a GDI metafile, etc.) and this object is copied or cut and then pasted, the comment is lost.

Any reason why comments for these objects (and possibly other besides text) are not preserved?

Also, if the (commented) selected text is deleted character by character until it disappears, the comment is preserved and passes to the previous word, or is left alone in an empty line. This can be very confusing for the user (and users editing or reviewing a text). In fact the “comment” feature is very bugged.

Environment:
Ubuntu 25.04
LibreOffice
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 520(Build:2)
CPU threads: 24; OS: Linux 6.14; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:25.2.2-0ubuntu1
Calc: threaded

An object isn’t text. If it is anchored as text then presumably the comment and the anchor are at the same point so are copied together. Otherwise, you have to copy enough text to include the object anchor and the comment anchor.

The comment anchor is shown as a triangle, if you delete that the comment will be deleted. In the image below you can delete the comment immediately by backspacing. If you delete forwards then you need to delete the entire word plus the anchor but before the fullstop.
CommentAnchor

From a look at the underlying XML, a comment is never attached to an object like an image. It is anchored to some text. In the case of an image, it is anchored next to the image anchor. What happens to the comment depends on the selection extent (and apparently when you select only the image, something not well specified happens).

1 Like