[Libreoffice] [PATCH] fontdialog: Convert switch with only 1 case to an if ()
Caolán McNamara
caolanm at redhat.com
Tue Sep 28 08:37:00 PDT 2010
On Tue, 2010-09-28 at 17:26 +0200, Sebastian Spaeth wrote:
> This is a switch statement that only ever checks 1 case and has no
> default action, so make it an if().
> + if ( _nId == TABPAGE_CHARACTERS ) {
> + SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
> + aSet.Put (SvxFontListItem(static_cast<const SvxFontListItem&>(GetInputSetImpl()->Get(CFID_FONTLIST))));
> + aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_HIDE_LANGUAGE));
> + _rPage.PageCreated(aSet);
> + break;
> }
> }
Looks good, but you can remove that "break;" line as well.
C.
More information about the LibreOffice
mailing list