diff options
author | Sven Jacobi <sj@openoffice.org> | 2000-11-30 15:03:35 +0000 |
---|---|---|
committer | Sven Jacobi <sj@openoffice.org> | 2000-11-30 15:03:35 +0000 |
commit | 3d43cac0fbdd357656492cb9277b4dd92cb5dcf3 (patch) | |
tree | 1ac35c73b416f1e0d0838be3e0bc5807225bc263 /sd/source/filter/eppt/escherex.cxx | |
parent | d9db2b3475d049230637f02f75f86337c78f2f22 (diff) |
now using the EscherPersistTable that is provided by svx/escherex.hxx
Diffstat (limited to 'sd/source/filter/eppt/escherex.cxx')
-rw-r--r-- | sd/source/filter/eppt/escherex.cxx | 101 |
1 files changed, 4 insertions, 97 deletions
diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index 1e5552f78968..7179ed882f9d 100644 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -2,9 +2,9 @@ * * $RCSfile: escherex.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sj $ $Date: 2000-11-29 15:43:33 $ + * last change: $Author: sj $ $Date: 2000-11-30 16:03:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,99 +86,6 @@ #endif // --------------------------------------------------------------------------------------------- - -_EscherPersistTable::_EscherPersistTable() -{ -} - -// --------------------------------------------------------------------------------------------- - -_EscherPersistTable::~_EscherPersistTable() -{ - for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) - delete (_EscherPersistEntry*)pPtr; -} - -// --------------------------------------------------------------------------------------------- - -BOOL _EscherPersistTable::PtIsID( UINT32 nID ) -{ - for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) - { - if ( ((_EscherPersistEntry*)pPtr)->mnID == nID ) - return TRUE; - } - return FALSE; -} - -// --------------------------------------------------------------------------------------------- - -void _EscherPersistTable::PtInsert( UINT32 nID, UINT32 nOfs ) -{ - maPersistTable.Insert( new _EscherPersistEntry( nID, nOfs ) ); -} - -// --------------------------------------------------------------------------------------------- - -UINT32 _EscherPersistTable::PtDelete( UINT32 nID ) -{ - for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) - { - if ( ((_EscherPersistEntry*)pPtr)->mnID == nID ) - { - UINT32 nRetValue = ((_EscherPersistEntry*)pPtr)->mnOffset; - delete (_EscherPersistEntry*)maPersistTable.Remove(); - } - } - return 0; -} - -// --------------------------------------------------------------------------------------------- - -UINT32 _EscherPersistTable::PtGetOffsetByID( UINT32 nID ) -{ - for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) - { - if ( ((_EscherPersistEntry*)pPtr)->mnID == nID ) - return ((_EscherPersistEntry*)pPtr)->mnOffset; - } - return 0; -}; - -// --------------------------------------------------------------------------------------------- - -UINT32 _EscherPersistTable::PtReplace( UINT32 nID, UINT32 nOfs ) -{ - for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) - { - if ( ((_EscherPersistEntry*)pPtr)->mnID == nID ) - { - UINT32 nRetValue = ((_EscherPersistEntry*)pPtr)->mnOffset; - ((_EscherPersistEntry*)pPtr)->mnOffset = nOfs; - return nRetValue; - } - } - return 0; -} - -// --------------------------------------------------------------------------------------------- - -UINT32 _EscherPersistTable::PtReplaceOrInsert( UINT32 nID, UINT32 nOfs ) -{ - for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) - { - if ( ((_EscherPersistEntry*)pPtr)->mnID == nID ) - { - UINT32 nRetValue = ((_EscherPersistEntry*)pPtr)->mnOffset; - ((_EscherPersistEntry*)pPtr)->mnOffset = nOfs; - return nRetValue; - } - } - PtInsert( nID, nOfs ); - return 0; -} - -// --------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------- @@ -678,9 +585,9 @@ void _EscherEx::InsertAtCurrentPos( UINT32 nBytes, BOOL bContainer ) // Persist table anpassen for ( void* pPtr = maPersistTable.First(); pPtr; pPtr = maPersistTable.Next() ) { - UINT32 nOfs = ((_EscherPersistEntry*)pPtr)->mnOffset; + UINT32 nOfs = ((EscherPersistEntry*)pPtr)->mnOffset; if ( nOfs >= nCurPos ) - ((_EscherPersistEntry*)pPtr)->mnOffset += nBytes; + ((EscherPersistEntry*)pPtr)->mnOffset += nBytes; } // container und atom sizes anpassen |