[Libreoffice-commits] .: svl/inc svl/source unusedcode.easy
Caolán McNamara
caolan at kemper.freedesktop.org
Sun Jul 29 08:49:01 PDT 2012
svl/inc/svl/svarray.hxx | 23 -----------------------
svl/source/memtools/svarray.cxx | 38 --------------------------------------
unusedcode.easy | 7 -------
3 files changed, 68 deletions(-)
New commits:
commit 1075501f3c0ab1999fa0c6224a7c50322a3758a2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 29 13:08:49 2012 +0100
callcatcher: strip SvPtrarr down to the used pieces
Change-Id: I79e53acd886422a3691cc9a5916a271d02b3f7d9
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index 4aebb4a..1d4814d 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -80,12 +80,6 @@ public:\
void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Insert( (const VoidPtr*)pE, nL, nP );\
}\
- void Replace( const AERef aE, sal_uInt16 nP ) {\
- Base::Replace( (const VPRef)aE, nP );\
- }\
- void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
- Base::Replace( (const VoidPtr*)pE, nL, nP );\
- }\
void Remove( sal_uInt16 nP, sal_uInt16 nL = 1) {\
Base::Remove(nP,nL);\
}\
@@ -110,7 +104,6 @@ private:\
SV_DECL_PTRARR_GEN(nm, AE, IS, SvPtrarr, AE &, VoidPtr &, vis )
typedef void* VoidPtr;
-typedef sal_Bool (*FnForEach_SvPtrarr)( const VoidPtr&, void* );
class SVL_DLLPUBLIC SvPtrarr
{
protected:
@@ -140,24 +133,8 @@ public:
void Insert( const VoidPtr& aE, sal_uInt16 nP );
void Insert( const VoidPtr *pE, sal_uInt16 nL, sal_uInt16 nP );
void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );
- void Replace( const VoidPtr& aE, sal_uInt16 nP );
- void Replace( const VoidPtr *pE, sal_uInt16 nL, sal_uInt16 nP );
sal_uInt16 Count() const { return nA; }
const VoidPtr* GetData() const { return (const VoidPtr*)pData; }
-
- void ForEach( FnForEach_SvPtrarr fnForEach, void* pArgs = 0 )
- {
- _ForEach( 0, nA, fnForEach, pArgs );
- }
- void ForEach( sal_uInt16 nS, sal_uInt16 nE,
- FnForEach_SvPtrarr fnForEach, void* pArgs = 0 )
- {
- _ForEach( nS, nE, fnForEach, pArgs );
- }
-
- void _ForEach( sal_uInt16 nStt, sal_uInt16 nE,
- FnForEach_SvPtrarr fnCall, void* pArgs = 0 );
-
sal_uInt16 GetPos( const VoidPtr & aE ) const;
};
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index 984a6ef..c6fa6dd 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -65,35 +65,6 @@ void SvPtrarr::Insert( const VoidPtr* pE, sal_uInt16 nL, sal_uInt16 nP )
nA = nA + nL; nFree = nFree - nL;
}
-void SvPtrarr::Replace( const VoidPtr& aE, sal_uInt16 nP )
-{
- if( nP < nA )
- *(pData+nP) = (VoidPtr&)aE;
-}
-
-void SvPtrarr::Replace( const VoidPtr *pE, sal_uInt16 nL, sal_uInt16 nP )
-{
- if( pE && nP < nA )
- {
- if( nP + nL < nA )
- memcpy( pData + nP, pE, nL * sizeof( VoidPtr ));
- else if( nP + nL < nA + nFree )\
- {
- memcpy( pData + nP, pE, nL * sizeof( VoidPtr ));
- nP = nP + (nL - nA);
- nFree = nP;
- }
- else
- {
- sal_uInt16 nTmpLen = nA + nFree - nP;
- memcpy( pData + nP, pE, nTmpLen * sizeof( VoidPtr ));
- nA = nA + nFree;
- nFree = 0;
- Insert( pE + nTmpLen, nL - nTmpLen, nA );
- }
- }
-}
-
void SvPtrarr::Remove( sal_uInt16 nP, sal_uInt16 nL )
{
if( !nL )
@@ -106,15 +77,6 @@ void SvPtrarr::Remove( sal_uInt16 nP, sal_uInt16 nL )
_resize (nA);
}
-void SvPtrarr::_ForEach( sal_uInt16 nStt, sal_uInt16 nE,
- FnForEach_SvPtrarr fnCall, void* pArgs )
-{
- if( nStt >= nE || nE > nA )
- return;
- for( ; nStt < nE && (*fnCall)( *(const VoidPtr*)(pData+nStt), pArgs ); nStt++)
- ;
-}
-
sal_uInt16 SvPtrarr::GetPos( const VoidPtr& aElement ) const
{
sal_uInt16 n;
diff --git a/unusedcode.easy b/unusedcode.easy
index 7705940..cf9da88 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -34,9 +34,6 @@ String::CreateFromAscii(char const*)
String::CreateFromAscii(char const*, unsigned short)
String::String(unsigned short const*)
String::String(unsigned short const*, unsigned short)
-SvPtrarr::Replace(void* const&, unsigned short)
-SvPtrarr::Replace(void* const*, unsigned short, unsigned short)
-SvPtrarr::_ForEach(unsigned short, unsigned short, unsigned char (*)(void* const&, void*), void*)
SvXMLAutoStylePoolNamesP_Impl::GetPos(rtl::OUString const*) const
SvXMLAutoStylePoolNamesP_Impl::Remove(rtl::OUString*)
SvXMLAutoStylePoolParentsP_Impl::GetPos(SvXMLAutoStylePoolParentP_Impl const*) const
@@ -45,10 +42,6 @@ SvXMLStyleIndices_Impl::GetPos(SvXMLStyleIndex_Impl const*) const
SvXMLStyleIndices_Impl::Remove(SvXMLStyleIndex_Impl*)
SvtSlideSorterBarOptions::AddListenerLink(Link const&)
SvtSlideSorterBarOptions::RemoveListenerLink(Link const&)
-SvxMSDffShapeInfos::Insert(SvxMSDffShapeInfo* const&, unsigned short&)
-SvxMSDffShapeInfos::Insert(SvxMSDffShapeInfo* const*, unsigned short)
-SvxMSDffShapeInfos::Insert(SvxMSDffShapeInfos const*, unsigned short, unsigned short)
-SvxMSDffShapeInfos::Remove(SvxMSDffShapeInfo* const&, unsigned short)
SvxPositionSizeTabPage::GetRect()
SwSortElements::Insert(SwSortElement* const&, unsigned short&)
SwSortElements::Insert(SwSortElement* const*, unsigned short)
More information about the Libreoffice-commits
mailing list