[PATCH 5/5] More dead code deletion

Wol anthony at youngman.org.uk
Sun Nov 28 13:00:43 PST 2010


---
 reportdesign/source/ui/dlg/Condition.cxx     |    7 +++----
 reportdesign/source/ui/dlg/DateTime.cxx      |    2 --
 reportdesign/source/ui/dlg/Formula.cxx       |    4 ++--
 reportdesign/source/ui/dlg/GroupsSorting.cxx |   15 +++++----------
 reportdesign/source/ui/dlg/Navigator.cxx     |    2 +-
 reportdesign/source/ui/dlg/dlgpage.cxx       |    4 ----
 6 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index 2fae51b..b52d8d8 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -106,7 +106,7 @@ IMPL_LINK( ConditionField, OnFormula, Button*, /*_pClickedButton*/ )
     {
         ReportFormula aFormula( sFormula );
         sFormula = aFormula.getCompleteFormula();
-    } // if ( nLen )
+    }
     uno::Reference< awt::XWindow> xInspectorWindow = VCLUnoHelper::GetInterface(this);
     uno::Reference< beans::XPropertySet> xProp(m_pParent->getController().getRowSet(),uno::UNO_QUERY);
     if ( rptui::openDialogFormula_nothrow( sFormula, m_pParent->getController().getContext(),xInspectorWindow,xProp ) )
@@ -212,7 +212,7 @@ void OColorPopup::SetSlotId(USHORT _nSlotId)
     {
         m_aColorSet.SetStyle( m_aColorSet.GetStyle() | WB_NONEFIELD );
         m_aColorSet.SetText( String(ModuleRes( STR_TRANSPARENT )) );
-    } // if ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId || SID_BACKGROUND_COLOR == theSlotId )
+    }
 }
 // -----------------------------------------------------------------------------
 IMPL_LINK( OColorPopup, SelectHdl, void *, EMPTYARG )
@@ -343,7 +343,7 @@ IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ )
             break;
         default:
             break;
-    } // switch(nId)
+    }
     if ( nTextId )
         m_pColorFloat->SetText(String(ModuleRes(nTextId)));
     m_pColorFloat->SetSlotId(nId);
@@ -427,7 +427,6 @@ void Condition::StateChanged( StateChangedType nType )
     {
         // The physical toolbar changed its outlook and shows another logical toolbar!
         // We have to set the correct high contrast mode on the new tbx manager.
-        //  pMgr->SetHiContrast( IsHiContrastMode() );
         checkImageList();
     }
 }
diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx
index f6d24cc..44ef206 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -241,12 +241,10 @@ sal_Int32 ODateTimeDialog::getFormatKey(sal_Bool _bDate) const
     sal_Int32 nFormatKey;
     if ( _bDate )
     {
-         // 	nFormat = m_aDateF1.IsChecked() ? i18n::NumberFormatIndex::DATE_SYSTEM_LONG : (m_aDateF2.IsChecked() ? i18n::NumberFormatIndex::DATE_SYS_DMMMYYYY : i18n::NumberFormatIndex::DATE_SYSTEM_SHORT);
          nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_aDateListBox.GetEntryData( m_aDateListBox.GetSelectEntryPos() )));
     }
     else
     {
-        // 	nFormat = m_aTimeF1.IsChecked() ? i18n::NumberFormatIndex::TIME_HHMMSS : (m_aTimeF2.IsChecked() ? i18n::NumberFormatIndex::TIME_HHMMSSAMPM : i18n::NumberFormatIndex::TIME_HHMM);
          nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_aTimeListBox.GetEntryData( m_aTimeListBox.GetSelectEntryPos() )));
     }
     return nFormatKey;
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index d18105d..7dcd550 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -218,7 +218,7 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton)
         }
 
         m_pAddField->Update();
-    } // if ( !m_pAddField )
+    }
     RefInputStartAfter( aPair.second, aPair.first );
     m_pAddField->Show();
 
@@ -240,7 +240,7 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg)
             sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("[")) + sName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
             m_pEdit->SetText(sName);
         }
-    } // if ( m_pEdit && aArgs.getLength() )
+    }
     m_pEdit = NULL;
     _pAddFieldDlg->Hide();
     RefInputDoneAfter( TRUE );
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index aff0b4f..992cb77 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -341,11 +341,11 @@ void OFieldExpressionControl::moveGroups(const uno::Sequence<uno::Any>& _aGroups
                     m_pParent->m_pController->executeChecked(SID_GROUP_APPEND,aArgs);
                     ++nRow;
                 }
