Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Hello,

Remove call-catcher / bloat removal with ScBitMaskCompressedArray of sc.

Since i've got big problems to compile, this patch must be tested before applying.

checking whether the C++ compiler (ccache gcc  ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables. dmake: Error code 1, while making './unxlngi6.pro/misc/build/so_configured_ooo_mozab'

-----------------------------------------------------------------------
        Oh dear - something failed during the build - sorry !
  For more help with debugging build errors, please see the section in:
            http://wiki.documentfoundation.org/Development

  internal build errors:

ERROR: error 65280 occurred while making /home/serval/libreoffice-source/libo/soltools/support ERROR: error 65280 occurred while making /home/serval/libreoffice-source/libo/moz

 it seems you are using a threaded build, which means that the
 actual compile error is probably hidden far above, and could be
 inside any of these other modules:
     moz
 please re-run build inside each one to isolate the problem.

I tried to compile vcl

Julien
(LGPLv3+ / MPL)
commit cde5d175581ccd7ec388c04aad7454be252da01f
Author: serval <serval2412@yahoo.fr>
Date:   Sat Dec 11 09:13:41 2010 +0100

    Remove callcatcher ScBitMaskCompressedArray

diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx
index c0f8638..e245b23 100644
--- a/sc/inc/compressedarray.hxx
+++ b/sc/inc/compressedarray.hxx
@@ -466,24 +466,6 @@ public:
                                     A nStart, A nEnd, const D& rValueToAnd,
                                     long nSourceDy = 0 );
 
-    /** Copy values from rArray and bitwise OR them with rValueToOr. */
-    void                        CopyFromOred(
-                                    const ScBitMaskCompressedArray& rArray,
-                                    A nStart, A nEnd, const D& rValueToOr,
-                                    long nSourceDy = 0 );
-
-    /** Return the start row of a region where all entries meet the condition:
-        ((aValue & rBitMask) == rMaskedCompare). If not even nEnd meets
-        this condition, ::std::numeric_limits<A>::max() is returned. */
-    A                           GetBitStateStart( A nEnd, const D& rBitMask,
-                                    const D& rMaskedCompare ) const;
-
-    /** Return the end row of a region where all entries meet the condition:
-        ((aValue & rBitMask) == rMaskedCompare). If not even nStart meets
-        this condition, ::std::numeric_limits<A>::max() is returned. */
-    A                           GetBitStateEnd( A nStart, const D& rBitMask,
-                                    const D& rMaskedCompare ) const;
-
     /** Return the first row where an entry meets the condition:
         ((aValue & rBitMask) == rMaskedCompare), searching between nStart and
         nEnd. If no entry meets this condition, ::std::numeric_limits<A>::max()
@@ -493,39 +475,6 @@ public:
                                     const D& rMaskedCompare ) const;
 
     /** Return the last row where an entry meets the condition:
-        ((aValue & rBitMask) == rMaskedCompare), searching between nStart and
-        nEnd. If no entry meets this condition, ::std::numeric_limits<A>::max()
-        is returned. */
-    SC_DLLPUBLIC A                           GetLastForCondition( A nStart, A nEnd,
-                                    const D& rBitMask,
-                                    const D& rMaskedCompare ) const;
-
-    /** Count rows between nStart and nEnd where entries meet the condition:
-        ((aValue & rBitMask) == rMaskedCompare) */
-    A                           CountForCondition( A nStart, A nEnd,
-                                    const D& rBitMask,
-                                    const D& rMaskedCompare ) const;
-
-    /** Whether there is any entry between nStart and nEnd where the condition
-        is met: ((aValue & rBitMask) == rMaskedCompare) */
-    SC_DLLPUBLIC bool                        HasCondition( A nStart, A nEnd,
-                                    const D& rBitMask,
-                                    const D& rMaskedCompare ) const;
-
-    /** Fill an array with row numbers between nStart and nEnd where entries
-        meet the condition: ((aValue & rBitMask) == rMaskedCompare).
-        @return the count of used elements in array. */
-    size_t                      FillArrayForCondition( A nStart, A nEnd,
-                                    const D& rBitMask,
-                                    const D& rMaskedCompare,
-                                    A * pArray, size_t nArraySize ) const;
-
-    /** Count rows between nStart and nEnd where entries meet the condition:
-        ((aValue & rBitMask) != 0) */
-    A                           CountForAnyBitCondition( A nStart, A nEnd,
-                                    const D& rBitMask ) const;
-
-    /** Return the last row where an entry meets the condition:
         ((aValue & rBitMask) != 0), start searching at nStart. If no entry
         meets this condition, ::std::numeric_limits<A>::max() is returned. */
     A                           GetLastAnyBitAccess( A nStart,
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index 7b8fdab..9ed2de5 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -497,67 +497,6 @@ void ScBitMaskCompressedArray<A,D>::CopyFromAnded(
     }
 }
 
