[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source

Kohei Yoshida kohei.yoshida at gmail.com
Tue Jun 18 12:22:43 PDT 2013


 sc/inc/global.hxx                     |    3 ---
 sc/source/core/data/autonamecache.cxx |    3 ---
 sc/source/core/data/cell.cxx          |   13 +++++--------
 sc/source/core/data/formulacell.cxx   |    3 ---
 sc/source/core/tool/interpr4.cxx      |    6 ------
 sc/source/ui/unoobj/chart2uno.cxx     |    3 ---
 6 files changed, 5 insertions(+), 26 deletions(-)

New commits:
commit 56df91ba3887a25e43661cc77b155a2149a6217a
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Jun 18 15:24:59 2013 -0400

    CELLTYPE_DESTROYED no longer relevant. Chuck it.
    
    Change-Id: Ie56cf8dc87eebd801cdb68ce70ffae7bcd16e4d7

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index f823232..dd60c4b 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -287,9 +287,6 @@ enum CellType
         CELLTYPE_STRING,
         CELLTYPE_FORMULA,
         CELLTYPE_EDIT,
-#if OSL_DEBUG_LEVEL > 0
-        CELLTYPE_DESTROYED
-#endif
     };
 
 enum DelCellCmd
diff --git a/sc/source/core/data/autonamecache.cxx b/sc/source/core/data/autonamecache.cxx
index ab03a95..5d2257b 100644
--- a/sc/source/core/data/autonamecache.cxx
+++ b/sc/source/core/data/autonamecache.cxx
@@ -81,9 +81,6 @@ const ScAutoNameAddresses& ScAutoNameCache::GetNameOccurrences( const String& rN
                 break;
                 case CELLTYPE_NONE:
                 case CELLTYPE_VALUE:
-#if OSL_DEBUG_LEVEL > 0
-                case CELLTYPE_DESTROYED:
-#endif
                     ;   // nothing, prevent compiler warning
                 break;
             }
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 9010752..102daef 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -45,12 +45,11 @@ ScBaseCell::ScBaseCell( const ScBaseCell& rCell ) :
 
 ScBaseCell::~ScBaseCell()
 {
-    OSL_ENSURE( eCellType == CELLTYPE_DESTROYED, "BaseCell Destructor" );
 }
 
 namespace {
 
-ScBaseCell* lclCloneCell( const ScBaseCell& rSrcCell, ScDocument& rDestDoc, const ScAddress& rDestPos, int nCloneFlags )
+ScBaseCell* lclCloneCell( const ScBaseCell& rSrcCell, ScDocument& rDestDoc, const ScAddress& rDestPos )
 {
     switch( rSrcCell.GetCellType() )
     {
@@ -68,16 +67,16 @@ ScBaseCell* lclCloneCell( const ScBaseCell& rSrcCell, ScDocument& rDestDoc, cons
 
 } // namespace
 
-ScBaseCell* ScBaseCell::Clone( ScDocument& rDestDoc, int nCloneFlags ) const
+ScBaseCell* ScBaseCell::Clone( ScDocument& rDestDoc, int ) const
 {
     // notes will not be cloned -> cell address only needed for formula cells
     ScAddress aDestPos;
-    return lclCloneCell( *this, rDestDoc, aDestPos, nCloneFlags );
+    return lclCloneCell( *this, rDestDoc, aDestPos );
 }
 
-ScBaseCell* ScBaseCell::Clone( ScDocument& rDestDoc, const ScAddress& rDestPos, int nCloneFlags ) const
+ScBaseCell* ScBaseCell::Clone( ScDocument& rDestDoc, const ScAddress& rDestPos, int ) const
 {
-    return lclCloneCell( *this, rDestDoc, rDestPos, nCloneFlags );
+    return lclCloneCell( *this, rDestDoc, rDestPos );
 }
 
 bool ScBaseCell::HasEmptyData() const
@@ -147,7 +146,6 @@ ScValueCell::ScValueCell( double fValue ) :
 #if OSL_DEBUG_LEVEL > 0
 ScValueCell::~ScValueCell()
 {
-    eCellType = CELLTYPE_DESTROYED;
 }
 #endif
 
@@ -162,7 +160,6 @@ ScStringCell::ScStringCell( const OUString& rString ) :
 #if OSL_DEBUG_LEVEL > 0
 ScStringCell::~ScStringCell()
 {
-    eCellType = CELLTYPE_DESTROYED;
 }
 #endif
 
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index ddbe216..845fa33 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -599,9 +599,6 @@ ScFormulaCell::~ScFormulaCell()
         pDocument->GetExternalRefManager()->removeRefCell(this);
 
     delete pCode;
-#if OSL_DEBUG_LEVEL > 0
-    eCellType = CELLTYPE_DESTROYED;
-#endif
 }
 
 ScFormulaCell* ScFormulaCell::Clone() const
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index adbf268..2811c46 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -500,12 +500,6 @@ double ScInterpreter::GetCellValueOrZero( const ScAddress& rPos, ScRefCellValue&
         case CELLTYPE_NONE:
             fValue = 0.0;       // empty or broadcaster cell
         break;
-#if OSL_DEBUG_LEVEL > 0
-        case CELLTYPE_DESTROYED:
-            SetError(errCellNoValue);
-            fValue = 0.0;
-        break;
-#endif
     }
 
     return fValue;
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 778d562..600efb2 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2619,9 +2619,6 @@ void ScChart2DataSequence::BuildDataCache()
                                 }
                             }
                             break;
-#if OSL_DEBUG_LEVEL > 0
-                            case CELLTYPE_DESTROYED:
-#endif
                             case CELLTYPE_EDIT:
                             case CELLTYPE_NONE:
                             case CELLTYPE_STRING:


More information about the Libreoffice-commits mailing list