-            } // for(;pIter != pEnd;++pIter)
+            }
         }
         m_bIgnoreEvent = false;
         Invalidate();
-    } // if ( _aGroups.getLength() )
+    }
 }
 // -----------------------------------------------------------------------------
 void OFieldExpressionControl::fillColumns(const uno::Reference< container::XNameAccess>& _xColumns)
@@ -547,7 +547,7 @@ String OFieldExpressionControl::GetCellText( long nRow, USHORT /*nColId*/ ) cons
         {
             OSL_ENSURE(0,"Exception caught while getting expression value from the group");
         }
-    } // if ( nRow != BROWSER_ENDOFSELECTION && nRow < m_pParent->getGroups()->getCount() )
+    }
     return sText;
 }
 
@@ -773,7 +773,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
                     default:
                         break;
                 }
-            } // if ( nColId == HANDLE_ID )
+            }
             // run through
         }
         default:
@@ -827,7 +827,7 @@ void OFieldExpressionControl::DeleteRows()
                     --*aFind;
         }
         nIndex = NextSelectedRow();
-    } // while( nIndex >= 0 )
+    }
 
     if ( !bFirstTime )
         m_pParent->m_pController->getUndoMgr()->LeaveListAction();
@@ -1203,7 +1203,6 @@ IMPL_LINK(OGroupsSortingDialog, OnControlFocusLost, Control*, pControl )
 }
 // -----------------------------------------------------------------------------
 IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
-// IMPL_LINK( OGroupsSortingDialog, ClickHdl, ImageButton*, _pButton )
 {
     DBG_CHKTHIS( rpt_OGroupsSortingDialog,NULL);
 
@@ -1219,17 +1218,14 @@ IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
             aClipboardList.realloc(1);
             aClipboardList[0] = m_xGroups->getByIndex(nGroupPos);
         }
-        //BTN if ( _pButton == &m_aPB_Up )
         if ( nCommand == SID_RPT_GROUPSORT_MOVE_UP )
         {
             --nIndex;
         }
-        //BTN if ( _pButton == &m_aPB_Down )
         if ( nCommand == SID_RPT_GROUPSORT_MOVE_DOWN )
         {
             ++nIndex;
         }
-        //BTN if ( _pButton == &m_aPB_Delete )
         if ( nCommand == SID_RPT_GROUPSORT_DELETE )
         {
             Application::PostUserEvent( LINK(m_pFieldExpression, OFieldExpressionControl, DelayedDelete) );
@@ -1412,7 +1408,6 @@ void OGroupsSortingDialog::Resize()
         nMaxTextWidth = ::std::max<sal_Int32>(static_cast<sal_Int32>(GetTextWidth(pControls[i]->GetText())),nMaxTextWidth);
     }
 
-    // aTotalOutputSize.Width() - m_aHeaderLst.GetSizePixel().Width() - 3*aSpace.Width()
     for (size_t i = 0; i < SAL_N_ELEMENTS(pControls); ++i)
     {
         pControls[i]->SetSizePixel(Size(nMaxTextWidth,pControls[i]->GetSizePixel().Height()));
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 24c4432..10db393 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -327,7 +327,7 @@ void NavigatorTree::Command( const CommandEvent& rEvt )
                     else
                         aContextMenu.EnableItem(nId,bEnabled);
                 }
-            } // for (USHORT i = 0; i < nCount; ++i)
+            }
             USHORT nId = aContextMenu.Execute(this, aWhere);
             if ( nId )
             {
diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index bdea855..86adf9d 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -60,8 +60,6 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
             AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1)));
             break;
         case RID_PAGEDIALOG_PAGE:
-            //AddTabPage( RID_SVXPAGE_PAGE,String(ModuleRes(1)));
-   //         AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1)));
             AddTabPage(RID_SVXPAGE_PAGE, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 );
             AddTabPage(RID_SVXPAGE_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 ); 
             break;
@@ -76,8 +74,6 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
             break;
         case RID_PAGEDIALOG_LINE:
             AddTabPage( RID_SVXPAGE_LINE,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), 0 );
-            //AddTabPage( RID_SVXPAGE_LINE_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE_DEF ), 0 );
-            //AddTabPage( RID_SVXPAGE_LINEEND_DEF,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINEEND_DEF ), 0 );
             break;
         default:
             OSL_ENSURE(0,"Unknown page id");
-- 
1.7.2.2


--------------010802040603050001080405--


More information about the LibreOffice mailing list