[PATCH 2/7] Remove some more dead code

Thomas Arnhold thomas at arnhold.org
Mon Jan 17 08:38:29 PST 2011


---
 .../accessibility/AccStatisticsObject.hxx          |   11 ------
 .../controller/main/ChartController_Window.cxx     |   33 +------------------
 chart2/source/view/inc/VDiagram.hxx                |    3 --
 sc/source/ui/drawfunc/drawsh.cxx                   |    3 --
 sc/source/ui/pagedlg/areasdlg.cxx                  |    1 -
 sc/source/ui/unoobj/scdetect.cxx                   |    2 -
 sc/workben/addin.cxx                               |    9 -----
 7 files changed, 2 insertions(+), 60 deletions(-)

diff --git a/chart2/source/controller/accessibility/AccStatisticsObject.hxx b/chart2/source/controller/accessibility/AccStatisticsObject.hxx
index d20ee80..31e2325 100644
--- a/chart2/source/controller/accessibility/AccStatisticsObject.hxx
+++ b/chart2/source/controller/accessibility/AccStatisticsObject.hxx
@@ -38,15 +38,6 @@ namespace chart
 class AccStatisticsObject : public AccessibleChartElement
 {
 public:
-    /*
-    enum StatisticsObjectType
-    {
-        MEAN_VAL_LINE = OBJECTTYPE_AVERAGEVALUE,
-        ERROR_BARS    = OBJECTTYPE_ERROR,
-        REGRESSION    = OBJECTTYPE_REGRESSION
-    };
-    */
-
     AccStatisticsObject( const AccessibleElementInfo& rAccInfo );
 
     virtual ~AccStatisticsObject();
@@ -58,8 +49,6 @@ public:
     virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
 
 private:
-    //const StatisticsObjectType    m_eType;
-    //const sal_uInt16              m_nSeriesIndex;
 };
 
 }  // accessibility
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index b0882f8..6a5b30e 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -767,8 +767,6 @@ void ChartController::execute_MouseMove( const MouseEvent& rMEvt )
         pDrawViewWrapper->MovAction( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
     }
 
-    //??	pDrawViewWrapper->GetPageView()->DragPoly();
-    
     impl_SetMousePointer( rMEvt );
 }
 void ChartController::execute_Tracking( const TrackingEvent& /* rTEvt */ )
@@ -1087,7 +1085,6 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
                         }
                     }
 
-                    //const sal_Int32 nIdBeforeFormat = nUniqueId;
                     if( bIsPoint )
                     {
                         if( bHasDataLabelAtPoint )
@@ -1139,10 +1136,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
                     if( bHasYErrorBars )
                         lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatYErrorBars") );
 
-                    //if( nIdBeforeFormat != nUniqueId )
-                        xPopupMenu->insertSeparator( -1 );
-
-                    //const sal_Int32 nIdBeforeInsert = nUniqueId;
+                    xPopupMenu->insertSeparator( -1 );
 
                     if( !bHasDataLabelsAtSeries )
                         lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertDataLabels") );
@@ -1155,10 +1149,6 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
                     if( !bHasYErrorBars )
                         lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:InsertYErrorBars") );
 
-                    //if( nIdBeforeInsert != nUniqueId )
-                    //    xPopupMenu->insertSeparator( -1 );
-
-                    //const sal_Int32 nIdBeforeDelete = nUniqueId;
 
                     if( bHasDataLabelsAtSeries || ( bHasDataLabelsAtPoints && bHasFormattedDataPointsOtherThanSelected ) )
                         lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:DeleteDataLabels") );
@@ -1174,8 +1164,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
                     if( bHasFormattedDataPointsOtherThanSelected )
                         lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:ResetAllDataPoints"));
 
-                    //if( nIdBeforeDelete != nUniqueId )
-                        xPopupMenu->insertSeparator( -1 );
+                    xPopupMenu->insertSeparator( -1 );
                     
                     lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId, C2U(".uno:ArrangeRow"));
                     uno::Reference< awt::XPopupMenu > xArrangePopupMenu( 
@@ -1328,7 +1317,6 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
 
     KeyCode aKeyCode( rKEvt.GetKeyCode());
     sal_uInt16 nCode = aKeyCode.GetCode();
-//     bool bShift = aKeyCode.IsShift();
     bool bAlternate = aKeyCode.IsMod2();
 
     if( m_apAccelExecute.get() )
@@ -1348,8 +1336,6 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
         }
     }
 
-    //if( m_pDrawViewWrapper->IsAction() );
-
     // keyboard accessibility
     ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() );
     if( ! bReturn )
@@ -1562,21 +1548,6 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
         }
     }
 
-    /* old chart:
-    // Ctrl-Shift-R: Repaint
-    if (!bReturn && GetWindow())
-    {
-        KeyCode aKeyCode = rKEvt.GetKeyCode();
-
-        if (aKeyCode.IsMod1() && aKeyCode.IsShift()
-            && aKeyCode.GetCode() == KEY_R)
-        {
-                // 3D-Kontext wieder zerstoeren
-            GetWindow()->Invalidate();
-            bReturn = TRUE;
-        }
-    }
-    */
     return bReturn;
 }
 
