[PATCH] dead code: remove ScDocument::DeleteNumberFormat

Thomas Arnhold thomas at arnhold.org
Thu Jun 7 08:30:33 PDT 2012


This method doesn't do anything. Code was commented out and
removed with eb0497307bf381e7e065fc4b0b0d7b23f6ceeca9. This
is a further cleanup.

Change-Id: I7e80894d2ce15907f26c5ad49844fc7ff8c243ca
---
 sc/inc/document.hxx              |    1 -
 sc/source/core/data/documen2.cxx |    4 ----
 sc/source/ui/inc/tabvwsh.hxx     |    3 ---
 sc/source/ui/view/formatsh.cxx   |    4 ----
 sc/source/ui/view/tabvwsh5.cxx   |   26 --------------------------
 sc/source/ui/view/tabvwsha.cxx   |    7 -------
 6 files changed, 45 deletions(-)

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 5508c32..90d2f76 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1266,7 +1266,6 @@ public:
                                     bool bPutToPool = false );
     SC_DLLPUBLIC void           SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr,
                                     bool bPutToPool = false );
-    void            DeleteNumberFormat( const sal_uInt32* pDelKeys, sal_uInt32 nCount );
 
     void            AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
                                     sal_uInt16 nFormatNo, const ScMarkData& rMark );
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index dd9b048..9125e8a 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -584,10 +584,6 @@ void ScDocument::ResetClip( ScDocument* pSourceDoc, SCTAB nTab )
     }
 }
 
-void ScDocument::DeleteNumberFormat( const sal_uInt32* /* pDelKeys */, sal_uInt32 /* nCount */ )
-{
-}
-
 void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab,
                           ScBaseCell* pCell, sal_uLong nFormatIndex, bool bForceTab )
 {
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 5852065..d3c4670 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -403,9 +403,6 @@ public:
                                       ScViewData*            pViewData,
                                       SvxNumberInfoItem**    ppItem );
 
-    void    UpdateNumberFormatter   ( ScDocument*               pDoc,
-                                      const SvxNumberInfoItem&  rInfoItem );
-
     void    ExecuteCellFormatDlg    ( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
 
     sal_Bool    GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 );
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 98ac665..5af7c51 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -853,10 +853,6 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
 
                         if ( SFX_STYLE_FAMILY_PARA == eFam )
                         {
-                            pTabViewShell->UpdateNumberFormatter( pDoc,
-                                (const SvxNumberInfoItem&)
-                                    *(pDocSh->GetItem(SID_ATTR_NUMBERFORMAT_INFO)) );
-
                             pTabViewShell->UpdateStyleSheetInUse( pStyleSheet );
                             pTabViewShell->InvalidateAttribs();
                         }
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index 87bc8c7..98f3dc2 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -410,30 +410,4 @@ void ScTabViewShell::MakeNumberInfoItem( ScDocument*         pDoc,
     }
 }
 
-//------------------------------------------------------------------
-
-void ScTabViewShell::UpdateNumberFormatter(
-                        ScDocument*              pDoc,
-                        const SvxNumberInfoItem& rInfoItem )
-{
-    const sal_uInt32 nDelCount = rInfoItem.GetDelCount();
-
-    if ( nDelCount > 0 )
-    {
-        const sal_uInt32* pDelArr = rInfoItem.GetDelArray();
-
-        for ( sal_uInt16 i=0; i<nDelCount; i++ )
-            rInfoItem.GetNumberFormatter()->DeleteEntry( pDelArr[i] );
-    }
-
-    // sollte besser UpdateNumberFormats() heissen ?
-    pDoc->DeleteNumberFormat( rInfoItem.GetDelArray(),
-                              rInfoItem.GetDelCount() );
-}
-
-
-
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index d64de03..413b5d8 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -523,13 +523,6 @@ void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, sal_uInt16 nTabPage
     {
         const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
 
-        const SfxPoolItem* pItem=NULL;
-        if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,sal_True,&pItem)==SFX_ITEM_SET)
-        {
-
-            UpdateNumberFormatter( pDoc,(const SvxNumberInfoItem&)*pItem);
-        }
-
         ApplyAttributes( pOutSet, pOldSet );
 
         rReq.Done( *pOutSet );
-- 
1.7.10.3


--------------050409070807020307020003--


More information about the LibreOffice mailing list