[Libreoffice-commits] .: sc/inc sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Dec 20 03:50:46 PST 2010


 sc/inc/charthelper.hxx                  |    1 
 sc/inc/compiler.hxx                     |    1 
 sc/inc/compressedarray.hxx              |    5 ---
 sc/inc/document.hxx                     |    2 -
 sc/inc/dpcachetable.hxx                 |    6 ----
 sc/inc/dpglobal.hxx                     |    2 -
 sc/inc/dpobject.hxx                     |    4 --
 sc/inc/dptabres.hxx                     |    1 
 sc/inc/dptabsrc.hxx                     |    1 
 sc/source/core/data/compressedarray.cxx |   29 --------------------
 sc/source/core/data/documen3.cxx        |   14 ---------
 sc/source/core/data/document.cxx        |   12 --------
 sc/source/core/data/dpcachetable.cxx    |   11 -------
 sc/source/core/data/dpglobal.cxx        |   46 --------------------------------
 sc/source/core/data/dpobject.cxx        |   16 -----------
 sc/source/core/data/dptabres.cxx        |   21 --------------
 sc/source/core/data/dptabsrc.cxx        |   16 -----------
 sc/source/core/tool/charthelper.cxx     |    7 ----
 sc/source/core/tool/compiler.cxx        |    5 ---
 sc/source/ui/attrdlg/scdlgfact.cxx      |    7 ----
 20 files changed, 1 insertion(+), 206 deletions(-)

New commits:
commit 8d048b223ab107f73197bb4a38fcbe2a192caeda
Author: serval <serval2412 at yahoo.fr>
Date:   Mon Dec 20 11:50:25 2010 +0000

    callcatcher + 1 RTL_CONSTASCII_USTRINGPARAM