diff --git a/chart2/source/view/inc/VDiagram.hxx b/chart2/source/view/inc/VDiagram.hxx
index 1018a5d..37d9eda 100644
--- a/chart2/source/view/inc/VDiagram.hxx
+++ b/chart2/source/view/inc/VDiagram.hxx
@@ -78,9 +78,6 @@ public: //methods
 
     ::basegfx::B2IRectangle    adjustInnerSize( const ::basegfx::B2IRectangle& rConsumedOuterRect );
 
-    //    updateShapes(..);
-    // const awt::Point& rPos, const awt::Size& rSize );
-
 private: //methods
     void    createShapes_2d();
     void    createShapes_3d();
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 8b7e21d..02f959d 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -113,7 +113,6 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 {
     USHORT				nSlot		= rReq.GetSlot();
     Window* 			pWin		= pViewData->GetActiveWin();
-//	SfxViewFrame*		pViewFrame	= SfxViewShell::Current()->GetViewFrame(); //!!! koennte knallen
     ScDrawView* 		pView		= pViewData->GetScDrawView();
     SdrModel*			pDoc		= pViewData->GetDocument()->GetDrawLayer();
 
@@ -242,7 +241,6 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 
                     if( !pArgs )
                     {
-                        // const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
                         if( rMarkList.GetMark(0) != 0 )
                         {
                             SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -254,7 +252,6 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
                                 // --------- Itemset fuer Groesse und Position --------
                                 SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked());
 
-                                //SvxCaptionTabDialog* pDlg = new SvxCaptionTabDialog(pWin, pView);
                                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
                                 if ( pFact )
                                 {
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 6fbac53..4bccc56 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -387,7 +387,6 @@ BOOL ScPrintAreasDlg::Impl_CheckRefStrings()
         const USHORT nValidRange = nValidAddr | SCA_VALID_ROW2 | SCA_VALID_COL2;
         const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
         const sal_Unicode sep  = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
-        // const sal_Unicode rsep = ScCompiler::GetNativeSymbol(ocRange).GetChar(0);
 
         ScAddress aAddr;
         ScRange aRange;
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 673dae3..7ab5b54 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -637,8 +637,6 @@ static BOOL lcl_MayBeDBase( SvStream& rStream )
                             pFilterQPro6
                             };
 
-                        // const UINT16 nByteMask = 0xFF;
-
                         // suchen Sie jetzt!
                         // ... realisiert ueber 'Mustererkennung'
 
diff --git a/sc/workben/addin.cxx b/sc/workben/addin.cxx
index f93ac30..1e0a537 100644
--- a/sc/workben/addin.cxx
+++ b/sc/workben/addin.cxx
@@ -341,8 +341,6 @@ UString ScTestAddIn::getDisplayCategoryName(const UString& aProgrammaticFunction
 void ScTestAddIn::setLocale(const lang::Locale& eLocale) THROWS( (UsrSystemException) )
 {
     aFuncLoc = eLocale;
-//	DBG_ERROR( UStringToString(aFuncLoc.Language, CHARSET_SYSTEM) + String("-") +
-//			   UStringToString(aFuncLoc.Country, CHARSET_SYSTEM) );
 }
 
 ::com::sun::star::lang::Locale SAL_CALL ScTestAddIn::getLocale(  ) throw(::com::sun::star::uno::RuntimeException)
@@ -375,14 +373,10 @@ double SAL_CALL ScTestAddIn::addOne( double fValue ) throw(::com::sun::star::uno
 ::rtl::OUString SAL_CALL ScTestAddIn::getDateString( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xCaller, double fValue ) throw(::com::sun::star::uno::RuntimeException)
 {
     uno::Any aDateAny = xCaller->getPropertyValue( L"NullDate" );
-//!	if ( aDateAny.getReflection()->equals( *Date_getReflection() ) )
     {
         util::Date aDate;
         aDateAny >>= aDate;
-        //const Date* pDate = (const Date*)aDateAny.get();
-        //if (pDate)
         {
-            //Date aNewDate = *pDate;
             Date aNewDate( aDate.Day, aDate.Month, aDate.Year );
 
             aNewDate += (long)(fValue+0.5);
@@ -412,7 +406,6 @@ sal_Int32 SAL_CALL ScTestAddIn::getColorValue( const ::com::sun::star::uno::Refe
         if (!bIsTrans)
         {
             uno::Any aCol = xProp->getPropertyValue( L"CellBackColor" );
-            //nRet = NAMESPACE_USR(OPropertyTypeConversion)::toINT32( aCol );
             aCol >>= nRet;
         }
         return nRet;
@@ -531,8 +524,6 @@ INT32 lcl_GetLongElement( const uno::Sequence< uno::Sequence<INT32> >& aMatrix,
         aInner.getArray()[2] = L"Suelz";
         uno::Sequence< uno::Sequence<rtl::OUString> > aOuter( &aInner, 1 );
 
-        //return uno::Any( &aOuter, Sequence< Sequence<UString> >::getReflection() );
-
         aRet <<= aOuter;
         return aRet;
     }
-- 
1.7.3.5


--------------090503040801010303000402
Content-Type: text/plain;
 name="0003-Some-more-dead-code-removal.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0003-Some-more-dead-code-removal.patch"



More information about the LibreOffice mailing list