[ooo-build-commit] .: extensions/source
Michael Meeks
mmeeks at kemper.freedesktop.org
Tue Sep 28 09:40:29 PDT 2010
extensions/source/propctrlr/fontdialog.cxx | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
New commits:
commit e4567b3a3e425d8e3cac6eb71ebf9556afcfb141
Author: Sebastian Spaeth <Sebastian at SSpaeth.de>
Date: Tue Sep 28 16:37:17 2010 +0200
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 at SSpaeth.de>
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 8c663f6..f4bba52 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);
}
}
More information about the ooo-build-commit
mailing list