diff --git a/sc/inc/charthelper.hxx b/sc/inc/charthelper.hxx
index 0f8b4c6..b3b1dae 100644
--- a/sc/inc/charthelper.hxx
+++ b/sc/inc/charthelper.hxx
@@ -43,7 +43,6 @@ class ScChartHelper
 {
 public:
     static USHORT DoUpdateAllCharts( ScDocument* pDoc );
-    static USHORT DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc ); //use this to replace ScDBFunc::DoUpdateCharts in future
     static void AdjustRangesOfChartsOnDestinationPage( ScDocument* pSrcDoc, ScDocument* pDestDoc, const SCTAB nSrcTab, const SCTAB nDestTab );
     static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > GetChartFromSdrObject( SdrObject* pObject );
     static void GetChartRanges( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDoc,
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 57de6f8..3b1cc79 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -377,7 +377,6 @@ public:
 
     void            SetGrammar( const formula::FormulaGrammar::Grammar eGrammar );
 
-    void            SetEncodeUrlMode( EncodeUrlMode eMode );
     EncodeUrlMode   GetEncodeUrlMode() const;
 private:
     /** Set grammar and reference convention from within SetFormulaLanguage()
diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx
index e245b23..efc5cd7 100644
--- a/sc/inc/compressedarray.hxx
+++ b/sc/inc/compressedarray.hxx
@@ -101,11 +101,6 @@ public:
         not decremented and the value of the first entry is returned again. */
     const D&                    GetPrevValue( size_t& nIndex, A& nStart ) const;
 
-    /** Return the last row where an entry meets the condition:
-        (aValue != rCompare). If no entry meets this condition
-        ::std::numeric_limits<A>::max() is returned. */
-    A                           GetLastUnequalAccess( A nStart, const D& rCompare );
-
     /** Insert rows before nStart and copy value for inserted rows from
         nStart-1, return that value. */
     const D&                    Insert( A nStart, size_t nCount );
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 0a0f4e2..2324c69 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -419,7 +419,6 @@ private:
 public:
     SC_DLLPUBLIC ULONG			GetCellCount() const;		// alle Zellen
     SCSIZE          GetCellCount(SCTAB nTab, SCCOL nCol) const;
-    ULONG			GetWeightedCount() const;	// Formeln und Edit staerker gewichtet
     ULONG			GetCodeCount() const;		// RPN-Code in Formeln
     DECL_LINK( GetUserDefinedColor, USHORT * );
                                                                 // Numberformatter
@@ -497,7 +496,6 @@ public:
     SC_DLLPUBLIC long                                 AddDPObjectCache( ScDPTableDataCache* pData );
     SC_DLLPUBLIC void                                 RemoveDPObjectCache( long nID );
     SC_DLLPUBLIC void                                 RemoveUnusedDPObjectCaches();
-    SC_DLLPUBLIC void                                 GetUsedDPObjectCache( std::list<ScDPTableDataCache*>& usedlist );
     SC_DLLPUBLIC long                                 GetNewDPObjectCacheId ();
     // End Comments
 
diff --git a/sc/inc/dpcachetable.hxx b/sc/inc/dpcachetable.hxx
index 1041a05..04e1fa3 100644
--- a/sc/inc/dpcachetable.hxx
+++ b/sc/inc/dpcachetable.hxx
@@ -162,11 +162,6 @@ public:
     void  getValue( ScDPValueData& rVal, SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const; 
     String getFieldName( SCCOL  nIndex) const;
 
-    /** Get the field index (i.e. column ID in the original data source) based
-        on the string value that corresponds with the column title.  It returns
-        -1 if no field matching the string value exists. */
-    sal_Int32 getFieldIndex(const String& rStr) const;
-
    /** Get the unique entries for a field specified by index.  The caller must
        make sure that the table is filled before calling function, or it will
        get an empty collection. */
@@ -180,7 +175,6 @@ public:
                      const ::std::hash_set<sal_Int32>& rRepeatIfEmptyDims);
 
     void clear();
-    void swap(ScDPCacheTable& rOther);
     bool empty() const;
 
 private:
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
index 534c4f5..ac76f5a 100644
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -191,7 +191,6 @@ namespace ScDPGlobal
 {
 // used for core data
     String GetFieldFuncString( const String& rSourceName, USHORT &rFuncMask, bool bIsValue );
-    String GetFuncString( const String &rString, const USHORT nIndex );
     com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> DP_GetMembers( const com::sun::star::uno::Reference<
                                                                                       com::sun::star::sheet::XDimensionsSupplier>&rSrc, long nField );
 // common operation
@@ -199,7 +198,6 @@ namespace ScDPGlobal
     Rectangle operator *( const Rectangle &rLeft, const std::pair<double,double> & rRight );
 // used for  DataPilot Panel
     ScDPInfoWnd* GetDPInfoWnd( ScTabViewShell *pViewShell );
-   bool ChkDPTableOverlap( ScDocument *pDestDoc, std::list<ScDPObject> & rClipboard, SCCOL nClipStartCol, SCROW nClipStartRow, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, USHORT nEndTab, bool bExcludeClip = FALSE );
 
 }
 #endif
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 79cd8a9..4a00c6a 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -123,7 +123,6 @@ public:
     // Wang Xu Ming -- 2009-8-17
     // DataPilot Migration - Cache&&Performance
     inline void SetRefresh() { bRefresh = TRUE; }
-    const        ScDPTableDataCache* GetCache() const;
     long          GetCacheId() const;
     void          SetCacheId( long nCacheId );
     ULONG RefreshCache();
@@ -151,9 +150,6 @@ public:
     void				SetOutRange(const ScRange& rRange);
     const ScRange&		GetOutRange() const		{ return aOutRange; }
 
-    void                SetAutoFormatIndex (const sal_uInt16 nIndex);
-    sal_uInt16          GetAutoFormatIndex() const; 
-
     void                SetHeaderLayout(bool bUseGrid);
     bool                GetHeaderLayout() const;
 
diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
index 4c2bfb1..58b176f 100644
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -571,7 +571,6 @@ private:
     ScDPResultMember*        FindMember(   SCROW  iData ) const;
     ScDPResultMember*        AddMember( const ScDPParentDimData& aData );
     ScDPResultMember*        InsertMember( ScDPParentDimData* pMemberData );
-    ResultMembers*               GetResultMember( ScDPDimension* pDim, ScDPLevel* pLevel );
     void                                  InitWithMembers( LateInitParams& rParams,
                                                             const ::std::vector< SCROW >& pItemData, 
                                                             size_t  nPos,
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index f67f26a..3fb4984 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -790,7 +790,6 @@ public:
     // End Comments
     virtual 				~ScDPMember();
 
-    BOOL					IsNamedItem( const ScDPItemData& r ) const;
     String					GetNameStr() const;
     void					FillItemData( ScDPItemData& rData ) const;
     // Wang Xu Ming -- 2009-8-17
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index 9ed2de5..1c4d8bd 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -334,35 +334,6 @@ void ScCompressedArray<A,D>::Remove( A nStart, size_t nAccessCount )
     pData[nCount-1].nEnd = nMaxAccess;
 }
 
-
-template< typename A, typename D >
-A ScCompressedArray<A,D>::GetLastUnequalAccess( A nStart, const D& rCompare )
-{
-    A nEnd = ::std::numeric_limits<A>::max();
-    size_t nIndex = nCount-1;
-    while (1)
-    {
-        if (pData[nIndex].aValue != rCompare)
-        {
-            nEnd = pData[nIndex].nEnd;
-            break;  // while
-        }
-        else
-        {
-            if (nIndex > 0)
-            {
-                --nIndex;
-                if (pData[nIndex].nEnd < nStart)
-                    break;  // while
-            }
-            else
-                break;  // while
-        }
-    }
-    return nEnd;
-}
-
-
 // === ScSummableCompressedArray ============================================= 
 
 template< typename A, typename D >
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 053533e..4de92be 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -2135,20 +2135,6 @@ void ScDocument::RemoveUnusedDPObjectCaches()
     }
 }
 
