[Libreoffice] [PATCH] fontdialog: Convert switch with only 1 case to an if ()

Caolán McNamara caolanm at redhat.com
Wed Sep 29 01:12:38 PDT 2010

On Wed, 2010-09-29 at 00:51 -0600, Tor Lillqvist wrote:
> Could it be that a switch statement is used here because there are
>  other possible values of the parameter that the code really should
>  handle, but doesn't ye? The author used a switch statement
>  anticipating more cases later? 

Other way around, in one sense, the original author of the code did
handle multiple switch values, but when it was reduced down to handle a
single value later on by someone else it remained as a switch.

Those "CHINA" comments typically relate to stuff that existed only to
support the older binary .sdw etc. formats which were removed or moved
to binfilter.


More information about the LibreOffice mailing list