-
-template< typename A, typename D >
-void ScBitMaskCompressedArray<A,D>::CopyFromOred(
-        const ScBitMaskCompressedArray<A,D>& rArray, A nStart, A nEnd,
-        const D& rValueToOr, long nSourceDy )
-{
-    size_t nIndex;
-    A nRegionEnd;
-    for (A j=nStart; j<=nEnd; ++j)
-    {
-        const D& rValue = (j==nStart ?
-                rArray.GetValue( j+nSourceDy, nIndex, nRegionEnd) :
-                rArray.GetNextValue( nIndex, nRegionEnd));
-        nRegionEnd -= nSourceDy;
-        if (nRegionEnd > nEnd)
-            nRegionEnd = nEnd;
-        SetValue( j, nRegionEnd, rValue | rValueToOr);
-        j = nRegionEnd;
-    }
-}
-
-
-template< typename A, typename D >
-A ScBitMaskCompressedArray<A,D>::GetBitStateStart( A nEnd,
-        const D& rBitMask, const D& rMaskedCompare ) const
-{
-    A nStart = ::std::numeric_limits<A>::max();
-    size_t nIndex = Search( nEnd);
-    while ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare)
-    {
-        if (nIndex > 0)
-        {
-            --nIndex;
-            nStart = this->pData[nIndex].nEnd + 1;
-        }
-        else
-        {
-            nStart = 0;
-            break;  // while
-        }
-    }
-    return nStart;
-}
-
-
-template< typename A, typename D >
-A ScBitMaskCompressedArray<A,D>::GetBitStateEnd( A nStart,
-        const D& rBitMask, const D& rMaskedCompare ) const
-{
-    A nEnd = ::std::numeric_limits<A>::max();
-    size_t nIndex = Search( nStart);
-    while (nIndex < this->nCount && (this->pData[nIndex].aValue & rBitMask) ==
-            rMaskedCompare)
-    {
-        nEnd = this->pData[nIndex].nEnd;
-        ++nIndex;
-    }
-    return nEnd;
-}
-
-
 template< typename A, typename D >
 A ScBitMaskCompressedArray<A,D>::GetFirstForCondition( A nStart, A nEnd,
         const D& rBitMask, const D& rMaskedCompare ) const
@@ -577,115 +516,6 @@ A ScBitMaskCompressedArray<A,D>::GetFirstForCondition( A nStart, A nEnd,
     return ::std::numeric_limits<A>::max();
 }
 
-
-template< typename A, typename D >
-A ScBitMaskCompressedArray<A,D>::GetLastForCondition( A nStart, A nEnd,
-        const D& rBitMask, const D& rMaskedCompare ) const
-{
-    size_t nIndex = Search( nEnd);
-    while (1)
-    {
-        if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare)
-            return ::std::min( this->pData[nIndex].nEnd, nEnd);
-
-        if (nIndex > 0)
-        {
-            --nIndex;
-            if (this->pData[nIndex].nEnd < nStart)
-                break;  // while
-        }
-        else
-            break;  // while
-    }
-    return ::std::numeric_limits<A>::max();
-}
-
-
-template< typename A, typename D >
-A ScBitMaskCompressedArray<A,D>::CountForCondition( A nStart, A nEnd,
-        const D& rBitMask, const D& rMaskedCompare ) const
-{
-    A nRet = 0;
-    size_t nIndex = Search( nStart);
-    do
-    {
-        if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare)
-        {
-            A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart);
-            A nE = ::std::min( this->pData[nIndex].nEnd, nEnd);
-            nRet += nE - nS + 1;
-        }
-        if (this->pData[nIndex].nEnd >= nEnd)
-            break;  // while
-        ++nIndex;
-    } while (nIndex < this->nCount);
-    return nRet;
-}
-
-
-template< typename A, typename D >
-size_t ScBitMaskCompressedArray<A,D>::FillArrayForCondition( A nStart, A nEnd,
-        const D& rBitMask, const D& rMaskedCompare,
-        A * pArray, size_t nArraySize ) const
-{
-    size_t nUsed = 0;
-    size_t nIndex = Search( nStart);
-    while (nIndex < this->nCount && nUsed < nArraySize)
-    {
-        if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare)
-        {
-            A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart);
-            A nE = ::std::min( this->pData[nIndex].nEnd, nEnd);
-            while (nS <= nE && nUsed < nArraySize)
-                pArray[nUsed++] = nS++;
-        }
-        if (this->pData[nIndex].nEnd >= nEnd)
-            break;  // while
-        ++nIndex;
-    }
-    return nUsed;
-}
-
-
-template< typename A, typename D >
-bool ScBitMaskCompressedArray<A,D>::HasCondition( A nStart, A nEnd,
-        const D& rBitMask, const D& rMaskedCompare ) const
-{
-    size_t nIndex = Search( nStart);
-    do
-    {
-        if ((this->pData[nIndex].aValue & rBitMask) == rMaskedCompare)
-            return true;
-        if (this->pData[nIndex].nEnd >= nEnd)
-            break;  // while
-        ++nIndex;
-    }  while (nIndex < this->nCount);
-    return false;
-}
-
-
-template< typename A, typename D >
-A ScBitMaskCompressedArray<A,D>::CountForAnyBitCondition( A nStart, A nEnd,
-        const D& rBitMask ) const
-{
-    A nRet = 0;
-    size_t nIndex = Search( nStart);
-    do
-    {
-        if ((this->pData[nIndex].aValue & rBitMask) != 0)
-        {
-            A nS = ::std::max( (nIndex>0 ? this->pData[nIndex-1].nEnd+1 : 0), nStart);
-            A nE = ::std::min( this->pData[nIndex].nEnd, nEnd);
-            nRet += nE - nS + 1;
-        }
-        if (this->pData[nIndex].nEnd >= nEnd)
-            break;  // while
-        ++nIndex;
-    } while (nIndex < this->nCount);
-    return nRet;
-}
-
-
 template< typename A, typename D >
 A ScBitMaskCompressedArray<A,D>::GetLastAnyBitAccess( A nStart,
         const D& rBitMask ) const

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.