-void ScDocument::GetUsedDPObjectCache( std::list<ScDPTableDataCache*>& usedlist )
-{
-    for ( std::list<ScDPTableDataCache*>::iterator iter = m_listDPObjectsCaches.begin(); iter!=m_listDPObjectsCaches.end(); ++iter )
-    {
-        long  nID = (*iter)->GetId();
-        USHORT nCount = GetDPCollection()->GetCount();
-        USHORT i=0;
-        for ( i=0; i<nCount; i++)
-            if ( nID ==  (*pDPCollection)[i]->GetCacheId() )
-                break;
-        if ( i != nCount )
-            usedlist.push_back( *iter );
-    }
-}
 // End Comments
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index abacb00..784253a 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -5141,18 +5141,6 @@ ULONG ScDocument::GetCodeCount() const
 }
 
 
-ULONG ScDocument::GetWeightedCount() const
-{
-    ULONG nCellCount = 0L;
-
-    for ( SCTAB nTab=0; nTab<=MAXTAB; nTab++ )
-        if ( pTab[nTab] )
-            nCellCount += pTab[nTab]->GetWeightedCount();
-
-    return nCellCount;
-}
-
-
 void ScDocument::PageStyleModified( SCTAB nTab, const String& rNewName )
 {
     if ( ValidTab(nTab)  && pTab[nTab] )
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx
index 2a1f5d7..06c2c2f 100644
--- a/sc/source/core/data/dpcachetable.cxx
+++ b/sc/source/core/data/dpcachetable.cxx
@@ -335,11 +335,6 @@ String ScDPCacheTable::getFieldName(SCCOL  nIndex) const
     return getCache()->GetDimensionName( nIndex );
 }
 
-sal_Int32 ScDPCacheTable::getFieldIndex(const String& rStr) const
-{
-    return getCache()->GetDimensionIndex( rStr );
-}
-
 const ::std::vector<SCROW>&  ScDPCacheTable::getFieldEntries( sal_Int32 nColumn ) const
 {
     if (nColumn < 0 || static_cast<size_t>(nColumn) >= maFieldEntries.size())
@@ -421,12 +416,6 @@ void ScDPCacheTable::clear()
     maRowsVisible.clear();
 }
 
