[Libreoffice-commits] .: 3 commits - sc/inc sc/source unusedcode.easy

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Mar 12 14:04:52 PDT 2012


 sc/inc/dpcache.hxx                   |    3 ---
 sc/inc/dpcachetable.hxx              |    8 --------
 sc/inc/dptabres.hxx                  |    3 ---
 sc/source/core/data/dpcache.cxx      |   32 --------------------------------
 sc/source/core/data/dpcachetable.cxx |    9 ---------
 sc/source/core/data/dptabres.cxx     |   18 ------------------
 unusedcode.easy                      |    5 -----
 7 files changed, 78 deletions(-)

New commits:
commit 6f7bf17e3147c2064362216d6b60df9f6818535a
Author: Santiago Martinez <smvarela at gmail.com>
Date:   Mon Mar 12 19:22:44 2012 +0100

    Remove unused code in dptabres

diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
index bfdef7f..36ed4ac 100644
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -83,7 +83,6 @@ public:
     long                GetCount() const    { return nCount; }
     const long*         GetSource() const   { return pIndex; }
     const SCROW* GetNameIds() const    { return pData; }
-    SCROW   GetNameIdForIndex( long nIndexValue ) const;
 };
 
 typedef ::std::vector<sal_Int32> ScMemberSortOrder;
@@ -337,8 +336,6 @@ public:
     bool                IsBaseForGroup( long nDim ) const;              // any group
     long                GetGroupBase( long nGroupDim ) const;
     bool                IsNumOrDateGroup( long nDim ) const;
-    bool                IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
-                                   long nBaseDataId, long nBaseIndex ) const;
     bool                IsInGroup( SCROW nGroupDataId, long nGroupIndex,
                                    const ScDPItemData& rBaseData, long nBaseIndex ) const;
     bool                HasCommonElement( SCROW nFirstDataId, long nFirstIndex,
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 9ffe37c..314fc7e 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -279,15 +279,6 @@ void ScDPInitState::RemoveMember()
         --nCount;
 }
 
-SCROW ScDPInitState::GetNameIdForIndex( long nIndexValue ) const
-{
-    for (long i=0; i<nCount; i++)
-        if ( pIndex[i] == nIndexValue )
-            return pData[i];
-
-    return -1;    // not found
-}
-
 // -----------------------------------------------------------------------
 
 void lcl_DumpRow( const String& rType, const String& rName, const ScDPAggData* pAggData,
@@ -920,15 +911,6 @@ bool ScDPResultData::IsNumOrDateGroup( long nDim ) const
     return pSource->GetData()->IsNumOrDateGroup( nDim );
 }
 
-bool ScDPResultData::IsInGroup( const ScDPItemData& rGroupData, long nGroupIndex,
-                                long nBaseDataId, long nBaseIndex ) const
-{
-    const ScDPItemData* pData = pSource->GetItemDataById( nGroupIndex , nBaseDataId);
-    if ( pData )
-         return pSource->GetData()->IsInGroup( rGroupData, nGroupIndex, *pData , nBaseIndex );
-    else
-        return false;
-}
 bool ScDPResultData::IsInGroup( SCROW nGroupDataId, long nGroupIndex,
                                 const ScDPItemData& rBaseData, long nBaseIndex ) const
 {
diff --git a/unusedcode.easy b/unusedcode.easy
index ecc821d..e1067ed 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -72,11 +72,9 @@ ScConditionalFormats_Impl::Remove(unsigned short, unsigned short)
 ScCsvControl::ScCsvControl(Window*, ScCsvLayoutData const&, long)
 ScDBCollection::AnonDBs::erase(boost::void_ptr_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<void**, std::__cxx1998::vector<void*, std::allocator<void*> > >, std::__debug::vector<void*, std::allocator<void*> > >, ScDBData>)
 ScDBCollection::AnonDBs::size() const
-ScDPInitState::GetNameIdForIndex(long) const
 ScDPItemData::ScDPItemData(double)
 ScDPItemData::SetGroupValue(int, int)
 ScDPLabelData::ScDPLabelData(rtl::OUString const&, short, bool)
-ScDPResultData::IsInGroup(ScDPItemData const&, long, long, long) const
 ScDocRowHeightUpdater::TabRanges::TabRanges()
 ScFilterDetect::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
 ScHTMLColOffset::Insert(ScHTMLColOffset const*, unsigned short, unsigned short)
commit 411a0f08f951809ea71fba7c64eba2762d4a1330
Author: Santiago Martinez <smvarela at gmail.com>
Date:   Mon Mar 12 19:04:03 2012 +0100

    Remove unused code in dpcache

diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx
index 9f33db5..8ece780 100644
--- a/sc/inc/dpcache.hxx
+++ b/sc/inc/dpcache.hxx
@@ -136,9 +136,7 @@ public:
     long AppendGroupField();
     void ResetGroupItems(long nDim, const ScDPNumGroupInfo& rNumInfo);
     SCROW SetGroupItem(long nDim, const ScDPItemData& rData);
-    const DataListType* GetGroupDimMemberValues(long nDim) const;
     void GetGroupDimMemberIds(long nDim, std::vector<SCROW>& rIds) const;
-    void ClearGroupFields();
 
     SCCOL GetDimensionIndex(const rtl::OUString& sName) const;
     sal_uLong GetNumberFormat( long nDim ) const;
@@ -158,7 +156,6 @@ public:
 
     ScDocument* GetDoc() const;
     long GetColumnCount() const;
-    long GetGroupFieldCount() const;
 
     const ScDPItemData* GetItemDataById( long nDim, SCROW nId ) const;
 
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 9ce9e25..a4705b4 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -1013,27 +1013,6 @@ SCROW ScDPCache::SetGroupItem(long nDim, const ScDPItemData& rData)
     return -1;
 }
 
