How to protect inserted comments from deletion ? - Writer

Hello, I inserted comments in LOwriter document. I deleted some texts, and inserted comments “in” the deleted text were also deleted.

How to “protect” inserted comments from deletion ?

Thanks for your support,

Comments are attached to some text (it is an “attribute” of this text). If you need “persistent” comments, then they are not specific to the text which may be deleted. Consequently, attach the comment to some other “object”. Unfortunately, comments can only be attached to text. You can’t attach it to frames (or else attach it to frame text)? But the frame can also be deleted (with its contents and comments).

An alternate solution is to make your comment inline with text. This is not strictly equivalent since you dedicate a paragraph to this role. But you can change paragraph attributes to Hidden so that it does not print.

To have the comment paragraph visible on screen, adjust Tools>Options, LibreOffice Writer>View to display Hidden paragraphs and Hidden text. It will work after enabling View>Formatting Marks.

The best thing to do is to define a dedicated paragraph style for your comments.

EDIT
There may be an imperfect workaround.

Attach a frame to the paragraph to be commented. For ease of repetition, create a frame style with all the needed properties (frame positioned in the margin, no border, wrap through, minimal size, …). On second addition of a “persistent” comment, you only need to style the new frame with a double-click. Add the comment to the frame.

As long as you don’t select full paragraph contents + paragraph mark before erasing text, the frame will be reattached to the next paragraph. Thus, your comment survives text deletion.

It is a bit contorted and does not cover the case where you delete the full paragraph including its paragraph mark, but it should be good in 90% of cases.