Re: [Libreoffice] [PATCH] Commented out some unused functions in calc

2011-02-05 Thread Enrico Weigelt
* Alfonso Eusebio alfonso_euse...@yahoo.co.uk schrieb:

 If it's ok to remove the functions from the unused list directly I'm happy to 
 do 
 that. I was a bit concerned because some of those functions might be required 
 at 
 some point.

That's what we have an VCS w/ proper history for ;-p

 In most cases they are just member functions (overloaded or not) that are not 
 being used right now, but that doesn't mean that they might not be useful at 
 some point.

How complex are the functions in question ? Would it take much time to
reimplent or just find them in the history, if and when they'd really
become useful someday ?


cu
-- 
--
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weig...@metux.de
 mobile: +49 151 27565287  icq:   210169427 skype: nekrad666
--
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
--
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] Commented out some unused functions in calc

2011-01-31 Thread Cedric Bosdonnat
Hi Alfonso,

On Sat, 2011-01-29 at 15:10 +, Alfonso Eusebio wrote:
 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.

Why don't you simply remove them and check if it still builds?

Regards,
-- 
Cédric Bosdonnat
LibreOffice hacker
http://documentfoundation.org
OOo Eclipse Integration developer
http://cedric.bosdonnat.free.fr

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] Commented out some unused functions in calc

2011-01-29 Thread Alfonso Eusebio
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