From bfb0049607d2cda58e0f76b41e8a6e180b61f2d6 Mon Sep 17 00:00:00 2001 From: Sven Jacobi Date: Fri, 8 Dec 2000 15:44:11 +0000 Subject: [PATCH] moving functionality to svx/escherex.hxx --- sd/source/filter/eppt/escherex.cxx | 50 ++++-------------------------- sd/source/filter/eppt/escherex.hxx | 7 ++--- 2 files changed, 8 insertions(+), 49 deletions(-) diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index d77692ece6b8..f75cd8574fee 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.6 $ + * $Revision: 1.7 $ * - * last change: $Author: sj $ $Date: 2000-12-07 16:52:31 $ + * last change: $Author: sj $ $Date: 2000-12-08 16:44:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -132,7 +132,8 @@ UINT32 _EscherEx::ImplDggContainerSize() UINT32 nSize; nSize = ImplDggAtomSize(); - nSize += ImplBlibStoreContainerSize(); + if ( mpGraphicProvider ) + nSize += mpGraphicProvider->GetBlibStoreContainerSize(); nSize += ImplOptAtomSize(); nSize += ImplSplitMenuColorsAtomSize(); @@ -148,7 +149,8 @@ void _EscherEx::ImplWriteDggContainer( SvStream& rSt ) << (UINT32)( nSize - 8 ); ImplWriteDggAtom( rSt ); - ImplWriteBlibStoreContainer( rSt ); + if ( mpGraphicProvider ) + mpGraphicProvider->WriteBlibStoreContainer( rSt ); ImplWriteOptAtom( rSt ); ImplWriteSplitMenuColorsAtom( rSt ); } @@ -179,46 +181,6 @@ void _EscherEx::ImplWriteDggAtom( SvStream& rSt ) // --------------------------------------------------------------------------------------------- -UINT32 _EscherEx::ImplBlibStoreContainerSize() -{ - UINT32 nSize = 0; - if ( mpGraphicProvider && mpGraphicProvider->mnBlibEntrys ) - nSize = 44 * mpGraphicProvider->mnBlibEntrys + 8; - return nSize; -} - -void _EscherEx::ImplWriteBlibStoreContainer( SvStream& rSt ) -{ - UINT32 nSize = ImplBlibStoreContainerSize(); - if ( nSize ) - { - rSt << (UINT32)( ( ESCHER_BstoreContainer << 16 ) | 0x1f ) - << (UINT32)( nSize - 8 ); - - for ( UINT32 i = 0; i < mpGraphicProvider->mnBlibEntrys; i++ ) - { - EscherBlibEntry* pBlibEntry = mpGraphicProvider->mpBlibEntrys[ i ]; - BYTE nBlibType = pBlibEntry->meBlibType; - AddAtom( 36, ESCHER_BSE, 2, nBlibType ); - rSt << nBlibType; - if ( ( nBlibType == WMF ) || ( nBlibType == EMF ) ) - { // WMF auf OS2 zu Pict Konvertieren - rSt << (BYTE)4; - rSt.Write( &pBlibEntry->mnIdentifier[ 0 ], 16 ); - rSt << (UINT16)0 << (UINT32)( pBlibEntry->mnSize + 0x4a ) << (UINT32)( i + 1 ) << pBlibEntry->mnPictureOffset << (UINT32)0; - } - else - { - rSt << nBlibType; - rSt.Write( &pBlibEntry->mnIdentifier[ 0 ], 16 ); - rSt << (UINT16)0 << pBlibEntry->mnSize << (UINT32)( i + 1 ) << pBlibEntry->mnPictureOffset << (UINT32)0; - } - } - } -} - -// --------------------------------------------------------------------------------------------- - #define ESCHER_OPT_COUNT 6 UINT32 _EscherEx::ImplOptAtomSize() diff --git a/sd/source/filter/eppt/escherex.hxx b/sd/source/filter/eppt/escherex.hxx index 8b0c215f2971..db59f4c2c55c 100644 --- a/sd/source/filter/eppt/escherex.hxx +++ b/sd/source/filter/eppt/escherex.hxx @@ -2,9 +2,9 @@ * * $RCSfile: escherex.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: sj $ $Date: 2000-12-07 16:52:23 $ + * last change: $Author: sj $ $Date: 2000-12-08 16:44:04 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -146,9 +146,6 @@ class _EscherEx : public EscherPersistTable UINT32 ImplDggAtomSize(); void ImplWriteDggAtom( SvStream& rSt ); - UINT32 ImplBlibStoreContainerSize(); - void ImplWriteBlibStoreContainer( SvStream& rSt ); - UINT32 ImplOptAtomSize(); void ImplWriteOptAtom( SvStream& rSt );