binfilter/bf_starmath/source/cfgitem.hxx | 9 --- binfilter/bf_starmath/source/starmath_cfgitem.cxx | 64 ---------------------- 2 files changed, 73 deletions(-)
New commits: commit a0184a7ee6df0484ef62c4d4b6d5acce6a129848 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Aug 22 09:23:19 2012 +0100 expand macros Change-Id: I696dcd6b3096025639474b0b10d0973453af809f diff --git a/binfilter/bf_starmath/source/cfgitem.hxx b/binfilter/bf_starmath/source/cfgitem.hxx index bbab993..62e9ba5 100644 --- a/binfilter/bf_starmath/source/cfgitem.hxx +++ b/binfilter/bf_starmath/source/cfgitem.hxx @@ -152,19 +152,10 @@ public: SmFntFmtListEntry& operator[](USHORT nP) const { return *(pData+nP); } - void Insert( const SmFntFmtListEntryArr *pI, USHORT nP, - USHORT nS = 0, USHORT nE = USHRT_MAX ); SmFntFmtListEntry& GetObject(USHORT nP) const { return (*this)[nP]; } void Insert( const SmFntFmtListEntry &aE, USHORT nP ); - void Insert( const SmFntFmtListEntry *pE, USHORT nL, USHORT nP ); - void Remove( USHORT nP, USHORT nL = 1 ); USHORT Count() const { return nA; } const SmFntFmtListEntry* GetData() const { return (const SmFntFmtListEntry*)pData; } - void ForEach( FnForEach_SmFntFmtListEntryArr fnForEach, void* pArgs = 0 ); - void ForEach( USHORT nS, USHORT nE, - FnForEach_SmFntFmtListEntryArr fnForEach, void* pArgs = 0 ); - void _ForEach( USHORT nStt, USHORT nE, - FnForEach_SmFntFmtListEntryArr fnCall, void* pArgs = 0 ); private: SmFntFmtListEntryArr( const SmFntFmtListEntryArr& ); SmFntFmtListEntryArr& operator=( const SmFntFmtListEntryArr& ); diff --git a/binfilter/bf_starmath/source/starmath_cfgitem.cxx b/binfilter/bf_starmath/source/starmath_cfgitem.cxx index 3b6a72b..8c4da72 100644 --- a/binfilter/bf_starmath/source/starmath_cfgitem.cxx +++ b/binfilter/bf_starmath/source/starmath_cfgitem.cxx @@ -80,15 +80,6 @@ void SmFntFmtListEntryArr::_resize (size_t n) } } -void SmFntFmtListEntryArr::Insert( const SmFntFmtListEntryArr *pI, USHORT nP, - USHORT nS, USHORT nE ) -{ - if( USHRT_MAX == nE ) - nE = pI->nA; - if( nS < nE ) - Insert( (const SmFntFmtListEntry*)pI->pData+nS, (USHORT)nE-nS, nP ); -} - void SmFntFmtListEntryArr::Insert( const SmFntFmtListEntry &aE, USHORT nP ) { if (nFree < 1) @@ -100,61 +91,6 @@ void SmFntFmtListEntryArr::Insert( const SmFntFmtListEntry &aE, USHORT nP ) ++nA; --nFree; } -void SmFntFmtListEntryArr::Insert( const SmFntFmtListEntry *pE, USHORT nL, USHORT nP ) -{ - if (nFree < nL) - _resize (nA + ((nA > nL) ? nA : nL)); - if( pData && nP < nA ) - memmove( pData+nP+nL, pData+nP, (nA-nP) * sizeof( SmFntFmtListEntry )); - if( pE ) - { - SmFntFmtListEntry* pTmp = pData+nP; - for( USHORT n = 0; n < nL; n++, pTmp++, pE++) - { - new( (DummyType*) pTmp ) SmFntFmtListEntry( (SmFntFmtListEntry&)*pE ); - } - } - nA = nA + nL; nFree = nFree - nL; -} - -void SmFntFmtListEntryArr::Remove( USHORT nP, USHORT nL ) -{ - if( !nL ) - return; - SmFntFmtListEntry* pTmp=pData+nP; - USHORT nCtr = nP; - for(USHORT n=0; n < nL; n++,pTmp++,nCtr++) - { - if( nCtr < nA ) - pTmp->~SmFntFmtListEntry(); - } - if( pData && nP+1 < nA ) - memmove( pData+nP, pData+nP+nL, (nA-nP-nL) * sizeof( SmFntFmtListEntry )); - nA = nA - nL; nFree = nFree + nL; - if (nFree > nA) - _resize (nA); -} - -void SmFntFmtListEntryArr::ForEach( FnForEach_SmFntFmtListEntryArr fnForEach, void* pArgs ) -{ - _ForEach( 0, nA, fnForEach, pArgs ); -} - -void SmFntFmtListEntryArr::ForEach( USHORT nS, USHORT nE, - FnForEach_SmFntFmtListEntryArr fnForEach, void* pArgs ) -{ - _ForEach( nS, nE, fnForEach, pArgs ); -} - -void SmFntFmtListEntryArr::_ForEach( USHORT nStt, USHORT nE, - FnForEach_SmFntFmtListEntryArr fnCall, void* pArgs ) -{ - if( nStt >= nE || nE > nA ) - return; - for( ; nStt < nE && (*fnCall)( *(pData+nStt), pArgs ); nStt++) - ; -} - /////////////////////////////////////////////////////////////////
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits