diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2010-09-28 16:37:17 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-09-28 17:39:03 +0100 |
commit | e4567b3a3e425d8e3cac6eb71ebf9556afcfb141 (patch) | |
tree | 86117254a871889ed78beb4e3a459b751825031d /extensions/source | |
parent | 4dafcb0b52527f39a02a25566825230f809ffcd9 (diff) |
fontdialog: Convert switch with only 1 case to an if ()
This is a switch statement that only ever checks 1 case and has no
default action, so make it an if().
Remove some commented out code in the switch while taking the git
blame anyway.
Signed-off: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/propctrlr/fontdialog.cxx | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 8c663f6ef..f4bba529c 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -606,22 +606,10 @@ namespace pcr void ControlCharacterDialog::PageCreated( sal_uInt16 _nId, SfxTabPage& _rPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - switch ( _nId ) - { - case TABPAGE_CHARACTERS: -//CHINA001 static_cast<SvxCharNamePage&>(_rPage).SetFontList( -//CHINA001 static_cast<const SvxFontListItem&>(GetInputSetImpl()->Get(CFID_FONTLIST)) -//CHINA001 ); -//CHINA001 static_cast<SvxCharNamePage&>(_rPage).DisableControls( DISABLE_HIDE_LANGUAGE ); - -//CHINA001 SvxFontListItem aFontListItem( static_cast<const SvxFontListItem&>(GetInputSetImpl()->Get(CFID_FONTLIST) )); -//CHINA001 aSet.Put ( SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST)); - -// aSet.Put (SfxUInt16Item(SID_CFID_FONTLIST,CFID_FONTLIST)); - aSet.Put (SvxFontListItem(static_cast<const SvxFontListItem&>(GetInputSetImpl()->Get(CFID_FONTLIST)))); - aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_HIDE_LANGUAGE)); - _rPage.PageCreated(aSet); - break; + if ( _nId == TABPAGE_CHARACTERS ) { + aSet.Put (SvxFontListItem(static_cast<const SvxFontListItem&>(GetInputSetImpl()->Get(CFID_FONTLIST)))); + aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_HIDE_LANGUAGE)); + _rPage.PageCreated(aSet); } } |