diff options
-rw-r--r-- | sd/source/filter/eppt/eppt.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/escherex.cxx | 64 | ||||
-rw-r--r-- | sd/source/filter/eppt/escherex.hxx | 7 |
4 files changed, 10 insertions, 65 deletions
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 2c313d97f2ac..7c6aea2fa341 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -202,7 +202,7 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage, if ( !mpPicStrm ) mpPicStrm = mrStg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Pictures" ) ) ); - mpPptEscherEx = new PptEscherEx( *mpStrm, mnDrawings ); + mpPptEscherEx = new PptEscherEx( *mpStrm ); if ( !ImplGetStyleSheets() ) return; diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index b3e14e4bd359..967aae7e15bf 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -757,7 +757,7 @@ sal_Bool PPTWriter::ImplCloseDocument() nBytesToInsert += ImplDocumentListContainer( NULL ); // nBytes im Stream einfuegen, und abhaengige Container anpassen - mpPptEscherEx->InsertAtCurrentPos( nBytesToInsert, TRUE ); + mpPptEscherEx->InsertAtCurrentPos( nBytesToInsert, false ); // CREATE HYPERLINK CONTAINER if ( nExEmbedSize ) diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index c285ba2e8ece..e4ccf033e5be 100644 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -40,10 +40,9 @@ // --------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------- -PptEscherEx::PptEscherEx( SvStream& rOutStrm, UINT32 nDrawings ) : - EscherEx ( rOutStrm, nDrawings ) +PptEscherEx::PptEscherEx( SvStream& rOutStrm ) : + EscherEx( rOutStrm ) { - mnFIDCLs = nDrawings; mnCurrentDg = 0; mnCurrentShapeID = 0; mnTotalShapesDgg = 0; @@ -72,7 +71,7 @@ sal_uInt32 PptEscherEx::ImplDggContainerSize() { UINT32 nSize; - nSize = ImplDggAtomSize(); + nSize = GetDggAtomSize(); nSize += GetBlibStoreContainerSize(); nSize += ImplOptAtomSize(); nSize += ImplSplitMenuColorsAtomSize(); @@ -88,7 +87,7 @@ void PptEscherEx::ImplWriteDggContainer( SvStream& rSt ) rSt << (sal_uInt32)( 0xf | ( ESCHER_DggContainer << 16 ) ) << (sal_uInt32)( nSize - 8 ); - ImplWriteDggAtom( rSt ); + WriteDggAtom( rSt ); WriteBlibStoreContainer( rSt ); ImplWriteOptAtom( rSt ); ImplWriteSplitMenuColorsAtom( rSt ); @@ -97,29 +96,6 @@ void PptEscherEx::ImplWriteDggContainer( SvStream& rSt ) // --------------------------------------------------------------------------------------------- -sal_uInt32 PptEscherEx::ImplDggAtomSize() -{ - return maFIDCLs.Tell() + 24; -} - -void PptEscherEx::ImplWriteDggAtom( SvStream& rSt ) -{ - sal_uInt32 nSize = ImplDggAtomSize(); - if ( nSize ) - { - rSt << (sal_uInt32)( ESCHER_Dgg << 16 ) - << (sal_uInt32)( nSize - 8 ) - << mnCurrentShapeID - << (sal_uInt32)( mnFIDCLs + 1 ) - << mnTotalShapesDgg - << mnDrawings; - - rSt.Write( maFIDCLs.GetData(), nSize - 24 ); - } -} - -// --------------------------------------------------------------------------------------------- - #define ESCHER_OPT_COUNT 6 sal_uInt32 PptEscherEx::ImplOptAtomSize() @@ -194,7 +170,8 @@ void PptEscherEx::OpenContainer( UINT16 n_EscherContainer, int nRecInstance ) if ( !mbEscherDg ) { mbEscherDg = TRUE; - mnCurrentDg++; + ++mnDrawings; + mnCurrentDg = mnDrawings; mnTotalShapesDg = 0; mnTotalShapeIdUsedDg = 0; mnCurrentShapeID = ( mnCurrentShapeMaximumID &~0x3ff ) + 0x400; // eine neue Seite bekommt immer eine neue ShapeId die ein vielfaches von 1024 ist, @@ -253,34 +230,7 @@ void PptEscherEx::CloseContainer() // shapeanzahl des drawings setzen mnTotalShapesDgg += mnTotalShapesDg; *mpOutStrm << mnTotalShapesDg << mnCurrentShapeMaximumID; - - if ( !mnTotalShapesDg ) - { - maFIDCLs << (UINT32)0 - << (UINT32)0; - } - else - { - if ( mnTotalShapeIdUsedDg ) - { - UINT32 i, nFIDCL = ( ( mnTotalShapeIdUsedDg - 1 ) / 0x400 ); - if ( nFIDCL ) - mnFIDCLs += nFIDCL; - for ( i = 0; i <= nFIDCL; i++ ) - { - maFIDCLs << mnCurrentDg; // drawing number - if ( i < nFIDCL ) - maFIDCLs << 0x400; - else - { - UINT32 nShapesLeft = mnTotalShapeIdUsedDg % 0x400; - if ( !nShapesLeft ) - nShapesLeft = 0x400; // shape count in this IDCL - maFIDCLs << (UINT32)nShapesLeft; - } - } - } - } + UpdateFIDCL(); } } } diff --git a/sd/source/filter/eppt/escherex.hxx b/sd/source/filter/eppt/escherex.hxx index 1ebebe8a5504..0746c8815e23 100644 --- a/sd/source/filter/eppt/escherex.hxx +++ b/sd/source/filter/eppt/escherex.hxx @@ -51,14 +51,9 @@ enum PPT_TextHeader class PptEscherEx : public EscherEx { - SvMemoryStream maFIDCLs; - sal_uInt32 ImplDggContainerSize(); void ImplWriteDggContainer( SvStream& rSt ); - sal_uInt32 ImplDggAtomSize(); - void ImplWriteDggAtom( SvStream& rSt ); - sal_uInt32 ImplOptAtomSize(); void ImplWriteOptAtom( SvStream& rSt ); @@ -67,7 +62,7 @@ class PptEscherEx : public EscherEx public: - PptEscherEx( SvStream& rOut, UINT32 nDrawings ); + PptEscherEx( SvStream& rOut ); ~PptEscherEx(); void OpenContainer( UINT16 n_EscherContainer, int nRecInstance = 0 ); |