I’m developing a LibreOffice extension for managing spreadsheet documents, using C++ UNO API. It’s necessary to set some cell annotations in the document. I’ve succeeded to set annotation text, but the annotation author is always “anonymous”. Setting the document author doesn’t help. I found a solution which tells to retrieve XPropertySet interface from the XSheetAnnotation class object and then set the “Author” property, but it fails - the XSheetAnnotation class doesn’t export XPropertySet. Could anybody suggest a working solution?
I think it’s much questionabe if there should be an easy way (LibO-internal) to change an annotation author. Would you like somebody to use your name as the fake author of a grave offense, e.g.?
Why??? I can set the author name of the whole document via the UNO API. My goal is to set the same name in all the cell annotations, in order to avoid the “anonymous” string in them, or, as a last resort, to hide these strings at all. But it seems to be impossible, I can’t guess why.
for reference, that’s your API entry pt : https://opengrok.libreoffice.org/xref/core/sc/source/ui/unoobj/docuno.cxx?r=c0b14ab#5190 where author is just nullptr.
then annotation / versioning = redline :
so …