-void ScDPCacheTable::swap(ScDPCacheTable& rOther)
-{
-    maFieldEntries.swap(rOther.maFieldEntries);
-    maRowsVisible.swap(rOther.maRowsVisible);
-}
-
 bool ScDPCacheTable::empty() const
 {
     return ( mpCache == NULL&& mpNoneCache == NULL ) || maFieldEntries.size()==0;
diff --git a/sc/source/core/data/dpglobal.cxx b/sc/source/core/data/dpglobal.cxx
index f4a41de..906a53b 100644
--- a/sc/source/core/data/dpglobal.cxx
+++ b/sc/source/core/data/dpglobal.cxx
@@ -49,52 +49,6 @@ namespace ScDPGlobal
         return rcResult;
     }
 
-    String GetFuncString( const String &rString, const USHORT nIndex )
-    {
-        if ( nIndex <= 1 ) return rString;
-        ULONG uch = rString.Len() ? rString.GetChar( rString.Len()-1 ) : (L'9'+1);
-        bool bEndWithDigital = ( L'0'<=uch && uch<=L'9');
-        char szTemp[__MAX_NUM_LEN+1];
-        int nLen = sprintf( szTemp, bEndWithDigital ? DATA_RENAME_SEPARATOR"%hu" : "%hu", nIndex );
-        String strRet = rString;
-        strRet.Append( String::CreateFromAscii( szTemp, static_cast<USHORT>(nLen) ));
-        return strRet;
-    }
-
-    bool ChkDPTableOverlap( ScDocument *pDestDoc, std::list<ScDPObject> & rClipboard, SCCOL nClipStartCol, SCROW nClipStartRow, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, USHORT nEndTab, BOOL bExcludeClip /*= FALSE*/ )
-    {
-        if (ScDPCollection* pDPCollection = pDestDoc->GetDPCollection())
-        {
-            USHORT nCount = pDPCollection->GetCount();
-            SCsCOL nOffsetX = nStartCol - nClipStartCol;
-            SCsROW nOffsetY = nStartRow - nClipStartRow;
-
-            for (std::list<ScDPObject>::iterator iter = rClipboard.begin(); iter!=rClipboard.end(); iter++)
-            {
-                ScRange aRange = iter->GetOutRange();
-
-                for (USHORT nCurrTab = nStartTab; nCurrTab<=nEndTab; nCurrTab++)
-                {
-                    SCsTAB nOffsetZ = nCurrTab - aRange.aStart.Tab();
-                    aRange.Move( nOffsetX, nOffsetY, nOffsetZ );
-
-                    for (USHORT i = 0; i<nCount; i++)
-                    {
-                        if ((*pDPCollection)[i] && aRange.Intersects( (*pDPCollection)[i]->GetOutRange()))
-                        {
-                            if (bExcludeClip && iter->GetOutRange() == (*pDPCollection)[i]->GetOutRange())
-                            {
-                                continue;
-                            }
-                            return false;   
-                        }
-                    }
-                }
-            }
-        }
-        return true;
-    }
-        
 }
 
 ScDPItemDataPool::ScDPItemDataPool()
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 72bbadc..0a8a629 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -256,16 +256,6 @@ void ScDPObject::SetSaveData(const ScDPSaveData& rData)
     InvalidateData();		// re-init source from SaveData
 }
 
-void ScDPObject::SetAutoFormatIndex(const sal_uInt16 nIndex)
-{
-    mnAutoFormatIndex = nIndex;
-}
-
-sal_uInt16 ScDPObject::GetAutoFormatIndex() const
-{
-    return mnAutoFormatIndex;
-}
-
 void ScDPObject::SetHeaderLayout (bool bUseGrid)
 {
     mbHeaderLayout = bUseGrid;
@@ -1837,7 +1827,7 @@ void lcl_FillOldFields(
                 try
                 {
                     if (nOrient == sheet::DataPilotFieldOrientation_DATA)
-                        xDimProp->getPropertyValue(OUString::createFromAscii(SC_UNO_REFVALUE))
+                        xDimProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_REFVALUE)))
                             >>= rField.maFieldRef;
                 }
                 catch (uno::Exception&)
