diff options
-rw-r--r-- | sd/source/filter/pptx/epptooxml.hxx | 3 | ||||
-rw-r--r-- | sd/source/filter/pptx/escherex.hxx | 12 | ||||
-rw-r--r-- | sd/source/filter/pptx/pptx-eppt.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/pptx/pptx-epptso.cxx | 21 | ||||
-rw-r--r-- | sd/source/filter/pptx/pptx-escherex.cxx | 87 | ||||
-rw-r--r-- | sd/source/filter/pptx/pptx-pptexanimations.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/pptx/pptx-text.cxx | 4 |
7 files changed, 32 insertions, 107 deletions
diff --git a/sd/source/filter/pptx/epptooxml.hxx b/sd/source/filter/pptx/epptooxml.hxx index f6b0a2ed6260..d54169f215bc 100644 --- a/sd/source/filter/pptx/epptooxml.hxx +++ b/sd/source/filter/pptx/epptooxml.hxx @@ -57,7 +57,7 @@ public: virtual oox::vml::Drawing* getVmlDrawing() { return NULL; } virtual const oox::drawingml::Theme* getCurrentTheme() const { return NULL; } virtual const oox::drawingml::table::TableStyleListPtr getTableStyles() { return oox::drawingml::table::TableStyleListPtr(); } - virtual oox::drawingml::chart::ChartConverter* getChartConverter() { return NULL; } + virtual oox::drawingml::chart::ChartConverter* getChartConverter() { return &maChartConverter; } static const char* GetSideDirection( sal_uInt8 nDirection ); static const char* GetCornerDirection( sal_uInt8 nDirection ); @@ -129,6 +129,7 @@ private: static sal_Int32 nStyleLevelToken[5]; ::oox::drawingml::ShapeExport::ShapeHashMap maShapeMap; + oox::drawingml::chart::ChartConverter maChartConverter; }; } diff --git a/sd/source/filter/pptx/escherex.hxx b/sd/source/filter/pptx/escherex.hxx index 577531d9f534..739ef6300d1c 100644 --- a/sd/source/filter/pptx/escherex.hxx +++ b/sd/source/filter/pptx/escherex.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: escherex.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -51,14 +48,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 +59,7 @@ class PptEscherEx : public EscherEx public: - PptEscherEx( SvStream& rOut, UINT32 nDrawings ); + PptEscherEx( SvStream& rOut ); ~PptEscherEx(); void OpenContainer( UINT16 n_EscherContainer, int nRecInstance = 0 ); diff --git a/sd/source/filter/pptx/pptx-eppt.cxx b/sd/source/filter/pptx/pptx-eppt.cxx index 02a3fedbe38e..6976013e0df0 100644 --- a/sd/source/filter/pptx/pptx-eppt.cxx +++ b/sd/source/filter/pptx/pptx-eppt.cxx @@ -53,11 +53,11 @@ #include <tools/zcodec.hxx> #include <editeng/svxenum.hxx> #include <sot/storinfo.hxx> -#include <svx/msoleexp.hxx> +#include <filter/msfilter/msoleexp.hxx> #include <vcl/virdev.hxx> #include <svtools/wmf.hxx> -#include <svx/msdffimp.hxx> -#include <svx/flditem.hxx> +#include <filter/msfilter/msdffimp.hxx> +#include <editeng/flditem.hxx> #include <sfx2/docinf.hxx> #include <oox/export/utils.hxx> @@ -1271,7 +1271,7 @@ void PPTWriter::ImplWriteBackground( ::com::sun::star::uno::Reference< ::com::su mpPptEscherEx->AddShape( ESCHER_ShpInst_Rectangle, 0xc00 ); // Flags: Connector | Background | HasSpt Point aEmptyPoint = Point(); Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); - EscherPropertyContainer aPropOpt( (EscherGraphicProvider&)*mpPptEscherEx, mpPicStrm, aRect ); + EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.AddOpt( ESCHER_Prop_fillType, ESCHER_FillSolid ); ::com::sun::star::drawing::FillStyle aFS( ::com::sun::star::drawing::FillStyle_NONE ); if ( ImplGetPropertyValue( rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" ) ) ) ) diff --git a/sd/source/filter/pptx/pptx-epptso.cxx b/sd/source/filter/pptx/pptx-epptso.cxx index e8c080e118fc..47daaf1a455c 100644 --- a/sd/source/filter/pptx/pptx-epptso.cxx +++ b/sd/source/filter/pptx/pptx-epptso.cxx @@ -34,9 +34,6 @@ #include <eppt.hxx> #include "text.hxx" #include "epptdef.hxx" -#ifndef _PptEscherEx_HXX -#include "escherex.hxx" -#endif #include <tools/poly.hxx> #include <vcl/bmpacc.hxx> #include <vcl/gradient.hxx> @@ -935,7 +932,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) { Point aEmptyPoint = Point(); Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); - EscherPropertyContainer aPropOpt( (EscherGraphicProvider&)*mpPptEscherEx, mpPicStrm, aRect ); + EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.CreateGradientProperties( mXPropSet ); aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor ); } @@ -958,7 +955,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) { Point aEmptyPoint = Point(); Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) ); - EscherPropertyContainer aPropOpt( (EscherGraphicProvider&)*mpPptEscherEx, mpPicStrm, aRect ); + EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect ); aPropOpt.CreateGradientProperties( mXBackgroundPropSet ); aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor ); } @@ -2208,7 +2205,7 @@ sal_Bool PPTWriter::ImplCreatePresentationPlaceholder( const sal_Bool bMasterPag if ( bRet && bMasterPage ) { mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); - sal_uInt32 nPresShapeID = mpPptEscherEx->GetShapeID(); + sal_uInt32 nPresShapeID = mpPptEscherEx->GenerateShapeId(); mpPptEscherEx->AddShape( ESCHER_ShpInst_Rectangle, 0xa00, nPresShapeID );// Flags: HaveAnchor | HasSpt EscherPropertyContainer aPropOpt; aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x50001 ); @@ -2264,7 +2261,7 @@ sal_Bool PPTWriter::ImplCreatePresentationPlaceholder( const sal_Bool bMasterPag void PPTWriter::ImplCreateShape( sal_uInt32 nType, sal_uInt32 nFlags, EscherSolverContainer& rSolver ) { - sal_uInt32 nId = mpPptEscherEx->GetShapeID(); + sal_uInt32 nId = mpPptEscherEx->GenerateShapeId(); mpPptEscherEx->AddShape( nType, nFlags, nId ); rSolver.AddShape( mXShape, nId ); } @@ -2349,7 +2346,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a const ::com::sun::star::awt::Size aSize100thmm( mXShape->getSize() ); const ::com::sun::star::awt::Point aPoint100thmm( mXShape->getPosition() ); Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); - EscherPropertyContainer aPropOpt( (EscherGraphicProvider&)*mpPptEscherEx, mpPicStrm, aRect100thmm ); + EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm ); if ( bGroup ) { @@ -2907,7 +2904,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a sal_uInt16 nChar; mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); - mnShapeMasterTitle = mpPptEscherEx->GetShapeID(); + mnShapeMasterTitle = mpPptEscherEx->GenerateShapeId(); mpPptEscherEx->AddShape( ESCHER_ShpInst_Rectangle, 0xa00, mnShapeMasterTitle );// Flags: HaveAnchor | HasSpt EscherPropertyContainer aPropertyOptions; aPropertyOptions.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x50001 ); @@ -3001,7 +2998,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( mnTextSize ) { mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); - mnShapeMasterBody = mpPptEscherEx->GetShapeID(); + mnShapeMasterBody = mpPptEscherEx->GenerateShapeId(); mpPptEscherEx->AddShape( ESCHER_ShpInst_Rectangle, 0xa00, mnShapeMasterBody ); // Flags: HaveAnchor | HasSpt EscherPropertyContainer aPropOpt2; aPropOpt2.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x50001 ); @@ -3578,7 +3575,7 @@ void PPTWriter::ImplCreateCellBorder( const CellBorder* pCellBorder, sal_Int32 n mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); EscherPropertyContainer aPropOptSp; - sal_uInt32 nId = mpPptEscherEx->GetShapeID(); + sal_uInt32 nId = mpPptEscherEx->GenerateShapeId(); mpPptEscherEx->AddShape( ESCHER_ShpInst_Line, 0xa02, nId ); aPropOptSp.AddOpt( ESCHER_Prop_shapePath, ESCHER_ShapeComplex ); aPropOptSp.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0xa0008 ); @@ -3612,7 +3609,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc << (INT32)maRect.Right() << (INT32)maRect.Bottom(); - sal_uInt32 nShapeId = mpPptEscherEx->GetShapeID(); + sal_uInt32 nShapeId = mpPptEscherEx->GenerateShapeId(); mpPptEscherEx->AddShape( ESCHER_ShpInst_Min, 0x201, nShapeId ); // Flags: Group | Patriarch aSolverContainer.AddShape( rXShape, nShapeId ); EscherPropertyContainer aPropOpt2; diff --git a/sd/source/filter/pptx/pptx-escherex.cxx b/sd/source/filter/pptx/pptx-escherex.cxx index c285ba2e8ece..fbb94de67ae7 100644 --- a/sd/source/filter/pptx/pptx-escherex.cxx +++ b/sd/source/filter/pptx/pptx-escherex.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: escherex.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -40,14 +37,10 @@ // --------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------- -PptEscherEx::PptEscherEx( SvStream& rOutStrm, UINT32 nDrawings ) : - EscherEx ( rOutStrm, nDrawings ) +PptEscherEx::PptEscherEx( SvStream& rOutStrm ) : + EscherEx( EscherExGlobalRef( new EscherExGlobal ), rOutStrm ) { - mnFIDCLs = nDrawings; mnCurrentDg = 0; - mnCurrentShapeID = 0; - mnTotalShapesDgg = 0; - mnCurrentShapeMaximumID = 0; } // --------------------------------------------------------------------------------------------- @@ -72,8 +65,8 @@ sal_uInt32 PptEscherEx::ImplDggContainerSize() { UINT32 nSize; - nSize = ImplDggAtomSize(); - nSize += GetBlibStoreContainerSize(); + nSize = mxGlobal->GetDggAtomSize(); + nSize += mxGlobal->GetBlibStoreContainerSize(); nSize += ImplOptAtomSize(); nSize += ImplSplitMenuColorsAtomSize(); @@ -88,8 +81,9 @@ void PptEscherEx::ImplWriteDggContainer( SvStream& rSt ) rSt << (sal_uInt32)( 0xf | ( ESCHER_DggContainer << 16 ) ) << (sal_uInt32)( nSize - 8 ); - ImplWriteDggAtom( rSt ); - WriteBlibStoreContainer( rSt ); + mxGlobal->SetDggContainer(); + mxGlobal->WriteDggAtom( rSt ); + mxGlobal->WriteBlibStoreContainer( rSt ); ImplWriteOptAtom( rSt ); ImplWriteSplitMenuColorsAtom( rSt ); } @@ -97,29 +91,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,11 +165,7 @@ void PptEscherEx::OpenContainer( UINT16 n_EscherContainer, int nRecInstance ) if ( !mbEscherDg ) { mbEscherDg = TRUE; - mnCurrentDg++; - mnTotalShapesDg = 0; - mnTotalShapeIdUsedDg = 0; - mnCurrentShapeID = ( mnCurrentShapeMaximumID &~0x3ff ) + 0x400; // eine neue Seite bekommt immer eine neue ShapeId die ein vielfaches von 1024 ist, - // damit ist erste aktuelle Shape ID 0x400 + mnCurrentDg = mxGlobal->GenerateDrawingId(); AddAtom( 8, ESCHER_Dg, 0, mnCurrentDg ); PtReplaceOrInsert( ESCHER_Persist_Dg | mnCurrentDg, mpOutStrm->Tell() ); *mpOutStrm << (UINT32)0 // The number of shapes in this drawing @@ -249,39 +216,7 @@ void PptEscherEx::CloseContainer() { mbEscherDg = FALSE; if ( DoSeek( ESCHER_Persist_Dg | mnCurrentDg ) ) - { - // 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; - } - } - } - } - } + *mpOutStrm << mxGlobal->GetDrawingShapeCount( mnCurrentDg ) << mxGlobal->GetLastShapeId( mnCurrentDg ); } } break; @@ -329,7 +264,7 @@ sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClie << (INT32)aRect.Right() << (INT32)aRect.Bottom(); - nShapeId = GetShapeID(); + nShapeId = GenerateShapeId(); if ( !mnGroupLevel ) AddShape( ESCHER_ShpInst_Min, 5, nShapeId ); // Flags: Group | Patriarch else diff --git a/sd/source/filter/pptx/pptx-pptexanimations.cxx b/sd/source/filter/pptx/pptx-pptexanimations.cxx index 1af3de0bfc5b..defe99fafba5 100644 --- a/sd/source/filter/pptx/pptx-pptexanimations.cxx +++ b/sd/source/filter/pptx/pptx-pptexanimations.cxx @@ -74,8 +74,8 @@ #include <vcl/vclenum.hxx> #include <svx/svdotext.hxx> -#include <svx/outlobj.hxx> -#include <svx/editobj.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/editobj.hxx> #include <pptexanimations.hxx> #include <osl/endian.h> diff --git a/sd/source/filter/pptx/pptx-text.cxx b/sd/source/filter/pptx/pptx-text.cxx index 19495d622202..a18283780620 100644 --- a/sd/source/filter/pptx/pptx-text.cxx +++ b/sd/source/filter/pptx/pptx-text.cxx @@ -18,10 +18,10 @@ #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/style/TabStop.hpp> -#include <svtools/languageoptions.hxx> +#include <svl/languageoptions.hxx> #include <sfx2/app.hxx> #include <editeng/svxenum.hxx> -#include <svx/frmdir.hxx> +#include <editeng/frmdir.hxx> #include <unotools/fontcvt.hxx> #include <vcl/metric.hxx> #include <vcl/outdev.hxx> |