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


 Cheers,
Wol
From 7b9d332d03d4e3db163303f243b17ac2737b9da8 Mon Sep 17 00:00:00 2001
From: Wol <anthony@youngman.org.uk>
Date: Sun, 28 Nov 2010 21:00:43 +0000
Subject: [PATCH 5/5] More dead code deletion

---
 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


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.