@@ -2629,10 +2619,6 @@ void ScDPObject::SetCacheId( long nCacheId )
         mnCacheId = nCacheId;
     }
 }
-const ScDPTableDataCache* ScDPObject::GetCache() const
-{
-    return pDoc->GetDPObjectCache( GetCacheId() );
-}
 // End Comments
 
 void ScDPCollection::FreeTable(ScDPObject* pDPObj)
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 2ce7545..f7e7eca 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -3949,27 +3949,6 @@ ScDPResultMember* ScDPResultDimension::AddMember(const ScDPParentDimData &aData
     return pMember;
 }
 
-ResultMembers* ScDPResultDimension::GetResultMember( ScDPDimension* pThisDim, ScDPLevel* pThisLevel )
-{
-     ResultMembers* pResultMembers = new ResultMembers();
-     // global order is used to initialize aMembers, so it doesn't have to be looked at later
-     const ScMemberSortOrder& rGlobalOrder = pThisLevel->GetGlobalOrder();
-          
-     ScDPMembers* pMembers = pThisLevel->GetMembersObject();
-     long nMembCount = pMembers->getCount();
-     for ( long i=0; i<nMembCount; i++ )
-     {
-         long nSorted = rGlobalOrder.empty() ? i : rGlobalOrder[i];
-         ScDPMember* pMember = pMembers->getByIndex(nSorted);
-         if ( NULL == pResultMembers->FindMember( pMember->GetItemDataId() ) )
-         {
-            ScDPParentDimData* pNew = new ScDPParentDimData( i, pThisDim, pThisLevel, pMember );
-            pResultMembers->InsertMember(  pNew );
-         }
-     }
-     return pResultMembers;
-}
-
 ScDPResultMember* ScDPResultDimension::InsertMember(ScDPParentDimData *pMemberData)
 {
     SCROW  nInsert = 0;
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index b75dd43..653446d 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -2657,22 +2657,6 @@ ScDPMember::~ScDPMember()
     //!	release pSource
 }
 
-BOOL ScDPMember::IsNamedItem( const ScDPItemData& r ) const
-{
-    long nSrcDim = pSource->GetSourceDim( nDim );
-    if ( nHier != SC_DAPI_HIERARCHY_FLAT && pSource->IsDateDimension( nSrcDim ) && r.IsValue() )
-    {
-        long nComp = pSource->GetData()->GetDatePart(
-                                        (long)::rtl::math::approxFloor( r.GetValue() ),
-                                        nHier, nLev );
-
-        //	fValue is converted from integer, so simple comparison works
-        return nComp == GetItemData().GetValue();
-    }
-
-    return r.IsCaseInsEqual( GetItemData() );
-}
-
 BOOL ScDPMember::IsNamedItem( SCROW    nIndex ) const
 {
     long nSrcDim = pSource->GetSourceDim( nDim );
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 5d7e108..441b18f 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -126,13 +126,6 @@ BOOL lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, S
 }//end anonymous namespace
 
 // === ScChartHelper ======================================
-
-//static
-USHORT ScChartHelper::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc )
-{
-    return lcl_DoUpdateCharts( rPos, pDoc, FALSE );
-}
-
 //static
 USHORT ScChartHelper::DoUpdateAllCharts( ScDocument* pDoc )
 {
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 5d5f0e4..8ff8274 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -371,11 +371,6 @@ void ScCompiler::SetGrammar( const FormulaGrammar::Grammar eGrammar )
     }
 }
 
-void ScCompiler::SetEncodeUrlMode( EncodeUrlMode eMode )
-{
-    meEncodeUrlMode = eMode;
-}
-
 ScCompiler::EncodeUrlMode ScCompiler::GetEncodeUrlMode() const
 {
     return meEncodeUrlMode;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index bdfdd1a..8607654 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1640,11 +1640,4 @@ GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId
     return 0;
 }
 
-void ScDPFunctionDlg_Dummy()
-{
-    // use ScDPListBoxWrapper to avoid warning (this isn't called)
-    ListBox* pListBox = NULL;
-    ScDPListBoxWrapper aWrapper( *pListBox );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list