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 | 4d45788533940100b53249adeeba9aea04be8cae (patch) | |
tree | dba6f0820a827125348827a430b518fdb94fa981 /extensions | |
parent | 4a449bedfdbfd6f70de0bf36b7b7ab6bed0af859 (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')
-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 c7c52b60a910..79ef302a181f 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); } } |