[Libreoffice-commits] .: sc/inc sc/source unusedcode.easy
Matus Kukan
mkukan at kemper.freedesktop.org
Fri Aug 10 14:08:52 PDT 2012
sc/inc/compressedarray.hxx | 185 --------------------------------
sc/source/core/data/compressedarray.cxx | 27 ----
unusedcode.easy | 9 -
3 files changed, 221 deletions(-)
New commits:
commit 07090cac4251e254b21676b77742c07f28cccaf4
Author: Matúš Kukan <matus.kukan at gmail.com>
Date: Fri Aug 10 22:50:25 2012 +0200
sc: this appears to be unused
Change-Id: I22a759ef55a46dc560ebe5f802c937f1d47bf645
diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx
index eb38a3d..a20963d 100644
--- a/sc/inc/compressedarray.hxx
+++ b/sc/inc/compressedarray.hxx
@@ -36,8 +36,6 @@
const size_t nScCompressedArrayDelta = 4;
-template< typename A, typename D > class ScCompressedArrayIterator;
-
/** Compressed array of row (or column) entries, e.g. heights, flags, ...
The array stores ranges of values such that consecutive values occupy only
@@ -102,13 +100,8 @@ public:
// methods public for the coupled array sum methods
/** Obtain index into entries for nPos */
SC_DLLPUBLIC size_t Search( A nPos ) const;
- /** Get number of entries */
- size_t GetEntryCount() const;
protected:
-
-friend class ScCompressedArrayIterator<A,D>;
-
size_t nCount;
size_t nLimit;
size_t nDelta;
@@ -165,184 +158,6 @@ const D& ScCompressedArray<A,D>::GetNextValue( size_t& nIndex, A& nEnd ) const
return pData[nEntry].aValue;
}
-
-template< typename A, typename D >
-size_t ScCompressedArray<A,D>::GetEntryCount() const
-{
- return nCount;
-}
-
-
-// === ScCompressedArrayIterator =============================================
-
-/** Iterator for ScCompressedArray.
-
- @ATTENTION: the iterator is not persistant if the underlying
- ScCompressedArray happens to be changed by any means, for example by
- setting new values or adding or removing or combining entries. If you do
- such things inside a loop you MUST resynchronize the iterator by calling
- <method>Resync()</method> with the row where resynchronization should
- start. After doing so, <method>GetRangeStart()</method> and
- <method>GetRangeEnd()</method> may not point to the previous access points
- anymore. Use with care.
- */
-
-template< typename A, typename D > class ScCompressedArrayIterator
-{
-public:
- ScCompressedArrayIterator(
- const ScCompressedArray<A,D> & rArray,
- A nStart, A nEnd );
- /// Set new start and end, position on start.
- void NewLimits( A nStart, A nEnd );
- A GetIterStart() const;
- A GetIterEnd() const;
- /// Advance by a single access point (e.g. row).
- bool operator ++();
- A GetPos() const;
- operator bool() const;
- const D& operator *() const;
- /// Advance an entire range, one entry of the array.
- bool NextRange();
- A GetRangeStart() const;
- A GetRangeEnd() const;
- /// Resync to underlying array, calling Search().
- void Resync( A nPos );
- /** Set position without resyncing, avoid calling Search() if possible.
- Position obtained from steering coupled iterator is NOT checked for
- iterator bounds. */
- template< typename X >
- void Follow( const ScCompressedArrayIterator<A,X>& );
-
-private:
- const ScCompressedArray<A,D> & rArray;
- size_t nIndex;
- A nIterStart;
- A nIterEnd;
- A nCurrent;
- bool bEnd;
-};
-
-
-template< typename A, typename D >
-ScCompressedArrayIterator<A,D>::ScCompressedArrayIterator(
- const ScCompressedArray<A,D> & rArrayP, A nStart, A nEnd )
- : rArray( rArrayP )
- // other values set in NewLimits()
-{
- NewLimits( nStart, nEnd);
-}
-
-
-template< typename A, typename D >
-void ScCompressedArrayIterator<A,D>::NewLimits( A nStart, A nEnd )
-{
- nIterStart = nStart;
- nIterEnd = nEnd;
- nIndex = rArray.Search( nStart);
- nCurrent = GetRangeStart();
- bEnd = (nIterEnd < nIterStart);
-}
-
-
-template< typename A, typename D >
-A ScCompressedArrayIterator<A,D>::GetIterStart() const
-{
- return nIterStart;
-}
-
-
-template< typename A, typename D >
-A ScCompressedArrayIterator<A,D>::GetIterEnd() const
-{
- return nIterEnd;
-}
-
-
-template< typename A, typename D >
-bool ScCompressedArrayIterator<A,D>::operator++()
-{
- if (nCurrent < GetRangeEnd())
- {
- ++nCurrent;
- return true;
- }
- else
- return NextRange();
-}
-
-
-template< typename A, typename D >
-A ScCompressedArrayIterator<A,D>::GetPos() const
-{
- return nCurrent;
-}
-
-
-template< typename A, typename D >
-bool ScCompressedArrayIterator<A,D>::NextRange()
-{
- if (!operator bool())
- return false;
-
- if (rArray.pData[nIndex].nEnd >= nIterEnd)
- bEnd = true;
- else if (++nIndex >= rArray.GetEntryCount())
- {
- nIndex = rArray.GetEntryCount() - 1;
- bEnd = true;
- }
- nCurrent = bEnd ? nIterEnd : GetRangeStart();
- return operator bool();
-}
-
-
-template< typename A, typename D >
-ScCompressedArrayIterator<A,D>::operator bool() const
-{
- return !bEnd;
-}
-
-
-template< typename A, typename D >
-const D& ScCompressedArrayIterator<A,D>::operator*() const
-{
- return rArray.pData[nIndex].aValue;
-}
-
-
-template< typename A, typename D >
-A ScCompressedArrayIterator<A,D>::GetRangeStart() const
-{
- if (nIndex == 0)
- return nIterStart > 0 ? nIterStart : 0;
- else
- return nIterStart > rArray.pData[nIndex-1].nEnd ? nIterStart :
- rArray.pData[nIndex-1].nEnd + 1;
-}
-
-
-template< typename A, typename D >
-A ScCompressedArrayIterator<A,D>::GetRangeEnd() const
-{
- return nIterEnd < rArray.pData[nIndex].nEnd ? nIterEnd :
- rArray.pData[nIndex].nEnd;
-}
-
-
-template< typename A, typename D >
-void ScCompressedArrayIterator<A,D>::Resync( A nPos )
-{
- if (nPos < nIterStart)
- nPos = nIterStart;
- else if (nPos > nIterEnd)
- nPos = nIterEnd;
- nCurrent = nPos;
- bEnd = (nIterEnd < nIterStart);
- nIndex = rArray.Search( nPos);
-}
-
-
// === ScBitMaskCompressedArray ==============================================
/** The data type represents bits, managable by bitwise operations.
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index 2738809..baa8a82 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -456,35 +456,8 @@ A ScBitMaskCompressedArray<A,D>::GetLastAnyBitAccess( A nStart,
return nEnd;
}
-
-// === ScCompressedArrayIterator =============================================
-
-template< typename A, typename D >
-template< typename X >
-void ScCompressedArrayIterator<A,D>::Follow(
- const ScCompressedArrayIterator<A,X>& rIter )
-{
- nCurrent = rIter.GetPos();
- if (GetRangeStart() <= nCurrent && nCurrent <= GetRangeEnd())
- ; // nothing
- else if (nCurrent > GetRangeEnd())
- {
- A nPos = nCurrent; // nCurrent gets changed in NextRange()
- bool bAdv;
- do
- {
- bAdv = NextRange();
- } while (bAdv && GetRangeEnd() < nPos);
- nCurrent = nPos;
- }
- else
- nIndex = rArray.Search( nCurrent);
-}
-
-
// === Force instantiation of specializations ================================
-template class ScCompressedArray< SCROW, sal_uInt16>; // heights, base class
template class ScCompressedArray< SCROW, sal_uInt8>; // flags, base class
template class ScBitMaskCompressedArray< SCROW, sal_uInt8>; // flags
diff --git a/unusedcode.easy b/unusedcode.easy
index e4d051c..2b6cd46 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -3,15 +3,6 @@ PlaceEditDialog::GetResId(unsigned short)
PopupMenu::SetSelectedEntry(unsigned short)
SanExtensionImpl::setCertExtn(com::sun::star::uno::Sequence<signed char>, com::sun::star::uno::Sequence<signed char>, unsigned char)
SanExtensionImpl::setCertExtn(unsigned char*, unsigned int, unsigned char*, unsigned int, unsigned char)
-ScCompressedArray<int, unsigned char>::GetEntryCount() const
-ScCompressedArray<int, unsigned short>::CopyFrom(ScCompressedArray<int, unsigned short> const&, int, int, long)
-ScCompressedArray<int, unsigned short>::GetEntryCount() const
-ScCompressedArray<int, unsigned short>::GetValue(int) const
-ScCompressedArray<int, unsigned short>::Insert(int, unsigned long)
-ScCompressedArray<int, unsigned short>::Remove(int, unsigned long)
-ScCompressedArray<int, unsigned short>::ScCompressedArray(int, unsigned short const&, unsigned long)
-ScCompressedArray<int, unsigned short>::ScCompressedArray(int, unsigned short const*, unsigned long)
-ScCompressedArray<int, unsigned short>::SetValue(int, unsigned short const&)
ScVbaFormat<ooo::vba::excel::XRange>::setNumberFormat(com::sun::star::lang::Locale, rtl::OUString const&)
ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent()
ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&)
More information about the Libreoffice-commits
mailing list