-const ScDPCache::DataListType* ScDPCache::GetGroupDimMemberValues(long nDim) const
-{
-    if (nDim < 0)
-        return NULL;
-
-    long nSourceCount = static_cast<long>(maFields.size());
-    if (nDim < nSourceCount)
-    {
-        if (!maFields.at(nDim).mpGroup)
-            return NULL;
-
-        return &maFields[nDim].mpGroup->maItems;
-    }
-
-    nDim -= nSourceCount;
-    if (nDim < static_cast<long>(maGroupFields.size()))
-        return &maGroupFields.at(nDim).maItems;
-
-    return NULL;
-}
-
 void ScDPCache::GetGroupDimMemberIds(long nDim, std::vector<SCROW>& rIds) const
 {
     if (nDim < 0)
@@ -1074,12 +1053,6 @@ struct ClearGroupItems : std::unary_function<ScDPCache::Field, void>
 
 }
 
-void ScDPCache::ClearGroupFields()
-{
-    maGroupFields.clear();
-    std::for_each(maFields.begin(), maFields.end(), ClearGroupItems());
-}
-
 SCROW ScDPCache::GetOrder(long nDim, SCROW nIndex) const
 {
     OSL_ENSURE( nDim >=0 && nDim < mnColumnCount, "ScDPTableDataCache::GetOrder : out of bound" );
@@ -1110,9 +1083,4 @@ long ScDPCache::GetColumnCount() const
     return mnColumnCount;
 }
 
-long ScDPCache::GetGroupFieldCount() const
-{
-    return maGroupFields.size();
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index b591d6a..ecc821d 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -72,9 +72,6 @@ ScConditionalFormats_Impl::Remove(unsigned short, unsigned short)
 ScCsvControl::ScCsvControl(Window*, ScCsvLayoutData const&, long)
 ScDBCollection::AnonDBs::erase(boost::void_ptr_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<void**, std::__cxx1998::vector<void*, std::allocator<void*> > >, std::__debug::vector<void*, std::allocator<void*> > >, ScDBData>)
 ScDBCollection::AnonDBs::size() const
-ScDPCache::ClearGroupFields()
-ScDPCache::GetGroupDimMemberValues(long) const
-ScDPCache::GetGroupFieldCount() const
 ScDPInitState::GetNameIdForIndex(long) const
 ScDPItemData::ScDPItemData(double)
 ScDPItemData::SetGroupValue(int, int)
commit a105d96979f841f75cbc42a614230629019e7936
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Mon Mar 12 15:52:07 2012 -0400

    Nobody uses this now.

diff --git a/sc/inc/dpcachetable.hxx b/sc/inc/dpcachetable.hxx
index 47114e0..f104d3b 100644
--- a/sc/inc/dpcachetable.hxx
+++ b/sc/inc/dpcachetable.hxx
@@ -66,14 +66,6 @@ class SC_DLLPUBLIC ScDPCacheTable
         RowFlag();
     };
 public:
-    /** individual filter item used in SingleFilter and GroupFilter. */
-    struct FilterItem
-    {
-        ScDPItemData maItem;
-
-        FilterItem();
-        bool match(const ScDPItemData& rCellData) const;
-    };
 
     /** interface class used for filtering of rows. */
     class FilterBase
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx
index ff0335e..c32d079 100644
--- a/sc/source/core/data/dpcachetable.cxx
+++ b/sc/source/core/data/dpcachetable.cxx
@@ -84,15 +84,6 @@ ScDPCacheTable::RowFlag::RowFlag() :
 {
 }
 
-ScDPCacheTable::FilterItem::FilterItem() {}
-
-bool ScDPCacheTable::FilterItem::match(const ScDPItemData& rCellData) const
-{
-    return rCellData == maItem;
-}
-
-// ----------------------------------------------------------------------------
-
 ScDPCacheTable::SingleFilter::SingleFilter(const ScDPItemData& rItem) :
     maItem(rItem) {}
 


More information about the Libreoffice-commits mailing list