A Redline is the UNO way of tracking changes to a text (reference). I am working on a macro that loops over the redlines in a Writer document and changes their authorship.
Reading the redlines is quite easy:
sub getRedlines
oRedlines = ThisComponent.Redlines
for i=0 to oRedlines.Count() - 1
oRedline = oRedlines.getByIndex(i)
author = oRedline.RedlineAuthor
next
end sub
However, the redline object’s properties are all protected and cannot be written to.
oRedline.setProperty(RedlineAuthor, "newautor")
raises an IllegalArgument Exception.
Is there any way to change the properites?
[Edit]: reading more docs I have the suspicion I need to use XRedlinesSupplier
interface with method getRedlines()
for better access. How would I do this?