Rework of Writer comments "button"

Jan-Marek Glogowski glogow at
Thu Jul 11 15:21:40 UTC 2019

Hi everybody,

an other query for a different problem :-)

While fixing tdf#126333 
( I found the 
current behavior of that pseudo button quite annoying. Not only forces 
it a repositioning of the displayed document, which probably can't be 
avoided, but it also moves the text and arrow of the button around.

So now there is as WIP / RfC:

* cleanup code
* handle the arrow like a tree view
   * > = collapsed, v = expanded
* keeping the position of the arrow in front of the text
   * no more shifting of the text and arrow in the button
* replace many static values with (correct?) dynamic ones
* use highlight colors for mouse over

I tried to use the DecorationView::DrawButton, but that didn't work. I'm 
not sure this is even the right interface.

But there is still one major problem left: positioning of the button 
text in RTL. If you start LO with LANG=ar, the button text and arrow 
aren't visible, because they are outside of the view. As a workaround I 
left-aligned them together in case of collapsed comments in RTL in the 

But the problem would go away, if Writer would mirror the position of 
the comments too and would also show the button on the left side in RTL.

* How do other programs display comments when in RTL mode?
* Do you think moving the comments to the right is a good idea for RTL?
* I hope moving the "button" and comments wouldn't be that hard. Anyone 
knows that code and can comment on that?
* Is there a better way to draw this "button"?
* Any other opinions on the patch?
* Any option on the changed behavior?



More information about the LibreOffice mailing list