Hi,
I've been going through the list of identified unused functions in calc and
commenting out those that don't seem to be used anywhere.
Attached is the patch (LGPLv3+/MPL) that comments out some 10 functions and a
text file with those investigated so far, and the results.
I chose to comment out, rather than delete, to allow for some extra testing
once
it's committed. Commented functions can be easily identified later on and
removed.
Please let me know if direct removal would be preferred.
After committing my changes locally I've built module sc and done a make
dev-install. Everything seems to be working fine, but the test wasn't
exhaustive.
The changes have been rebased with current master.
There are a few functions that belong to some addin mechanism now obsolete.
I'm not sure if it can be removed completely, but it looks like a good
candidate
(details in attached text file).
Thanks regards,
Alfonso
From ad7008e740baf43ebad80a3be2f50b5fe73e584a Mon Sep 17 00:00:00 2001
From: Alfonso Eusebio alfonso_euse...@yahoo.co.uk
Date: Sat, 29 Jan 2011 13:42:07 +
Subject: [PATCH] Commented out some unused functions in calc
Commented out some unused functions in calc before proceeding to final removal.
---
sc/inc/compressedarray.hxx |6 --
sc/source/core/data/attarray.cxx |1 -
sc/source/core/data/compressedarray.cxx|8
sc/source/filter/excel/xipivot.cxx |9 ++---
sc/source/filter/excel/xistream.cxx|9 ++---
sc/source/filter/excel/xltracer.cxx|3 ++-
sc/source/filter/inc/XclImpChangeTrack.hxx |5 +++--
sc/source/filter/inc/xipivot.hxx |4 ++--
sc/source/filter/inc/xistream.hxx |6 +++---
sc/source/filter/inc/xltracer.hxx |3 ++-
10 files changed, 32 insertions(+), 22 deletions(-)
diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx
index efc5cd7..941ae1a 100644
--- a/sc/inc/compressedarray.hxx
+++ b/sc/inc/compressedarray.hxx
@@ -477,18 +477,20 @@ public:
/** Sum values of a ScSummableCompressedArray for each row where in *this*
array the condition is met: ((aValue rBitMask) == rMaskedCompare). */
+/* [AE] seems unused - commenting out for now
template typename S
SC_DLLPUBLIC unsigned long SumCoupledArrayForCondition( A nStart, A nEnd,
const D rBitMask, const D rMaskedCompare,
-const ScSummableCompressedArrayA,S rArray ) const;
+const ScSummableCompressedArrayA,S rArray ) const;*/
/** Sum scaled values of a ScSummableCompressedArray for each row where in
*this* array the condition is met: ((aValue rBitMask) == rMaskedCompare). */
+/* [AE] seems unused - commenting out for now
template typename S
SC_DLLPUBLIC unsigned long SumScaledCoupledArrayForCondition( A nStart, A nEnd,
const D rBitMask, const D rMaskedCompare,
const ScSummableCompressedArrayA,S rArray,
-double fScale ) const;
+double fScale ) const; */
};
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index bd52f4b..bb411ab 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1183,7 +1183,6 @@ long lcl_LineSize( const SvxBorderLine rLine )
return nTotal;
}
-
BOOL ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle rSizes,
BOOL bLeft, BOOL bRight ) const
{
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index 1c4d8bd..b935f40 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -515,7 +515,7 @@ A ScBitMaskCompressedArrayA,D::GetLastAnyBitAccess( A nStart,
return nEnd;
}
-
+/* [AE] seems unused - commenting out for now
template typename A, typename D
template typename S
unsigned long ScBitMaskCompressedArrayA,D::SumCoupledArrayForCondition(
@@ -549,7 +549,6 @@ unsigned long ScBitMaskCompressedArrayA,D::SumCoupledArrayForCondition(
return nSum;
}
-
template typename A, typename D
template typename S
unsigned long ScBitMaskCompressedArrayA,D::SumScaledCoupledArrayForCondition(
@@ -582,7 +581,7 @@ unsigned long ScBitMaskCompressedArrayA,D::SumScaledCoupledArrayForCondition(
(rArray.GetDataEntry(rArray.GetEntryCount()-1).aValue * fScale) *
(nEnd - this-nMaxAccess);
return nSum;
-}
+} */
// === ScCompressedArrayIterator =
@@ -694,13 +693,14 @@ template class ScCompressedArray SCROW, USHORT; // heights, base cla
template class ScSummableCompressedArray SCROW, USHORT; // heights
template class ScCompressedArray