Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


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.
---
 extensions/source/propctrlr/fontdialog.cxx |   23 ++++++-----------------
 1 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 8c663f6..da9157a 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -605,23 +605,12 @@ 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 ) {
+            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;
         }
     }
 
-- 
1.7.0.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.