Wrong copy paste in SwFieldFormCheckboxPortion::Format ?

Michael Stahl mst at libreoffice.org
Tue Nov 19 10:12:19 UTC 2019


On 19.11.19 09:20, Miklos Vajna wrote:
> Hi Julien,
> 
> Oh sorry, I didn't realize this pattern is:
> 
> SetWidth(GetHeight())
> SetHeight(GetHeight())
> 
> I thought it's:
> 
> SetWidth(GetHeight())
> SetHeight(GetWidth())
> 
> With that in mind, the current code is just OK, the width of the
> checkbox portion is the same as its height, since it's a square (and
> that size depends on the font size).
> 
> Perhaps add a comment explaining this to make it easier for the next
> person to understand. :-)

even better: add an assertion that the width and the height are the 
same, then you'll find out in case your assumption isn't true.

assertions are executable documentation :)


More information about the LibreOffice mailing list