summaryrefslogtreecommitdiff
path: root/sd/source/filter/eppt/escherex.cxx
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2009-07-31 10:35:24 +0000
committerDaniel Rentz <dr@openoffice.org>2009-07-31 10:35:24 +0000
commitd7b4f28448f8b5557702cb2b445cb8b96898520d (patch)
treed282715a0fe51d588f0758b695435a91556c096e /sd/source/filter/eppt/escherex.cxx
parent56b623a060579e313669a3de072cc0d1b623894f (diff)
#i12587# preparation for chart-shapes: count DFF drawings dynamically
Diffstat (limited to 'sd/source/filter/eppt/escherex.cxx')
-rw-r--r--sd/source/filter/eppt/escherex.cxx64
1 files changed, 7 insertions, 57 deletions
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();
}
}
}