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 2552218909dbee683a87c3052d1c4dd85b4a58fe Mon Sep 17 00:00:00 2001
From: Santiago Martinez <smvarela@gmail.com>
Date: Mon, 12 Mar 2012 19:22:44 +0100
Subject: [PATCH] Remove unused code in dptabres

---
 sc/inc/dptabres.hxx              |    3 ---
 sc/source/core/data/dptabres.cxx |   18 ------------------
 unusedcode.easy                  |    2 --
 3 files changed, 0 insertions(+), 23 deletions(-)

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 3372d68..8db141e 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)
-- 
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.