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


This patch removes unused code as listed in unusedcode.easy
From 1d2ad5f05d4b415df6ff636c7f62c9ba1ea4a1bf Mon Sep 17 00:00:00 2001
From: Santiago Martinez <smvarela@gmail.com>
Date: Mon, 12 Mar 2012 19:04:03 +0100
Subject: [PATCH] Remove unused code in dpcache

---
 sc/inc/dpcache.hxx              |    3 ---
 sc/source/core/data/dpcache.cxx |   32 --------------------------------
 unusedcode.easy                 |    3 ---
 3 files changed, 0 insertions(+), 38 deletions(-)

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)
-- 
1.7.7.6


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.