diff options
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/svarray.hxx | 18 | ||||
-rw-r--r-- | svl/source/memtools/svarray.cxx | 10 |
2 files changed, 11 insertions, 17 deletions
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx index 1f405f8f12fa..556f10460787 100644 --- a/svl/inc/svl/svarray.hxx +++ b/svl/inc/svl/svarray.hxx @@ -49,21 +49,11 @@ #include "svl/svldllapi.h" -#include <string.h> // memmove() #include <limits.h> // USHRT_MAX #include <osl/diagnose.h> #include <rtl/alloc.h> #include <tools/solar.h> -class String; - -class DummyType; -inline void* operator new( size_t, DummyType* pPtr ) -{ - return pPtr; -} -inline void operator delete( void*, DummyType* ) {} - typedef void* VoidPtr; class SVL_DLLPUBLIC SvPtrarr { @@ -81,13 +71,7 @@ public: VoidPtr& operator[](sal_uInt16 nP) const { return *(pData+nP); } void Insert( const SvPtrarr * pI, sal_uInt16 nP, - sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ) - { - if( USHRT_MAX == nE ) - nE = pI->nA; - if( nS < nE ) - Insert( (const VoidPtr*)pI->pData+nS, (sal_uInt16)nE-nS, nP ); - } + sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ); VoidPtr& GetObject(sal_uInt16 nP) const { return (*this)[nP]; } diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx index c6fa6dd0e62b..6f1f1cb0cb25 100644 --- a/svl/source/memtools/svarray.cxx +++ b/svl/source/memtools/svarray.cxx @@ -18,6 +18,7 @@ */ #include <svl/svarray.hxx> +#include <string.h> // memmove() SvPtrarr::SvPtrarr( sal_uInt16 nInit ) : pData (0), @@ -65,6 +66,15 @@ void SvPtrarr::Insert( const VoidPtr* pE, sal_uInt16 nL, sal_uInt16 nP ) nA = nA + nL; nFree = nFree - nL; } +void SvPtrarr::Insert( const SvPtrarr * pI, sal_uInt16 nP, + sal_uInt16 nS, sal_uInt16 nE ) +{ + if( USHRT_MAX == nE ) + nE = pI->nA; + if( nS < nE ) + Insert( (const VoidPtr*)pI->pData+nS, (sal_uInt16)nE-nS, nP ); +} + void SvPtrarr::Remove( sal_uInt16 nP, sal_uInt16 nL ) { if( !nL ) |