diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-29 13:08:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-29 16:47:10 +0100 |
commit | 1075501f3c0ab1999fa0c6224a7c50322a3758a2 (patch) | |
tree | c23ae1d62d804f048a02f2cd32003995e5b4bf41 /svl | |
parent | acd3b2f07026a78a0b819dae0a4a308d115bb1b5 (diff) |
callcatcher: strip SvPtrarr down to the used pieces
Change-Id: I79e53acd886422a3691cc9a5916a271d02b3f7d9
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/svarray.hxx | 23 | ||||
-rw-r--r-- | svl/source/memtools/svarray.cxx | 38 |
2 files changed, 0 insertions, 61 deletions
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx index 4aebb4a2dfeb..1d4814d64238 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 984a6ef03e6d..c6fa6dd0e62b 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; |