[Libreoffice-commits] .: cppcanvas/source svtools/source vcl/inc vcl/source

Joseph Powers jpowers at kemper.freedesktop.org
Tue May 10 07:45:40 PDT 2011


 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx |  112 +--
 svtools/source/filter.vcl/wmf/emfwr.cxx                  |   66 -
 svtools/source/filter.vcl/wmf/wmfwr.cxx                  |   42 -
 svtools/source/graphic/grfcache.cxx                      |    2 
 svtools/source/graphic/grfmgr.cxx                        |    6 
 svtools/source/graphic/provider.cxx                      |  132 +--
 svtools/source/misc/transfer.cxx                         |   12 
 vcl/inc/vcl/gdimtf.hxx                                   |   49 -
 vcl/inc/vcl/metaact.hxx                                  |    2 
 vcl/source/gdi/cvtgrf.cxx                                |   14 
 vcl/source/gdi/cvtsvm.cxx                                |   46 -
 vcl/source/gdi/gdimtf.cxx                                |  550 ++++++++-------
 vcl/source/gdi/impvect.cxx                               |    6 
 vcl/source/gdi/pdfextoutdevdata.cxx                      |   10 
 vcl/source/gdi/pdfwriter_impl2.cxx                       |  104 +-
 vcl/source/gdi/print2.cxx                                |  146 +--
 16 files changed, 686 insertions(+), 613 deletions(-)

New commits:
commit 6fb23043a46f8f79aefede2f48f4e624f3eb146d
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue May 10 06:32:19 2011 -0700

    GDIMetaFile cleanup - Remove dependance on List class
    
    Plus trailing whitespace cleanup.

diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index 2fa7b3f..bd183a6 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -72,26 +72,26 @@
 
 using namespace ::com::sun::star;
 
-namespace cppcanvas 
-{ 
+namespace cppcanvas
+{
     namespace internal
     {
         // free support functions
         // ======================
         namespace
         {
-            class TransparencyGroupAction : public Action, private ::boost::noncopyable 
-            { 
-            public: 
+            class TransparencyGroupAction : public Action, private ::boost::noncopyable
+            {
+            public:
                 /** Create new transparency group action.
 
                     @param rGroupMtf
                     Metafile that groups all actions to be rendered
                     transparent
-                    
+
                     @param rParms
                     Render parameters
-                
+
                     @param rDstPoint
                     Left, top edge of destination, in current state
                     coordinate system
@@ -105,11 +105,11 @@ namespace cppcanvas
                 */
                 TransparencyGroupAction( MtfAutoPtr&					rGroupMtf,
                                          const Renderer::Parameters& 	rParms,
-                                         const ::basegfx::B2DPoint& 	rDstPoint,  
-                                         const ::basegfx::B2DVector& 	rDstSize,  
+                                         const ::basegfx::B2DPoint& 	rDstPoint,
+                                         const ::basegfx::B2DVector& 	rDstSize,
                                          double 						nAlpha,
-                                         const CanvasSharedPtr&			rCanvas, 
-                                         const OutDevState& 			rState ); 
+                                         const CanvasSharedPtr&			rCanvas,
+                                         const OutDevState& 			rState );
 
                 /** Create new transparency group action.
 
@@ -135,10 +135,10 @@ namespace cppcanvas
                 TransparencyGroupAction( MtfAutoPtr&					rGroupMtf,
                                          GradientAutoPtr&				rAlphaGradient,
                                          const Renderer::Parameters& 	rParms,
-                                         const ::basegfx::B2DPoint& 	rDstPoint,  
-                                         const ::basegfx::B2DVector& 	rDstSize,  
-                                         const CanvasSharedPtr&			rCanvas, 
-                                         const OutDevState& 			rState ); 
+                                         const ::basegfx::B2DPoint& 	rDstPoint,
+                                         const ::basegfx::B2DVector& 	rDstSize,
+                                         const CanvasSharedPtr&			rCanvas,
+                                         const OutDevState& 			rState );
 
                 virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation ) const;
                 virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation,
@@ -163,8 +163,8 @@ namespace cppcanvas
                 mutable Subset										maLastSubset; // contains last effective subset
 
                 // transformation for
-                // mxBufferBitmap content 
-                CanvasSharedPtr										mpCanvas;            
+                // mxBufferBitmap content
+                CanvasSharedPtr										mpCanvas;
                 rendering::RenderState								maState;
                 const double										mnAlpha;
             };
@@ -178,8 +178,8 @@ namespace cppcanvas
                                      const ::basegfx::B2DPoint&	rDstPoint	)
             {
                 ::basegfx::B2DHomMatrix	aLocalTransformation;
-                
-                aLocalTransformation.translate( rDstPoint.getX(), 
+
+                aLocalTransformation.translate( rDstPoint.getX(),
                                                 rDstPoint.getY() );
                 ::canvas::tools::appendToRenderState( rRenderState,
                                                       aLocalTransformation );
@@ -187,10 +187,10 @@ namespace cppcanvas
 
             TransparencyGroupAction::TransparencyGroupAction( MtfAutoPtr&					rGroupMtf,
                                                               const Renderer::Parameters& 	rParms,
-                                                              const ::basegfx::B2DPoint& 	rDstPoint,  
-                                                              const ::basegfx::B2DVector& 	rDstSize,  
+                                                              const ::basegfx::B2DPoint& 	rDstPoint,
+                                                              const ::basegfx::B2DVector& 	rDstSize,
                                                               double 						nAlpha,
-                                                              const CanvasSharedPtr&		rCanvas, 
+                                                              const CanvasSharedPtr&		rCanvas,
                                                               const OutDevState& 			rState ) :
                 mpGroupMtf( rGroupMtf ),
                 mpAlphaGradient(),
@@ -206,10 +206,10 @@ namespace cppcanvas
                 implSetupTransform( maState, rDstPoint );
 
                 // correct clip (which is relative to original transform)
-                tools::modifyClip( maState, 
-                                   rState, 
-                                   rCanvas, 
-                                   rDstPoint, 
+                tools::modifyClip( maState,
+                                   rState,
+                                   rCanvas,
+                                   rDstPoint,
                                    NULL,
                                    NULL );
 
@@ -220,9 +220,9 @@ namespace cppcanvas
             TransparencyGroupAction::TransparencyGroupAction( MtfAutoPtr&					rGroupMtf,
                                                               GradientAutoPtr&				rAlphaGradient,
                                                               const Renderer::Parameters& 	rParms,
-                                                              const ::basegfx::B2DPoint& 	rDstPoint,  
-                                                              const ::basegfx::B2DVector& 	rDstSize,  
-                                                              const CanvasSharedPtr&		rCanvas, 
+                                                              const ::basegfx::B2DPoint& 	rDstPoint,
+                                                              const ::basegfx::B2DVector& 	rDstSize,
+                                                              const CanvasSharedPtr&		rCanvas,
                                                               const OutDevState& 			rState ) :
                 mpGroupMtf( rGroupMtf ),
                 mpAlphaGradient( rAlphaGradient ),
@@ -238,10 +238,10 @@ namespace cppcanvas
                 implSetupTransform( maState, rDstPoint );
 
                 // correct clip (which is relative to original transform)
-                tools::modifyClip( maState, 
-                                   rState, 
-                                   rCanvas, 
-                                   rDstPoint, 
+                tools::modifyClip( maState,
+                                   rState,
+                                   rCanvas,
+                                   rDstPoint,
                                    NULL,
                                    NULL );
 
@@ -276,7 +276,7 @@ namespace cppcanvas
                 // does not matter, remove them before comparing
                 aTotalTransform.set( 0, 2, 0.0 );
                 aTotalTransform.set( 1, 2, 0.0 );
-            
+
                 // if there's no buffer bitmap, or as soon as the
                 // total transformation changes, we've got to
                 // re-render the bitmap
@@ -285,7 +285,7 @@ namespace cppcanvas
                     rSubset.mnSubsetBegin != maLastSubset.mnSubsetBegin ||
                     rSubset.mnSubsetEnd != maLastSubset.mnSubsetEnd )
                 {
-                    DBG_TESTSOLARMUTEX(); 
+                    DBG_TESTSOLARMUTEX();
 
                     // determine total scaling factor of the
                     // transformation matrix - need to make the bitmap
@@ -294,7 +294,7 @@ namespace cppcanvas
                     ::basegfx::B2DTuple aTranslate;
                     double				nRotate;
                     double				nShearX;
-                    if( !aTotalTransform.decompose( aScale, 
+                    if( !aTotalTransform.decompose( aScale,
                                                     aTranslate,
                                                     nRotate,
                                                     nShearX ) )
@@ -407,25 +407,25 @@ namespace cppcanvas
                             }
                         }
 
-                        aVDev.DrawTransparent( aMtf, 
+                        aVDev.DrawTransparent( aMtf,
                                                aEmptyPoint,
                                                aOutputSizePixel,
-                                               *mpAlphaGradient );                        
+                                               *mpAlphaGradient );
                     }
                     else
                     {
                         // no subsetting - render whole mtf
-                        aVDev.DrawTransparent( *mpGroupMtf, 
+                        aVDev.DrawTransparent( *mpGroupMtf,
                                                aEmptyPoint,
                                                aOutputSizePixel,
                                                *mpAlphaGradient );
                     }
-                
+
 
                     // update buffered bitmap and transformation
-                    BitmapSharedPtr aBmp( VCLFactory::getInstance().createBitmap( 
+                    BitmapSharedPtr aBmp( VCLFactory::getInstance().createBitmap(
                                               mpCanvas,
-                                              aVDev.GetBitmapEx( 
+                                              aVDev.GetBitmapEx(
                                                   aEmptyPoint,
                                                   aBitmapSizePixel ) ) );
                     mxBufferBitmap = aBmp->getUNOBitmap();
@@ -449,7 +449,7 @@ namespace cppcanvas
                 // Translation*Rotation*Shear*Scale. Thus, to neutralize
                 // the contained scaling, we've got to right-multiply with
                 // the inverse.
-                ::basegfx::B2ISize aBmpSize( 
+                ::basegfx::B2ISize aBmpSize(
                     ::basegfx::unotools::b2ISizeFromIntegerSize2D( mxBufferBitmap->getSize() ) );
 
                 ::basegfx::B2DHomMatrix aScaleCorrection;
@@ -472,7 +472,7 @@ namespace cppcanvas
                     // add alpha modulation value to DeviceColor
                     uno::Sequence<rendering::ARGBColor> aCols(1);
                     aCols[0] = rendering::ARGBColor( mnAlpha, 1.0, 1.0, 1.0);
-                    aLocalState.DeviceColor = 
+                    aLocalState.DeviceColor =
                         mpCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace()->convertFromARGB(
                             aCols);
 
@@ -500,13 +500,13 @@ namespace cppcanvas
 
                 return render( rTransformation, aSubset );
             }
-            
+
             ::basegfx::B2DRange TransparencyGroupAction::getBounds( const ::basegfx::B2DHomMatrix&	rTransformation ) const
             {
                 rendering::RenderState aLocalState( maState );
                 ::canvas::tools::prependToRenderState(aLocalState, rTransformation);
-                
-                return tools::calcDevicePixelBounds( 
+
+                return tools::calcDevicePixelBounds(
                     ::basegfx::B2DRange( 0,0,
                                          maDstSize.getX(),
                                          maDstSize.getY() ),
@@ -533,17 +533,17 @@ namespace cppcanvas
 
             sal_Int32 TransparencyGroupAction::getActionCount() const
             {
-                return mpGroupMtf.get() ? mpGroupMtf->GetActionCount() : 0;
+                return mpGroupMtf.get() ? mpGroupMtf->GetActionSize() : 0;
             }
 
         }
 
         ActionSharedPtr TransparencyGroupActionFactory::createTransparencyGroupAction( MtfAutoPtr&					rGroupMtf,
                                                                                        const Renderer::Parameters&	rParms,
-                                                                                       const ::basegfx::B2DPoint& 	rDstPoint,  
-                                                                                       const ::basegfx::B2DVector& 	rDstSize,  
+                                                                                       const ::basegfx::B2DPoint& 	rDstPoint,
+                                                                                       const ::basegfx::B2DVector& 	rDstSize,
                                                                                        double 						nAlpha,
-                                                                                       const CanvasSharedPtr&		rCanvas, 
+                                                                                       const CanvasSharedPtr&		rCanvas,
                                                                                        const OutDevState& 			rState )
         {
             return ActionSharedPtr( new TransparencyGroupAction(rGroupMtf,
@@ -558,9 +558,9 @@ namespace cppcanvas
         ActionSharedPtr TransparencyGroupActionFactory::createTransparencyGroupAction( MtfAutoPtr&					rGroupMtf,
                                                                                        GradientAutoPtr&				rAlphaGradient,
                                                                                        const Renderer::Parameters&	rParms,
-                                                                                       const ::basegfx::B2DPoint& 	rDstPoint,  
-                                                                                       const ::basegfx::B2DVector&  rDstSize,  
-                                                                                       const CanvasSharedPtr&		rCanvas, 
+                                                                                       const ::basegfx::B2DPoint& 	rDstPoint,
+                                                                                       const ::basegfx::B2DVector&  rDstSize,
+                                                                                       const CanvasSharedPtr&		rCanvas,
                                                                                        const OutDevState& 			rState )
         {
             return ActionSharedPtr( new TransparencyGroupAction(rGroupMtf,
@@ -571,7 +571,7 @@ namespace cppcanvas
                                                                 rCanvas,
                                                                 rState ) );
         }
-        
+
     }
 }
 
diff --git a/svtools/source/filter.vcl/wmf/emfwr.cxx b/svtools/source/filter.vcl/wmf/emfwr.cxx
index 6280ed4..7dc2a3d 100644
--- a/svtools/source/filter.vcl/wmf/emfwr.cxx
+++ b/svtools/source/filter.vcl/wmf/emfwr.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -178,17 +178,17 @@ sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilter
     mnHorTextAlign = mnHandleCount = mnLastPercent = mnRecordPos = mnRecordCount = 0;
     mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID;
     mbRecordOpen = sal_False;
-    
+
     maVDev.EnableOutput( sal_False );
     maVDev.SetMapMode( rMtf.GetPrefMapMode() );
     mpFilterConfigItem = pFilterConfigItem;
 
     // don't work with pixel as destination map mode -> higher resolution preferrable
-    maDestMapMode.SetMapUnit( MAP_100TH_MM ); 
+    maDestMapMode.SetMapUnit( MAP_100TH_MM );
 
     const Size aMtfSizePix( maVDev.LogicToPixel( rMtf.GetPrefSize(), rMtf.GetPrefMapMode() ) );
     const Size aMtfSizeLog( maVDev.LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_100TH_MM ) );
-    
+
     // seek over header
     // use [MS-EMF 2.2.11] HeaderExtension2 Object, otherwise resulting EMF cannot be converted with GetWinMetaFileBits()
     m_rStm.SeekRel( 108 );
@@ -234,7 +234,7 @@ sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilter
 
     // write header
     const sal_uLong nEndPos = m_rStm.Tell(); m_rStm.Seek( nHeaderPos );
-    
+
     m_rStm << (sal_uInt32) 0x00000001 << (sal_uInt32) 108	//use [MS-EMF 2.2.11] HeaderExtension2 Object
              << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizePix.Width() - 1 ) << (sal_Int32) ( aMtfSizePix.Height() - 1 )
              << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizeLog.Width() - 1 ) << (sal_Int32) ( aMtfSizeLog.Height() - 1 )
@@ -246,7 +246,7 @@ sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilter
              << (sal_Int32) (  aMtfSizeLog.Width() * 10 ) << (sal_Int32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object
 
     m_rStm.Seek( nEndPos );
-    delete[] mpHandlesUsed; 
+    delete[] mpHandlesUsed;
 
     return( m_rStm.GetError() == ERRCODE_NONE );
 }
@@ -327,7 +327,7 @@ sal_Bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSel
     {
         sal_uInt32 nStockObject = 0x80000000;
 
-        if( LINE_SELECT == nSelectType ) 
+        if( LINE_SELECT == nSelectType )
             nStockObject |= 0x00000007;
         else if( FILL_SELECT == nSelectType )
             nStockObject |= 0x00000001;
@@ -338,13 +338,13 @@ sal_Bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSel
         ImplBeginRecord( WIN_EMR_SELECTOBJECT );
         m_rStm << nStockObject;
         ImplEndRecord();
-        
+
         // destroy handle of created object
         ImplBeginRecord( WIN_EMR_DELETEOBJECT );
         m_rStm << rHandle;
         ImplEndRecord();
 
-        // mark handle as free 
+        // mark handle as free
         ImplReleaseHandle( rHandle );
     }
 
@@ -412,7 +412,7 @@ void EMFWriter::ImplCheckTextAttr()
         ImplWriteExtent( rFont.GetSize().Width() );
         m_rStm << (sal_Int32) rFont.GetOrientation() << (sal_Int32) rFont.GetOrientation();
 
-        switch( rFont.GetWeight() ) 
+        switch( rFont.GetWeight() )
         {
             case WEIGHT_THIN:       nWeight = 100; break;
             case WEIGHT_ULTRALIGHT: nWeight = 200; break;
@@ -426,7 +426,7 @@ void EMFWriter::ImplCheckTextAttr()
             case WEIGHT_BLACK:      nWeight = 900; break;
             default:				nWeight = 0; break;
         }
-        
+
         m_rStm << nWeight;
         m_rStm << (sal_uInt8) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 );
         m_rStm << (sal_uInt8) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 );
@@ -434,14 +434,14 @@ void EMFWriter::ImplCheckTextAttr()
         m_rStm << (sal_uInt8) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 );
         m_rStm << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0;
 
-        switch( rFont.GetPitch() ) 
+        switch( rFont.GetPitch() )
         {
             case PITCH_FIXED:    nPitchAndFamily = 0x01; break;
             case PITCH_VARIABLE: nPitchAndFamily = 0x02; break;
             default:             nPitchAndFamily = 0x00; break;
         }
 
-        switch( rFont.GetFamily() ) 
+        switch( rFont.GetFamily() )
         {
             case FAMILY_DECORATIVE: nPitchAndFamily |= 0x50; break;
             case FAMILY_MODERN:     nPitchAndFamily |= 0x30; break;
@@ -673,12 +673,12 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
                 n++;
                 continue;
             }
-            
+
             sal_uInt16 nBezPoints = 0;
-            
+
             while ( ( ( nBezPoints + n + 2 ) < rPoly.GetSize() ) && ( rPoly.GetFlags( nBezPoints + n ) == POLY_CONTROL ) )
                 nBezPoints += 3;
-        
+
             if ( nBezPoints )
             {
                 ImplBeginRecord( WIN_EMR_POLYBEZIERTO );
@@ -698,12 +698,12 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
                 sal_uInt16 nPoints = 1;
                 while( ( nPoints + n ) < rPoly.GetSize() && ( rPoly.GetFlags( nPoints + n ) != POLY_CONTROL ) )
                     nPoints++;
-            
+
                 if ( nPoints > 1 )
                 {
                     ImplBeginRecord( WIN_EMR_POLYLINETO );
                     Polygon aNewPoly( nPoints + 1 );
-                    aNewPoly[ 0 ] = rPoly[ n - 1];	
+                    aNewPoly[ 0 ] = rPoly[ n - 1];
                     for ( o = 1; o <= nPoints; o++ )
                         aNewPoly[ o ] = rPoly[ n - 1 + o ];
                     ImplWriteRect( aNewPoly.GetBoundRect() );
@@ -736,7 +736,7 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
 
 // -----------------------------------------------------------------------------
 
-void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, 
+void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
                                     const Size& rSz, sal_uInt32 nROP )
 {
     if( !!rBmp )
@@ -748,7 +748,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
         ImplWriteRect( Rectangle( rPt, rSz ) );
         ImplWritePoint( rPt );
         m_rStm << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) aBmpSizePixel.Width() << (sal_Int32) aBmpSizePixel.Height();
-        
+
         // write offset positions and sizes later
         const sal_uLong nOffPos = m_rStm.Tell();
         m_rStm.SeekRel( 16 );
@@ -769,7 +769,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
         aMemStm.SeekRel( 8 );
         aMemStm >> nColsUsed;
 
-        nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) : 
+        nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) :
                                          ( ( 3 == nCompression ) ? 12 : 0 );
 
         m_rStm.Write( aMemStm.GetData(), nDIBSize );
@@ -804,7 +804,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons
             pDX = (sal_Int32*) pDXArray;
         }
         else
-        {	
+        {
             pOwnArray = new sal_Int32[ nLen ];
             nNormWidth = maVDev.GetTextArray( rText, pOwnArray );
             pDX = pOwnArray;
@@ -902,7 +902,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
 
 void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
 {
-    for( sal_uLong j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ )
+    for( size_t j = 0, nActionCount = rMtf.GetActionSize(); j < nActionCount; j++ )
     {
         const MetaAction*	pAction = rMtf.GetAction( j );
         const sal_uInt16		nType = pAction->GetType();
@@ -945,7 +945,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
                     if(pA->GetLineInfo().IsDefault())
                     {
                         ImplCheckLineAttr();
-                        
+
                         ImplBeginRecord( WIN_EMR_MOVETOEX );
                         ImplWritePoint( pA->GetStartPoint() );
                         ImplEndRecord();
@@ -1051,7 +1051,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
                             aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD );
                         }
                         break;
-                        
+
                         case( META_POLYGON_ACTION ):
                             aPoly = ( (const MetaPolygonAction*) pAction )->GetPolygon();
                         break;
@@ -1123,7 +1123,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
             case META_FLOATTRANSPARENT_ACTION:
             {
                 const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction;
-                
+
                 GDIMetaFile		aTmpMtf( pA->GetGDIMetaFile() );
                 Point			aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() );
                 const Size		aSrcSize( aTmpMtf.GetPrefSize() );
@@ -1156,7 +1156,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
                 const MetaEPSAction*	pA = (const MetaEPSAction*) pAction;
                 const GDIMetaFile		aSubstitute( pA->GetSubstitute() );
 
-                for( sal_uLong i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ )
+                for( size_t i = 0, nCount = aSubstitute.GetActionSize(); i < nCount; i++ )
                 {
                     const MetaAction* pSubstAct = aSubstitute.GetAction( i );
                     if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
@@ -1302,14 +1302,14 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
                 ImplWriteTextRecord( pA->GetPoint(), aText, NULL, pA->GetWidth() );
             }
             break;
-        
+
             case( META_LINECOLOR_ACTION	):
             {
                 ( (MetaAction*) pAction )->Execute( &maVDev );
                 mbLineChanged = sal_True;
             }
             break;
-            
+
             case( META_FILLCOLOR_ACTION	):
             {
                 ( (MetaAction*) pAction )->Execute( &maVDev );
@@ -1331,7 +1331,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
             case( META_ISECTRECTCLIPREGION_ACTION ):
             {
                 ( (MetaAction*) pAction )->Execute( &maVDev );
-                
+
                 ImplBeginRecord( WIN_EMR_INTERSECTCLIPRECT );
                 ImplWriteRect( ( (MetaISectRectClipRegionAction*) pAction )->GetRect() );
                 ImplEndRecord();
@@ -1354,7 +1354,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
             case( META_PUSH_ACTION ):
             {
                 ( (MetaAction*) pAction )->Execute( &maVDev );
-                
+
                 ImplBeginRecord( WIN_EMR_SAVEDC );
                 ImplEndRecord();
             }
@@ -1363,11 +1363,11 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
             case( META_POP_ACTION ):
             {
                 ( (MetaAction*) pAction )->Execute( &maVDev );
-                
+
                 ImplBeginRecord( WIN_EMR_RESTOREDC );
                 m_rStm << (sal_Int32) -1;
                 ImplEndRecord();
-                
+
                 ImplWriteRasterOp( maVDev.GetRasterOp() );
                 mbLineChanged = mbFillChanged = mbTextChanged = sal_True;
             }
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter.vcl/wmf/wmfwr.cxx
index 08f2c9c..769bcdd 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.cxx
+++ b/svtools/source/filter.vcl/wmf/wmfwr.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -273,11 +273,11 @@ void WMFWriter::MayCallback()
 
 void WMFWriter::CountActionsAndBitmaps( const GDIMetaFile & rMTF )
 {
-    sal_uLong nAction, nActionCount;
+    size_t nAction, nActionCount;
 
-    nActionCount = rMTF.GetActionCount();
+    nActionCount = rMTF.GetActionSize();
 
-    for ( nAction=0; nAction<nActionCount; nAction++ )
+    for ( nAction=0; nAction < nActionCount; nAction++ )
     {
         MetaAction* pMA = rMTF.GetAction( nAction );
 
@@ -566,7 +566,7 @@ sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String&
                     break;
             }
 
-            if  ( i != nStringLen )								// after conversion the characters are not original, 
+            if  ( i != nStringLen )								// after conversion the characters are not original,
             {													// try again, with determining a better charset from unicode char
                 pBuf = rUniStr.GetBuffer();
                 const sal_Unicode* pCheckChar = pBuf;
@@ -587,7 +587,7 @@ sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String&
                     if ( *pBuf++ != *pConversion++ )
                         break;
                 }
-                if (i == nStringLen) 
+                if (i == nStringLen)
                 {
                     aSrcFont.SetCharSet (aTextEncoding);
                     SetAllAttr();
@@ -658,7 +658,7 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point & rPoint,
     TrueExtTextOut(rPoint,rString,aByteString,pDXAry);
 }
 
-void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString, 
+void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString,
     const ByteString & rByteString, const sal_Int32 * pDXAry )
 {
     WriteRecordHeader( 0, W_META_EXTTEXTOUT );
@@ -1144,16 +1144,16 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx:
 
 void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
 {
-    sal_uLong		nA, nACount;
-    MetaAction*	pMA;
+    size_t      nA, nACount;
+    MetaAction* pMA;
 
     if( bStatus )
     {
-        nACount = rMTF.GetActionCount();
+        nACount = rMTF.GetActionSize();
 
         WMFRecord_SetStretchBltMode();
 
-        for( nA=0; nA<nACount; nA++ )
+        for( nA=0; nA < nACount; nA++ )
         {
             pMA = rMTF.GetAction( nA );
 
@@ -1322,7 +1322,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
                 case META_TEXTARRAY_ACTION:
                 {
                     const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA;
-                    
+
                     String aTemp( pA->GetText(), pA->GetIndex(), pA->GetLen() );
                     aSrcLineInfo = LineInfo();
                     SetAllAttr();
@@ -1663,8 +1663,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
                     const MetaEPSAction* pA = (const MetaEPSAction*)pMA;
                     const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
 
-                    sal_Int32 nCount = aGDIMetaFile.GetActionCount();
-                    for ( sal_Int32 i = 0; i < nCount; i++ )
+                    size_t nCount = aGDIMetaFile.GetActionSize();
+                    for ( size_t i = 0; i < nCount; i++ )
                     {
                         const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i );
                         if ( pMetaAct->GetType() == META_BMPSCALE_ACTION )
@@ -1695,7 +1695,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
                 case META_FLOATTRANSPARENT_ACTION:
                 {
                     const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pMA;
-                    
+
                     GDIMetaFile		aTmpMtf( pA->GetGDIMetaFile() );
                     Point			aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() );
                     const Size		aSrcSize( aTmpMtf.GetPrefSize() );
@@ -1953,7 +1953,7 @@ sal_Bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
 
     if ( xStatusIndicator.is() )
         xStatusIndicator->end();
-    
+
     return bStatus;
 }
 
@@ -1989,7 +1989,7 @@ void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF )
 {
     SvMemoryStream aStream;
     EMFWriter aEMFWriter(aStream);
-    
+
     if( aEMFWriter.WriteEMF( rMTF ) )
     {
         sal_Size nTotalSize = aStream.Tell();
@@ -2025,8 +2025,8 @@ void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF )
                 nCurSize = nRemainingSize;
                 nRemainingSize = 0;
             }
-            WriteEMFRecord( aStream, 
-                            nCurSize, 
+            WriteEMFRecord( aStream,
+                            nCurSize,
                             nRemainingSize,
                             nTotalSize,
                             nRecCounts,
@@ -2035,14 +2035,14 @@ void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF )
         }
     }
 }
-   
+
 // ------------------------------------------------------------------------
 
 void WMFWriter::WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, sal_uInt32 nRemainingSize,
                 sal_uInt32 nTotalSize, sal_uInt32 nRecCounts, sal_uInt16 nCheckSum )
 {
    // according to http://msdn.microsoft.com/en-us/library/dd366152%28PROT.13%29.aspx
-   WriteRecordHeader( 0, W_META_ESCAPE ); 
+   WriteRecordHeader( 0, W_META_ESCAPE );
    *pWMF << (sal_uInt16)W_MFCOMMENT			// same as META_ESCAPE_ENHANCED_METAFILE
           << (sal_uInt16)( nCurSize + 34 )	// we will always have a 34 byte escape header:
           << (sal_uInt32) 0x43464D57		// WMFC
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index c4fca0a..ecb136d 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -118,7 +118,7 @@ GraphicID::GraphicID( const GraphicObject& rObj )
         {
             const GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() );
 
-            mnID1 |= ( aMtf.GetActionCount() & 0x0fffffff );
+            mnID1 |= ( aMtf.GetActionSize() & 0x0fffffff );
             mnID2 = aMtf.GetPrefSize().Width();
             mnID3 = aMtf.GetPrefSize().Height();
             mnID4 = rGraphic.GetChecksum();
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 706cb6c..e21f136 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -162,7 +162,7 @@ void GraphicObject::ImplAssignGraphicData()
     if( maGraphic.GetType() == GRAPHIC_GDIMETAFILE )
     {
         const GDIMetaFile& rMtf = GetGraphic().GetGDIMetaFile();
-        mbEPS = ( rMtf.GetActionCount() >= 1 ) && ( META_EPS_ACTION == rMtf.GetAction( 0 )->GetType() );
+        mbEPS = ( rMtf.GetActionSize() >= 1 ) && ( META_EPS_ACTION == rMtf.GetAction( 0 )->GetType() );
     }
     else
         mbEPS = sal_False;
@@ -803,7 +803,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC
     delete mpSimpleCache, mpSimpleCache = NULL;
 
     mpMgr->ImplRegisterObj( *this, maGraphic, 0, pCopyObj);
-    
+
     if( mpSwapOutTimer )
         mpSwapOutTimer->Start();
 }
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 14f500c..44c053d 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -78,7 +78,7 @@ GraphicProvider::~GraphicProvider()
 }
 
 // ------------------------------------------------------------------------------
-    
+
 ::rtl::OUString GraphicProvider::getImplementationName_Static()
     throw()
 {
@@ -91,15 +91,15 @@ uno::Sequence< ::rtl::OUString > GraphicProvider::getSupportedServiceNames_Stati
     throw()
 {
     uno::Sequence< ::rtl::OUString > aSeq( 1 );
-    
+
     aSeq.getArray()[ 0 ] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.graphic.GraphicProvider" ) );
-    
+
     return aSeq;
 }
 
 // ------------------------------------------------------------------------------
-    
-::rtl::OUString SAL_CALL GraphicProvider::getImplementationName() 
+
+::rtl::OUString SAL_CALL GraphicProvider::getImplementationName()
     throw( uno::RuntimeException )
 {
     return getImplementationName_Static();
@@ -107,7 +107,7 @@ uno::Sequence< ::rtl::OUString > GraphicProvider::getSupportedServiceNames_Stati
 
 // ------------------------------------------------------------------------------
 
-sal_Bool SAL_CALL GraphicProvider::supportsService( const ::rtl::OUString& ServiceName ) 
+sal_Bool SAL_CALL GraphicProvider::supportsService( const ::rtl::OUString& ServiceName )
     throw( uno::RuntimeException )
 {
     uno::Sequence< ::rtl::OUString >	aSNL( getSupportedServiceNames() );
@@ -122,7 +122,7 @@ sal_Bool SAL_CALL GraphicProvider::supportsService( const ::rtl::OUString& Servi
 
 // ------------------------------------------------------------------------------
 
-uno::Sequence< ::rtl::OUString > SAL_CALL GraphicProvider::getSupportedServiceNames() 
+uno::Sequence< ::rtl::OUString > SAL_CALL GraphicProvider::getSupportedServiceNames()
     throw( uno::RuntimeException )
 {
     return getSupportedServiceNames_Static();
@@ -130,7 +130,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL GraphicProvider::getSupportedServiceNa
 
 // ------------------------------------------------------------------------------
 
-uno::Sequence< uno::Type > SAL_CALL GraphicProvider::getTypes() 
+uno::Sequence< uno::Type > SAL_CALL GraphicProvider::getTypes()
     throw(uno::RuntimeException)
 {
     uno::Sequence< uno::Type >	aTypes( 3 );
@@ -145,18 +145,18 @@ uno::Sequence< uno::Type > SAL_CALL GraphicProvider::getTypes()
 
 // ------------------------------------------------------------------------------
 
-uno::Sequence< sal_Int8 > SAL_CALL GraphicProvider::getImplementationId() 
+uno::Sequence< sal_Int8 > SAL_CALL GraphicProvider::getImplementationId()
     throw(uno::RuntimeException)
 {
     SolarMutexGuard aGuard;
     static uno::Sequence< sal_Int8 >	aId;
-    
+
     if( aId.getLength() == 0 )
     {
         aId.realloc( 16 );
         rtl_createUuid( reinterpret_cast< sal_uInt8* >( aId.getArray() ), 0, sal_True );
     }
-    
+
     return aId;
 }
 
@@ -165,13 +165,13 @@ uno::Sequence< sal_Int8 > SAL_CALL GraphicProvider::getImplementationId()
 uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadGraphicObject( const ::rtl::OUString& rResourceURL ) const
 {
     uno::Reference< ::graphic::XGraphic > 	xRet;
-    if( rResourceURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) == 0 ) 
+    if( rResourceURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPREFIX ) ) == 0 )
     {
         // graphic manager url
         String aTmpStr( rResourceURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 ) );
         ByteString aUniqueID( aTmpStr, RTL_TEXTENCODING_UTF8 );
-        GraphicObject aGrafObj( aUniqueID );	
-        // I don't call aGrafObj.GetXGraphic because it will call us back 		
+        GraphicObject aGrafObj( aUniqueID );
+        // I don't call aGrafObj.GetXGraphic because it will call us back
         // into implLoadMemory ( with "private:memorygraphic" test )
         ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic;
         pUnoGraphic->init( aGrafObj.GetGraphic() );
@@ -184,20 +184,20 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadMemory( const ::r
 {
     uno::Reference< ::graphic::XGraphic > 	xRet;
     sal_Int32								nIndex = 0;
-    
+
     if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:memorygraphic" ) ) )
     {
         sal_Int64 nGraphicAddress = rResourceURL.getToken( 0, '/', nIndex ).toInt64();
-        
+
         if( nGraphicAddress )
         {
             ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic;
-                    
+
             pUnoGraphic->init( *reinterpret_cast< ::Graphic* >( nGraphicAddress ) );
             xRet = pUnoGraphic;
         }
     }
-    
+
     return xRet;
 }
 
@@ -262,9 +262,9 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadBitmap( const uno
     SvMemoryStream aBmpStream( aBmpSeq.getArray(), aBmpSeq.getLength(), STREAM_READ );
     Bitmap aBmp;
     aBmpStream >> aBmp;
-    
+
     BitmapEx aBmpEx;
-    
+
     if( aMaskSeq.getLength() )
     {
         SvMemoryStream aMaskStream( aMaskSeq.getArray(), aMaskSeq.getLength(), STREAM_READ );
@@ -278,7 +278,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadBitmap( const uno
     if( !aBmpEx.IsEmpty() )
     {
         ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic;
-        
+
         pUnoGraphic->init( aBmpEx );
         xRet = pUnoGraphic;
     }
@@ -291,27 +291,27 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const :
 {
     uno::Reference< ::graphic::XGraphic > 	xRet;
     sal_Int32								nIndex = 0;
-    
+
     if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:resource" ) ) )
     {
         ByteString aResMgrName( String( rResourceURL.getToken( 0, '/', nIndex ) ), RTL_TEXTENCODING_ASCII_US );
-        
+
         ResMgr* pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
-        
+
         if( pResMgr )
         {
             const ::rtl::OUString	aResourceType( rResourceURL.getToken( 0, '/', nIndex ) );
             const ResId				aResId( rResourceURL.getToken( 0, '/', nIndex ).toInt32(), *pResMgr );
-            
+
             if( aResourceType.getLength() )
             {
                 BitmapEx aBmpEx;
-                
+
                 if( ( 0 == aResourceType.compareToAscii( "bitmap" ) ) ||
                     ( 0 == aResourceType.compareToAscii( "bitmapex" ) ) )
                 {
                     aResId.SetRT( RSC_BITMAP );
-                    
+
                     if( pResMgr->IsAvailable( aResId ) )
                     {
                         aBmpEx = BitmapEx( aResId );
@@ -320,7 +320,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const :
                 else if( 0 == aResourceType.compareToAscii( "image" ) )
                 {
                     aResId.SetRT( RSC_IMAGE );
-                    
+
                     if( pResMgr->IsAvailable( aResId ) )
                     {
                         const Image aImage( aResId );
@@ -330,12 +330,12 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const :
                 else if( 0 == aResourceType.compareToAscii( "imagelist" ) )
                 {
                     aResId.SetRT( RSC_IMAGELIST );
-                    
+
                     if( pResMgr->IsAvailable( aResId ) )
                     {
                         const ImageList aImageList( aResId );
                         sal_Int32		nImageId = ( nIndex > -1 ) ? rResourceURL.getToken( 0, '/', nIndex ).toInt32() : 0;
-                        
+
                         if( 0 < nImageId )
                         {
                             const Image aImage( aImageList.GetImage( sal::static_int_cast< sal_uInt16 >(nImageId) ) );
@@ -347,20 +347,20 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const :
                         }
                     }
                 }
-            
+
                 if( !aBmpEx.IsEmpty() )
                 {
                     ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic;
-                    
+
                     pUnoGraphic->init( aBmpEx );
                     xRet = pUnoGraphic;
                 }
             }
-            
+
             delete pResMgr;
         }
     }
-    
+
     return xRet;
 }
 
@@ -379,7 +379,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc
     {
         const ::rtl::OUString	aName( rMediaProperties[ i ].Name );
         const uno::Any 			aValue( rMediaProperties[ i ].Value );
-    
+
         if( COMPARE_EQUAL == aName.compareToAscii( "URL" ) )
         {
             aValue >>= aURL;
@@ -413,7 +413,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc
 
         if ( !xGraphic.is() )
             xGraphic = implLoadStandardImage( aURL );
-        
+
         if( xGraphic.is() )
         {
             xRet = uno::Reference< beans::XPropertySet >( xGraphic, uno::UNO_QUERY );
@@ -436,7 +436,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc
 }
 
 // ------------------------------------------------------------------------------
-    
+
 uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( const uno::Sequence< ::beans::PropertyValue >& rMediaProperties )
     throw ( io::IOException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
 {
@@ -451,9 +451,9 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
     {
         const ::rtl::OUString	aName( rMediaProperties[ i ].Name );
         const uno::Any 			aValue( rMediaProperties[ i ].Value );
-    
+
         if( COMPARE_EQUAL == aName.compareToAscii( "URL" ) )
-        {		
+        {
             ::rtl::OUString aURL;
             aValue >>= aURL;
             aPath = aURL;
@@ -478,10 +478,10 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
 
         if( !xRet.is() )
             xRet = implLoadGraphicObject( aPath );
-        
+
         if( !xRet.is() )
             xRet = implLoadResource( aPath );
-    
+
         if ( !xRet.is() )
             xRet = implLoadRepositoryImage( aPath );
 
@@ -499,24 +499,24 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
     if( pIStm )
     {
         ::GraphicFilter* pFilter = ::GraphicFilter::GetGraphicFilter();
-        
+
         if( pFilter )
         {
             ::Graphic aVCLGraphic;
-            
-            if( ( pFilter->ImportGraphic( aVCLGraphic, aPath, *pIStm ) == GRFILTER_OK ) && 
+
+            if( ( pFilter->ImportGraphic( aVCLGraphic, aPath, *pIStm ) == GRFILTER_OK ) &&
                 ( aVCLGraphic.GetType() != GRAPHIC_NONE ) )
             {
                 ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic;
-                
+
                 pUnoGraphic->init( aVCLGraphic );
                 xRet = pUnoGraphic;
             }
         }
-    
+
         delete pIStm;
     }
-    
+
     return xRet;
 }
 
@@ -582,7 +582,7 @@ void ImplApplyBitmapResolution( ::Graphic& rGraphic, sal_Int32 nImageResolution,
         sal_Int32 nDestPixelHeight = nSourcePixelHeight;
 
         // check, if the bitmap DPI exceeds the maximum DPI
-        if( fSourceDPIX > fImageResolution ) 
+        if( fSourceDPIX > fImageResolution )
         {
             nDestPixelWidth = static_cast<sal_Int32>(( fSourcePixelWidth * fImageResolution ) / fSourceDPIX);
             if ( !nDestPixelWidth || ( nDestPixelWidth > nSourcePixelWidth ) )
@@ -658,7 +658,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal
             aDummyVDev.EnableOutput( sal_False );
             aDummyVDev.SetMapMode( aNewMapMode );
 
-            for( sal_uInt32 i = 0, nObjCount = aMtf.GetActionCount(); i < nObjCount; i++ )
+            for( size_t i = 0, nObjCount = aMtf.GetActionSize(); i < nObjCount; i++ )
             {
                 MetaAction* pAction = aMtf.GetAction( i );
                 switch( pAction->GetType() )
@@ -733,23 +733,23 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal
 }
 
 // ------------------------------------------------------------------------------
-    
-void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XGraphic >& rxGraphic, const uno::Sequence< beans::PropertyValue >& rMediaProperties ) 
+
+void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XGraphic >& rxGraphic, const uno::Sequence< beans::PropertyValue >& rMediaProperties )
     throw ( io::IOException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
 {
     SvStream* 	pOStm = NULL;
     String		aPath;
     sal_Int32 	i;
-    
+
     for( i = 0; ( i < rMediaProperties.getLength() ) && !pOStm; ++i )
     {
         const ::rtl::OUString	aName( rMediaProperties[ i ].Name );
         const uno::Any 			aValue( rMediaProperties[ i ].Value );
-    
+
         if( COMPARE_EQUAL == aName.compareToAscii( "URL" ) )
         {
             ::rtl::OUString aURL;
-            
+
             aValue >>= aURL;
             pOStm = ::utl::UcbStreamHelper::CreateStream( aURL, STREAM_WRITE | STREAM_TRUNC );
             aPath = aURL;
@@ -757,9 +757,9 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
         else if( COMPARE_EQUAL == aName.compareToAscii( "OutputStream" ) )
         {
             uno::Reference< io::XStream > xOStm;
-            
+
             aValue >>= xOStm;
-            
+
             if( xOStm.is() )
                 pOStm = ::utl::UcbStreamHelper::CreateStream( xOStm );
         }
@@ -769,22 +769,22 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
     {
         uno::Sequence< beans::PropertyValue >	aFilterDataSeq;
         const char*								pFilterShortName = NULL;
-        
+
         for( i = 0; i < rMediaProperties.getLength(); ++i )
         {
             const ::rtl::OUString	aName( rMediaProperties[ i ].Name );
             const uno::Any 			aValue( rMediaProperties[ i ].Value );
-            
+
             if( COMPARE_EQUAL == aName.compareToAscii( "FilterData" ) )
             {
                 aValue >>= aFilterDataSeq;
             }
             else if( COMPARE_EQUAL == aName.compareToAscii( "MimeType" ) )
             {
-                ::rtl::OUString aMimeType;		
-                
+                ::rtl::OUString aMimeType;
+
                 aValue >>= aMimeType;
-    
+
                 if( COMPARE_EQUAL == aMimeType.compareToAscii( MIMETYPE_BMP ) )
                     pFilterShortName = "bmp";
                 else if( COMPARE_EQUAL == aMimeType.compareToAscii( MIMETYPE_EPS ) )
@@ -823,16 +823,16 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
                     pFilterShortName = MIMETYPE_VCLGRAPHIC;
             }
         }
-        
+
         if( pFilterShortName )
         {
             ::GraphicFilter* pFilter = ::GraphicFilter::GetGraphicFilter();
-            
+
             if( pFilter )
             {
                 const uno::Reference< XInterface > 	xIFace( rxGraphic, uno::UNO_QUERY );
                 const ::Graphic* 					pGraphic = ::unographic::Graphic::getImplementation( xIFace );
-            
+
                 if( pGraphic && ( pGraphic->GetType() != GRAPHIC_NONE ) )
                 {
                     ::Graphic aGraphic( *pGraphic );
@@ -846,7 +846,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
                         aMemStrm << aGraphic;
                     else
                     {
-                        pFilter->ExportGraphic( aGraphic, aPath, aMemStrm, 
+                        pFilter->ExportGraphic( aGraphic, aPath, aMemStrm,
                                                 pFilter->GetExportFormatNumberForShortName( ::rtl::OUString::createFromAscii( pFilterShortName ) ),
                                                     ( aFilterDataSeq.getLength() ? &aFilterDataSeq : NULL ) );
                     }
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index caa7da9..cb1cc62 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -423,7 +423,7 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor ) th
                         delete pSrcStm;
 
                         SvMemoryStream	aDstStm( 65535, 65535 );
-                        
+
                         // taking wmf without file header
                         if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, sal_False ) )
                         {
@@ -812,7 +812,7 @@ sal_Bool TransferableHelper::SetBitmap( const Bitmap& rBitmap, const DataFlavor&
 
 sal_Bool TransferableHelper::SetGDIMetaFile( const GDIMetaFile& rMtf, const DataFlavor& )
 {
-    if( rMtf.GetActionCount() )
+    if( rMtf.GetActionSize() )
     {
         SvMemoryStream aMemStm( 65535, 65535 );
 
@@ -1157,11 +1157,11 @@ void TransferableHelper::StartDrag( Window* pWindow, sal_Int8 nDnDSourceActions,
 
         // On Mac OS X we are forced to execute 'startDrag' synchronously
         // contrary to the XDragSource interface specification because
-        // we can receive drag events from the system only in the main 
+        // we can receive drag events from the system only in the main
         // thread
 #if !defined(QUARTZ)
         const sal_uInt32 nRef = Application::ReleaseSolarMutex();
-#endif 
+#endif
 
         try
         {
@@ -1180,7 +1180,7 @@ void TransferableHelper::StartDrag( Window* pWindow, sal_Int8 nDnDSourceActions,
         // See above for the reason of this define
 #if !defined(QUARTZ)
         Application::AcquireSolarMutex( nRef );
-#endif 
+#endif
     }
 }
 
diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx
index 2f5f0a2..fcc60ab 100644
--- a/vcl/inc/vcl/gdimtf.hxx
+++ b/vcl/inc/vcl/gdimtf.hxx
@@ -32,9 +32,9 @@
 #include <vcl/dllapi.h>
 #include <tools/gen.hxx>
 #include <tools/link.hxx>
-#include <tools/list.hxx>
 #include <tools/string.hxx>
 #include <vcl/mapmod.hxx>
+#include <vector>
 
 class OutputDevice;
 class ImpLabelList;
@@ -51,8 +51,8 @@ class Gradient;
 // - GDIMetaFile-Types -
 // ---------------------
 
-#define GDI_METAFILE_END                ((sal_uLong)0xFFFFFFFF)
-#define GDI_METAFILE_LABEL_NOTFOUND     ((sal_uLong)0xFFFFFFFF)
+#define GDI_METAFILE_END                ((size_t)0xFFFFFFFF)
+#define GDI_METAFILE_LABEL_NOTFOUND     ((size_t)0xFFFFFFFF)
 
 #ifndef METAFILE_END
 #define METAFILE_END					GDI_METAFILE_END
@@ -93,9 +93,11 @@ typedef BitmapEx (*BmpExchangeFnc)( const BitmapEx& rBmpEx, const void* pBmpPara
 // - GDIMetaFile -
 // ---------------
 
-class VCL_DLLPUBLIC GDIMetaFile : protected List
+class VCL_DLLPUBLIC GDIMetaFile
 {
 private:
+    ::std::vector< MetaAction* > aList;
+    size_t          nCurrentActionElement;
 
     MapMode         aPrefMapMode;
     Size            aPrefSize;
@@ -134,7 +136,7 @@ private:
                                                       const OutputDevice&   rMapDev,
                                                       const PolyPolygon&    rPolyPoly,
                                                       const Gradient&	  	rGrad 		);
-    SAL_DLLPRIVATE bool			   ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, Size rDestSize );
+    SAL_DLLPRIVATE bool			 ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, Size rDestSize );
     SAL_DLLPRIVATE void          ImplDelegate2PluggableRenderer( const MetaCommentAction* pAct, OutputDevice* pOut );
 
 
@@ -148,9 +150,7 @@ public:
                     GDIMetaFile( const GDIMetaFile& rMtf );
     virtual			~GDIMetaFile();
 
-    using List::operator==;
-    using List::operator!=;
-    GDIMetaFile&    operator=( const GDIMetaFile& rMtf );
+    GDIMetaFile&        operator=( const GDIMetaFile& rMtf );
     sal_Bool			operator==( const GDIMetaFile& rMtf ) const;
     sal_Bool			operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); }
 
@@ -186,10 +186,10 @@ public:
     void            Record( OutputDevice* pOutDev );
     sal_Bool            IsRecord() const { return bRecord; }
 
-    void            Play( GDIMetaFile& rMtf, sal_uLong nPos = GDI_METAFILE_END );
-    void            Play( OutputDevice* pOutDev, sal_uLong nPos = GDI_METAFILE_END );
+    void            Play( GDIMetaFile& rMtf, size_t nPos = GDI_METAFILE_END );
+    void            Play( OutputDevice* pOutDev, size_t nPos = GDI_METAFILE_END );
     void            Play( OutputDevice* pOutDev, const Point& rPos,
-                          const Size& rSize, sal_uLong nPos = GDI_METAFILE_END );
+                          const Size& rSize, size_t nPos = GDI_METAFILE_END );
 
     void            Pause( sal_Bool bPause );
     sal_Bool            IsPause() const { return bPause; }
@@ -198,22 +198,25 @@ public:
 
     void            WindStart();
     void            WindEnd();
-    void            Wind( sal_uLong nAction );
+    void            Wind( size_t nAction );
     void            WindPrev();
     void            WindNext();
 
-    sal_uLong           GetActionCount() const { return Count(); }
+    size_t          GetActionSize() const;
+    size_t          GetActionPos( const String& rLabel );
+
     void            AddAction( MetaAction* pAction );
-    void            AddAction( MetaAction* pAction, sal_uLong nPos );
-    void 			RemoveAction( sal_uLong nPos );
-    MetaAction*     CopyAction( sal_uLong nPos ) const;
-    MetaAction*     GetCurAction() const { return (MetaAction*) GetCurObject(); }
-    MetaAction*     GetAction( sal_uLong nAction ) const { return (MetaAction*) GetObject( nAction ); }
-    MetaAction*     FirstAction() {	return (MetaAction*) First(); }
-    MetaAction*     NextAction() { 	return (MetaAction*) Next(); }
-    MetaAction*     ReplaceAction( MetaAction* pAction, sal_uLong nAction ) { return (MetaAction*) Replace( pAction, nAction ); }
-
-    sal_uLong           GetActionPos( const String& rLabel );
+    void            AddAction( MetaAction* pAction, size_t nPos );
+    void            RemoveAction( size_t nPos );
+    void            push_back( MetaAction* pAction );
+
+    MetaAction*     FirstAction();
+    MetaAction*     NextAction();
+    MetaAction*     GetAction( size_t nAction ) const;
+    MetaAction*     CopyAction( size_t nPos ) const;
+    MetaAction*     GetCurAction() const { return GetAction( nCurrentActionElement ); }
+    MetaAction*     ReplaceAction( MetaAction* pAction, sal_uLong nAction );
+
     sal_Bool            InsertLabel( const String& rLabel, sal_uLong nActionPos );
     void            RemoveLabel( const String& rLabel );
     void            RenameLabel( const String& rLabel, const String& rNewLabel );
diff --git a/vcl/inc/vcl/metaact.hxx b/vcl/inc/vcl/metaact.hxx
index acd2a41..7937592 100644
--- a/vcl/inc/vcl/metaact.hxx
+++ b/vcl/inc/vcl/metaact.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index a20fd2e..4214721 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -76,7 +76,7 @@ sal_uLong GraphicConverter::ImplConvert( sal_uLong nInFormat, void* pInBuffer, s
                 SvMemoryStream aOStm( 64535, 64535 );
 
                 mpConvertData = new ConvertData( aGraphic, aOStm, nOutFormat );
-                
+
                 if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
                 {
                     nRetBufSize = aOStm.Seek( STREAM_SEEK_TO_END );
@@ -94,7 +94,7 @@ sal_uLong GraphicConverter::ImplConvert( sal_uLong nInFormat, void* pInBuffer, s
 
             aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, sal_False, nInBufSize );
             mpConvertData = new ConvertData( Graphic(), aIStm, nInFormat );
-                
+
             if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
             {
                 SvMemoryStream	aOStm( 645535, 64535 );
@@ -140,7 +140,7 @@ sal_uLong GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, sal_uLon
     if( pCvt && pCvt->GetFilterHdl().IsSet() )
     {
         ConvertData	aData( rGraphic, rIStm, nFormat );
-        
+
         if( pCvt->GetFilterHdl().Call( &aData ) )
         {
             rGraphic = aData.maGraphic;
@@ -149,7 +149,7 @@ sal_uLong GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, sal_uLon
         else if( rIStm.GetError() )
             nRet = rIStm.GetError();
     }
-    
+
     return nRet;
 }
 
@@ -163,13 +163,13 @@ sal_uLong GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, sa
     if( pCvt && pCvt->GetFilterHdl().IsSet() )
     {
         ConvertData	aData( rGraphic, rOStm, nFormat );
-        
+
         if( pCvt->GetFilterHdl().Call( &aData ) )
             nRet = ERRCODE_NONE;
         else if( rOStm.GetError() )
             nRet = rOStm.GetError();
     }
-    
+
     return nRet;
 }
 
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index e1cd8be..cc5e891 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -337,7 +337,7 @@ void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, String& rStri
         sal_uInt16	nType;
         sal_uInt32	nActionSize;
         xub_StrLen  nStringLen;
-        
+
         rIStm.Seek( nStrmPos );
         rIStm	>> nType
                 >> nActionSize;
@@ -401,7 +401,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol
         if((bOnlyWhenCurve && nAllFlagCount) || (!bOnlyWhenCurve && nAllPointCount))
         {
             rOStm << (sal_Int16) GDI_EXTENDEDPOLYGON_ACTION;
-            
+
             const sal_Int32 nActionSize(
                 4 +							// Action size
                 2 +							// PolygonCount
@@ -528,7 +528,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
 
     // check header-magic and version
     if( rIStm.GetError()
-        || ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 ) 
+        || ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 )
         || ( nVersion != 200 ) )
     {
         rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
@@ -562,12 +562,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
 
         rMtf.SetPrefSize( aPrefSz );
         rMtf.SetPrefMapMode( aMapMode );
-        sal_uInt32 nLastPolygonAction(0);
+        size_t nLastPolygonAction(0);
 
         for( sal_Int32 i = 0L; i < nActions; i++ )
         {
             rIStm >> nType;
-            sal_Int32 nActBegin = rIStm.Tell();	
+            sal_Int32 nActBegin = rIStm.Tell();
             rIStm >> nActionSize;
 
             DBG_ASSERT( ( nType <= 33 ) || ( nType >= 1024 ), "Unknown GDIMetaAction while converting!" );
@@ -631,7 +631,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                     ImplReadExtendedPolyPolygonAction(rIStm, aInputPolyPolygon);
 
                     // now check if it can be set somewhere
-                    if(nLastPolygonAction < rMtf.GetActionCount())
+                    if(nLastPolygonAction < rMtf.GetActionSize())
                     {
                         MetaPolyLineAction* pPolyLineAction = dynamic_cast< MetaPolyLineAction* >(rMtf.GetAction(nLastPolygonAction));
 
@@ -644,7 +644,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                             {
                                 rMtf.ReplaceAction(
                                     new MetaPolyLineAction(
-                                        aInputPolyPolygon.GetObject(0), 
+                                        aInputPolyPolygon.GetObject(0),
                                         pPolyLineAction->GetLineInfo()),
                                     nLastPolygonAction);
                                 pPolyLineAction->Delete();
@@ -779,7 +779,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                 case( GDI_POLYLINE_ACTION ):
                 {
                     ImplReadPoly( rIStm, aActionPoly );
-                    nLastPolygonAction = rMtf.GetActionCount();
+                    nLastPolygonAction = rMtf.GetActionSize();
 
                     if( bFatLine )
                         rMtf.AddAction( new MetaPolyLineAction( aActionPoly, aLineInfo ) );
@@ -802,7 +802,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                     }
                     else
                     {
-                        nLastPolygonAction = rMtf.GetActionCount();
+                        nLastPolygonAction = rMtf.GetActionSize();
                         rMtf.AddAction( new MetaPolygonAction( aActionPoly ) );
                     }
                 }
@@ -826,7 +826,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                     }
                     else
                     {
-                        nLastPolygonAction = rMtf.GetActionCount();
+                        nLastPolygonAction = rMtf.GetActionSize();
                         rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) );
                     }
                 }
@@ -868,7 +868,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                     eActualCharSet = aFont.GetCharSet();
                     if ( eActualCharSet == RTL_TEXTENCODING_DONTKNOW )
                         eActualCharSet = gsl_getSystemTextEncoding();
-                    
+
                     rMtf.AddAction( new MetaFontAction( aFont ) );
                     rMtf.AddAction( new MetaTextAlignAction( aFont.GetAlign() ) );
                     rMtf.AddAction( new MetaTextColorAction( aFont.GetColor() ) );
@@ -883,7 +883,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                 {
                     ByteString	aByteStr;
                     sal_Int32		nIndex, nLen;
-            
+
                     rIStm >> aPt >> nIndex >> nLen >> nTmp;
                     if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
                                         {
@@ -926,7 +926,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
                                     sal_Int32* pTmpAry = new sal_Int32[nStrLen];
 
                                     aFontVDev.GetTextArray( aStr, pTmpAry, (sal_uInt16) nIndex, (sal_uInt16) nLen );
-                                    
+
                                     // now, the difference between the
                                     // last and the second last DX array
                                     // is the advancement for the last
@@ -1425,7 +1425,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
                                       rtl_TextEncoding& rActualCharSet )
 {
     sal_uLong nCount = 0;
-    for( sal_uLong i = 0, nActionCount = rMtf.GetActionCount(); i < nActionCount; i++ )
+    for( size_t i = 0, nActionCount = rMtf.GetActionSize(); i < nActionCount; i++ )
     {
         const MetaAction* pAction = rMtf.GetAction( i );
 
@@ -1496,12 +1496,12 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
                 {
                     ImplWritePopAction( rOStm );
                     nCount += 3;
-                    
+
                     if(bLineJoin)
                     {
                         nCount += 1;
                     }
-                    
+
                     if(bLineDashDot)
                     {
                         nCount += 1;
@@ -1650,13 +1650,13 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
                 {
                     ImplWritePopAction( rOStm );
                     nCount += 3;
-                    
+
                     if(bLineJoin)
                     {
                         nCount += 1;
                     }
                 }
-                    
+
                 if(bLineDashDot)
                 {
                     nCount += 1;
@@ -1682,7 +1682,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
                     rOStm << aSimplePoly[ n ];
 
                 nCount++;
-                
+
                 const PolyPolygon aPolyPolygon(pAct->GetPolygon());
                 if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon, true))
                 {
@@ -1696,7 +1696,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
                 MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction;
                 ImplWritePolyPolyAction( rOStm, pAct->GetPolyPolygon() );
                 nCount++;
-                
+
                 if(ImplWriteExtendedPolyPolygonAction(rOStm, pAct->GetPolyPolygon(), true))
                 {
                     nCount++;
@@ -2379,8 +2379,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
                 rOStm.SeekRel( 4 );
 
                 // write data
-                rOStm << rStartPt << nWidth << 
-                    static_cast<sal_uInt32>(eStrikeout) << 
+                rOStm << rStartPt << nWidth <<
+                    static_cast<sal_uInt32>(eStrikeout) <<
                     static_cast<sal_uInt32>(eUnderline);
                 rOStm << (sal_Int32) 0; // number of actions that follow this comment
 
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 5c787bb..37638d5 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -31,6 +31,7 @@
 #include <rtl/crc.h>
 #include <tools/stream.hxx>
 #include <tools/vcompat.hxx>
+#include <tools/list.hxx>
 #include <vcl/metaact.hxx>
 #include <vcl/salbtype.hxx>
 #include <vcl/outdev.hxx>
@@ -209,7 +210,6 @@ sal_uLong ImpLabelList::ImplGetLabelPos( const String& rLabelName )
 // ---------------
 
 GDIMetaFile::GDIMetaFile() :
-    List		( 0x3EFF, 64, 64 ),
     aPrefSize	( 1, 1 ),
     pPrev		( NULL ),
     pNext		( NULL ),
@@ -224,7 +224,6 @@ GDIMetaFile::GDIMetaFile() :
 // ------------------------------------------------------------------------
 
 GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
-    List			( rMtf ),
     aPrefMapMode	( rMtf.aPrefMapMode ),
     aPrefSize		( rMtf.aPrefSize ),
     aHookHdlLink	( rMtf.aHookHdlLink ),
@@ -236,8 +235,11 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
     bUseCanvas 	    ( rMtf.bUseCanvas )
 {
     // RefCount der MetaActions erhoehen
-    for( void* pAct = First(); pAct; pAct = Next() )
-        ( (MetaAction*) pAct )->Duplicate();
+    for( size_t i = 0, n = rMtf.GetActionSize(); i < n; ++i )
+    {
+        rMtf.GetAction( i )->Duplicate();
+        aList.push_back( rMtf.GetAction( i ) );
+    }
 
     if( rMtf.pLabelList )
         pLabelList = new ImpLabelList( *rMtf.pLabelList );
@@ -262,17 +264,62 @@ GDIMetaFile::~GDIMetaFile()
 
 // ------------------------------------------------------------------------
 
+size_t GDIMetaFile::GetActionSize() const
+{
+    return aList.size();
+}
+
+// ------------------------------------------------------------------------
+
+MetaAction* GDIMetaFile::GetAction( size_t nAction ) const
+{
+    return (nAction < aList.size()) ? aList[ nAction ] : NULL;
+}
+
+// ------------------------------------------------------------------------
+
+MetaAction* GDIMetaFile::FirstAction()
+{
+    nCurrentActionElement = 0;
+    return aList.empty() ? NULL : aList[ 0 ];
+}
+
+// ------------------------------------------------------------------------
+
+MetaAction* GDIMetaFile::NextAction()
+{
+    return ( nCurrentActionElement + 1 < aList.size() ) ? aList[ ++nCurrentActionElement ] : NULL;
+}
+
+// ------------------------------------------------------------------------
+
+MetaAction* GDIMetaFile::ReplaceAction( MetaAction* pAction, size_t nAction )
+{
+    if ( nAction < aList.size() )
+    {
+        ::std::vector< MetaAction* >::iterator it = aList.begin();
+        ::std::advance( it, nAction );
+        (*it)->Delete();
+        *it = pAction;
+    }
+    return pAction;
+}
+
+
+// ------------------------------------------------------------------------
+
 GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
 {
     if( this != &rMtf )
     {
         Clear();
 
-        List::operator=( rMtf );
-
         // RefCount der MetaActions erhoehen
-        for( void* pAct = First(); pAct; pAct = Next() )
-            ( (MetaAction*) pAct )->Duplicate();
+        for( size_t i = 0, n = rMtf.GetActionSize(); i < n; ++i )
+        {
+            rMtf.GetAction( i )->Duplicate();
+            aList.push_back( rMtf.GetAction( i ) );
+        }
 
         if( rMtf.pLabelList )
             pLabelList = new ImpLabelList( *rMtf.pLabelList );
@@ -305,20 +352,20 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
 
 sal_Bool GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
 {
-    const sal_uLong nObjCount = Count();
-    sal_Bool		bRet = sal_False;
+    const size_t    nObjCount = aList.size();
+    sal_Bool        bRet = sal_False;
 
     if( this == &rMtf )
         bRet = sal_True;
-    else if( rMtf.GetActionCount() == nObjCount &&
-             rMtf.GetPrefSize() == aPrefSize &&
+    else if( rMtf.GetActionSize()  == nObjCount &&
+             rMtf.GetPrefSize()    == aPrefSize &&
              rMtf.GetPrefMapMode() == aPrefMapMode )
     {
         bRet = sal_True;
 
-        for( sal_uLong n = 0UL; n < nObjCount; n++ )
+        for( size_t n = 0; n < nObjCount; n++ )
         {
-            if( GetObject( n ) != rMtf.GetObject( n ) )
+            if( aList[ n ] != rMtf.GetAction( n ) )
             {
                 bRet = sal_False;
                 break;
@@ -333,20 +380,20 @@ sal_Bool GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
 
 sal_Bool GDIMetaFile::IsEqual( const GDIMetaFile& rMtf ) const
 {
-    const sal_uLong nObjCount = Count();
+    const size_t nObjCount = aList.size();
     sal_Bool		bRet = sal_False;
 
     if( this == &rMtf )
         bRet = sal_True;
-    else if( rMtf.GetActionCount() == nObjCount &&
-             rMtf.GetPrefSize() == aPrefSize &&
+    else if( rMtf.GetActionSize()  == nObjCount &&
+             rMtf.GetPrefSize()    == aPrefSize &&
              rMtf.GetPrefMapMode() == aPrefMapMode )
     {
         bRet = sal_True;
 
-        for( sal_uLong n = 0UL; n < nObjCount; n++ )
+        for( size_t n = 0; n < nObjCount; n++ )
         {
-            if(!((MetaAction*)GetObject( n ))->IsEqual(*((MetaAction*)rMtf.GetObject( n ))))
+            if( !aList[ n ]->IsEqual( *(rMtf.GetAction( n )) ) )
             {
                 bRet = sal_False;
                 break;
@@ -364,10 +411,9 @@ void GDIMetaFile::Clear()
     if( bRecord )
         Stop();
 
-    for( void* pAct = First(); pAct; pAct = Next() )
-        ( (MetaAction*) pAct )->Delete();
-
-    List::Clear();
+    for( size_t i = 0, n = aList.size(); i < n; ++i )
+        aList[ i ]->Delete();
+    aList.clear();
 
     delete pLabelList;
     pLabelList = NULL;
@@ -422,7 +468,7 @@ void GDIMetaFile::Record( OutputDevice* pOut )
     if( bRecord )
         Stop();
 
-    Last();
+    nCurrentActionElement = aList.empty() ? 0 : (aList.size() - 1);
     pOutDev = pOut;
     bRecord = sal_True;
     Linker( pOut, sal_True );
@@ -430,19 +476,19 @@ void GDIMetaFile::Record( OutputDevice* pOut )
 
 // ------------------------------------------------------------------------
 
-void GDIMetaFile::Play( GDIMetaFile& rMtf, sal_uLong nPos )
+void GDIMetaFile::Play( GDIMetaFile& rMtf, size_t nPos )
 {
     if ( !bRecord && !rMtf.bRecord )
     {
         MetaAction* pAction = GetCurAction();
-        const sal_uLong nObjCount = Count();
+        const size_t nObjCount = aList.size();
 
         rMtf.UseCanvas( rMtf.GetUseCanvas() || bUseCanvas );
 
         if( nPos > nObjCount )
             nPos = nObjCount;
 
-        for( sal_uLong nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
+        for( size_t nCurPos = nCurrentActionElement; nCurPos < nPos; nCurPos++ )
         {
             if( !Hook() )
             {
@@ -450,20 +496,21 @@ void GDIMetaFile::Play( GDIMetaFile& rMtf, sal_uLong nPos )
                 rMtf.AddAction( pAction );
             }
 
-            pAction = (MetaAction*) Next();
+            pAction = NextAction();
         }
     }
 }
 
 // ------------------------------------------------------------------------
 
-void GDIMetaFile::Play( OutputDevice* pOut, sal_uLong nPos )
+void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
 {
     if( !bRecord )
     {
         MetaAction* pAction = GetCurAction();
-        const sal_uLong nObjCount = Count();
-        sal_uLong		i  = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
+        const size_t nObjCount = aList.size();
+        size_t  i  = 0;
+        size_t  nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
 
         if( nPos > nObjCount )
             nPos = nObjCount;
@@ -476,7 +523,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, sal_uLong nPos )
         pOut->SetLayoutMode( 0 );
         pOut->SetDigitLanguage( 0 );
 
-        for( sal_uLong nCurPos = GetCurPos(); nCurPos < nPos; nCurPos++ )
+        for( size_t nCurPos = nCurrentActionElement; nCurPos < nPos; nCurPos++ )
         {
             if( !Hook() )
             {
@@ -496,7 +543,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, sal_uLong nPos )
                     ( (Window*) pOut )->Flush(), i = 0;
             }
 
-            pAction = (MetaAction*) Next();
+            pAction = NextAction();
         }
 
         pOut->Pop();
@@ -680,7 +727,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
 
         aScaleX *= aDrawMap.GetScaleX(); aDrawMap.SetScaleX( aScaleX );
         aScaleY *= aDrawMap.GetScaleY(); aDrawMap.SetScaleY( aScaleY );
-        
+
         // #i47260# Convert logical output position to offset within
         // the metafile's mapmode. Therefore, disable pixel offset on
         // outdev, it's inverse mnOutOffLogicX/Y is calculated for a
@@ -758,7 +805,7 @@ void GDIMetaFile::Stop()
 void GDIMetaFile::WindStart()
 {
     if( !bRecord )
-        First();
+        nCurrentActionElement = 0;
 }
 
 // ------------------------------------------------------------------------
@@ -766,15 +813,15 @@ void GDIMetaFile::WindStart()
 void GDIMetaFile::WindEnd()
 {
     if( !bRecord )
-        Last();
+        nCurrentActionElement = aList.empty() ? 0 : (aList.size() - 1);
 }
 
 // ------------------------------------------------------------------------
 
-void GDIMetaFile::Wind( sal_uLong nActionPos )
+void GDIMetaFile::Wind( size_t nActionPos )
 {
     if( !bRecord )
-        Seek( nActionPos );
+        nCurrentActionElement = nActionPos < aList.size() ? nActionPos : nCurrentActionElement;
 }
 
 // ------------------------------------------------------------------------
@@ -782,7 +829,7 @@ void GDIMetaFile::Wind( sal_uLong nActionPos )
 void GDIMetaFile::WindPrev()
 {
     if( !bRecord )
-        Prev();
+        nCurrentActionElement = ( nCurrentActionElement > 0 ) ? --nCurrentActionElement : 0;
 }
 
 // ------------------------------------------------------------------------
@@ -790,14 +837,15 @@ void GDIMetaFile::WindPrev()
 void GDIMetaFile::WindNext()
 {
     if( !bRecord )
-        Next();
+        if ( nCurrentActionElement + 1 < aList.size() )
+            ++nCurrentActionElement;
 }
 
 // ------------------------------------------------------------------------
 
 void GDIMetaFile::AddAction( MetaAction* pAction )
 {
-    Insert( pAction, LIST_APPEND );
+    aList.push_back( pAction );
 
     if( pPrev )
     {
@@ -808,9 +856,18 @@ void GDIMetaFile::AddAction( MetaAction* pAction )
 
 // ------------------------------------------------------------------------
 
-void GDIMetaFile::AddAction( MetaAction* pAction, sal_uLong nPos )
+void GDIMetaFile::AddAction( MetaAction* pAction, size_t nPos )
 {
-    Insert( pAction, nPos );
+    if ( nPos < aList.size() )
+    {
+        ::std::vector< MetaAction* >::iterator it = aList.begin();
+        ::std::advance( it, nPos );
+        aList.insert( it, pAction );
+    }
+    else
+    {
+        aList.push_back( pAction );
+    }
 
     if( pPrev )
     {
@@ -821,10 +878,24 @@ void GDIMetaFile::AddAction( MetaAction* pAction, sal_uLong nPos )
 
 // ------------------------------------------------------------------------
 
+void GDIMetaFile::push_back( MetaAction* pAction )
+{
+    aList.push_back( pAction );
+}
+
+// ------------------------------------------------------------------------
+
 // @since #110496#
-void GDIMetaFile::RemoveAction( sal_uLong nPos )
+void GDIMetaFile::RemoveAction( size_t nPos )
 {
-    Remove( nPos );
+    if ( nPos < aList.size() )
+    {
+        ::std::vector< MetaAction* >::iterator it = aList.begin();
+        ::std::advance( it, nPos );
+        (*it)->Delete();
+        aList.erase( it );
+
+    }
 
     if( pPrev )
         pPrev->RemoveAction( nPos );
@@ -832,9 +903,9 @@ void GDIMetaFile::RemoveAction( sal_uLong nPos )
 
 // ------------------------------------------------------------------------
 
-MetaAction* GDIMetaFile::CopyAction( sal_uLong nPos ) const
+MetaAction* GDIMetaFile::CopyAction( size_t nPos ) const
 {
-    return ( (MetaAction*) GetObject( nPos ) )->Clone();
+    return ( nPos < aList.size() ) ? aList[ nPos ]->Clone() : NULL;
 }
 
 // ------------------------------------------------------------------------
@@ -997,21 +1068,21 @@ void GDIMetaFile::Move( long nX, long nY )
 
     aMapVDev.EnableOutput( sal_False );
     aMapVDev.SetMapMode( GetPrefMapMode() );
-    
-    for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
+
+    for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() )
     {
         const long  nType = pAct->GetType();
         MetaAction* pModAct;
 
         if( pAct->GetRefCount() > 1 )
         {
-            Replace( pModAct = pAct->Clone(), GetCurPos() );
+            aList[ nCurrentActionElement ] = pModAct = pAct->Clone();
             pAct->Delete();
         }
         else
             pModAct = pAct;
 
-        if( ( META_MAPMODE_ACTION == nType ) || 
+        if( ( META_MAPMODE_ACTION == nType ) ||
             ( META_PUSH_ACTION == nType ) ||
             ( META_POP_ACTION == nType ) )
         {
@@ -1032,21 +1103,21 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
     aMapVDev.EnableOutput( sal_False );
     aMapVDev.SetReferenceDevice( nDPIX, nDPIY );
     aMapVDev.SetMapMode( GetPrefMapMode() );
-    
-    for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
+
+    for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() )
     {
         const long  nType = pAct->GetType();
         MetaAction* pModAct;
 
         if( pAct->GetRefCount() > 1 )
         {
-            Replace( pModAct = pAct->Clone(), GetCurPos() );
+            aList[ nCurrentActionElement ] = pModAct = pAct->Clone();
             pAct->Delete();
         }
         else
             pModAct = pAct;
 
-        if( ( META_MAPMODE_ACTION == nType ) || 
+        if( ( META_MAPMODE_ACTION == nType ) ||
             ( META_PUSH_ACTION == nType ) ||
             ( META_POP_ACTION == nType ) )
         {
@@ -1070,13 +1141,13 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
 
 void GDIMetaFile::Scale( double fScaleX, double fScaleY )
 {
-    for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
+    for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() )
     {
         MetaAction* pModAct;
 
         if( pAct->GetRefCount() > 1 )
         {
-            Replace( pModAct = pAct->Clone(), GetCurPos() );
+            aList[ nCurrentActionElement ] = pModAct = pAct->Clone();
             pAct->Delete();
         }
         else
@@ -1106,11 +1177,11 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
     aMapVDev.EnableOutput( sal_False );
     aMapVDev.SetMapMode( GetPrefMapMode() );
 
-    for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
+    for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() )
     {
         const long  nType = pAct->GetType();
 
-        if( ( META_MAPMODE_ACTION == nType ) || 
+        if( ( META_MAPMODE_ACTION == nType ) ||
             ( META_PUSH_ACTION == nType ) ||
             ( META_POP_ACTION == nType ) )
         {
@@ -1124,7 +1195,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
             if( pOldAct->IsClipping() )
                 aNewReg.Intersect( pOldAct->GetRegion() );
             MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, sal_True );
-            Replace( pNewAct, GetCurPos() );
+            aList[ nCurrentActionElement ] = pNewAct;
             pOldAct->Delete();
         }
     }
@@ -1144,7 +1215,7 @@ Point GDIMetaFile::ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt
 
 // ------------------------------------------------------------------------
 
-Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt, 
+Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
                                             const Size& rOffset, double fSin, double fCos )
 {
     Polygon aRet( rPoly );
@@ -1157,7 +1228,7 @@ Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& r
 
 // ------------------------------------------------------------------------
 
-PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly, const Point& rRotatePt, 
+PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly, const Point& rRotatePt,
                                                     const Size& rOffset, double fSin, double fCos )
 {
     PolyPolygon aRet( rPolyPoly );
@@ -1170,7 +1241,7 @@ PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly
 
 // ------------------------------------------------------------------------
 
-void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& 		  rMtf, 
+void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& 		  rMtf,
                                      const OutputDevice&  rMapDev,
                                      const PolyPolygon&   rPolyPoly,
                                      const Gradient&	  rGrad 	)
@@ -1185,10 +1256,10 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& 		  rMtf,
     aVDev.DrawGradient( rPolyPoly, rGrad );
     aGradMtf.Stop();
 
-    int i, nAct( aGradMtf.GetActionCount() );
-    for( i=0; i<nAct; ++i )
+    size_t i, nAct( aGradMtf.GetActionSize() );
+    for( i=0; i < nAct; ++i )
     {
-        MetaAction* pMetaAct = aGradMtf.GetAction(i);
+        MetaAction* pMetaAct = aGradMtf.GetAction( i );
         pMetaAct->Duplicate();
         rMtf.AddAction( pMetaAct );
     }
@@ -1217,14 +1288,14 @@ void GDIMetaFile::Rotate( long nAngle10 )
         aMapVDev.SetMapMode( GetPrefMapMode() );
 
         const Rectangle aNewBound( aPoly.GetBoundRect() );
-    
+
         const Point aOrigin( GetPrefMapMode().GetOrigin().X(), GetPrefMapMode().GetOrigin().Y() );
         const Size  aOffset( -aNewBound.Left(), -aNewBound.Top() );
-   
+
         Point     aRotAnchor( aOrigin );
         Size      aRotOffset( aOffset );
 
-        for( MetaAction* pAction = (MetaAction*) First(); pAction; pAction = (MetaAction*) Next() )
+        for( MetaAction* pAction = FirstAction(); pAction; pAction = NextAction() )
         {
             const sal_uInt16 nActionType = pAction->GetType();
 
@@ -1233,8 +1304,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
                 case( META_PIXEL_ACTION ):
                 {
                     MetaPixelAction* pAct = (MetaPixelAction*) pAction;
-                    aMtf.AddAction( new MetaPixelAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ), 
-                                                                              pAct->GetColor() ) ); 
+                    aMtf.AddAction( new MetaPixelAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
+                                                                              pAct->GetColor() ) );
                 }
                 break;
 
@@ -1248,60 +1319,60 @@ void GDIMetaFile::Rotate( long nAngle10 )
                 case( META_LINE_ACTION ):
                 {
                     MetaLineAction* pAct = (MetaLineAction*) pAction;
-                    aMtf.AddAction( new MetaLineAction( ImplGetRotatedPoint( pAct->GetStartPoint(), aRotAnchor, aRotOffset, fSin, fCos ), 
+                    aMtf.AddAction( new MetaLineAction( ImplGetRotatedPoint( pAct->GetStartPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
                                                         ImplGetRotatedPoint( pAct->GetEndPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
                                                         pAct->GetLineInfo() ) );
                 }
                 break;
-            
+
                 case( META_RECT_ACTION ):
                 {
                     MetaRectAction* pAct = (MetaRectAction*) pAction;
-                    aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) ); 
+                    aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
                 }
                 break;
-            
+
                 case( META_ROUNDRECT_ACTION ):
                 {
                     MetaRoundRectAction*    pAct = (MetaRoundRectAction*) pAction;
                     const Polygon           aRoundRectPoly( pAct->GetRect(), pAct->GetHorzRound(), pAct->GetVertRound() );
-                
-                    aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aRoundRectPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) ); 
+
+                    aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aRoundRectPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
                 }
                 break;
-            
+
                 case( META_ELLIPSE_ACTION ):
                 {
                     MetaEllipseAction*      pAct = (MetaEllipseAction*) pAction;
                     const Polygon           aEllipsePoly( pAct->GetRect().Center(), pAct->GetRect().GetWidth() >> 1, pAct->GetRect().GetHeight() >> 1 );
-                
-                    aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aEllipsePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) ); 
+
+                    aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aEllipsePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
                 }
                 break;
-            
+
                 case( META_ARC_ACTION ):
                 {
                     MetaArcAction*  pAct = (MetaArcAction*) pAction;
                     const Polygon   aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_ARC );
-                
+
                     aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aArcPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
                 }
                 break;
-            
+
                 case( META_PIE_ACTION ):
                 {
                     MetaPieAction*  pAct = (MetaPieAction*) pAction;
                     const Polygon   aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_PIE );
-                
+
                     aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aPiePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
                 }
                 break;
-            
+
                 case( META_CHORD_ACTION	):
                 {
                     MetaChordAction*    pAct = (MetaChordAction*) pAction;
                     const Polygon       aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_CHORD );
-                
+
                     aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aChordPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
                 }
                 break;
@@ -1342,7 +1413,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
                                                                                   pAct->GetText(), pAct->GetDXArray(), pAct->GetIndex(), pAct->GetLen() ) );
                 }
                 break;
-            
+
                 case( META_STRETCHTEXT_ACTION ):
                 {
                     MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
@@ -1350,7 +1421,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
                                                                                     pAct->GetWidth(), pAct->GetText(), pAct->GetIndex(), pAct->GetLen() ) );
                 }
                 break;
-            
+
                 case( META_TEXTLINE_ACTION ):
                 {
                     MetaTextLineAction* pAct = (MetaTextLineAction*) pAction;
@@ -1366,8 +1437,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
                     Rectangle           aBmpRect( aBmpPoly.GetBoundRect() );
                     BitmapEx            aBmpEx( pAct->GetBitmap() );
 
-                    aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );				
-                    aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), 
+                    aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+                    aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(),
                                                               aBmpEx ) );
                 }
                 break;
@@ -1381,7 +1452,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
 
                     aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
                     aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
-                    
+
                     aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
                 }
                 break;
@@ -1393,8 +1464,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
                     Rectangle               aBmpRect( aBmpPoly.GetBoundRect() );
                     BitmapEx                aBmpEx( pAct->GetBitmapEx() );
 
-                    aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );				
-                    
+                    aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+
                     aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
                 }
                 break;
@@ -1408,7 +1479,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
 
                     aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
                     aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
-                    
+
                     aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
                 }
                 break;
@@ -1417,7 +1488,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
                 {
                     MetaGradientAction* pAct = (MetaGradientAction*) pAction;
 
-                    ImplAddGradientEx( aMtf, aMapVDev, 
+                    ImplAddGradientEx( aMtf, aMapVDev,
                                        ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ),
                                        pAct->GetGradient() );
                 }
@@ -1438,18 +1509,18 @@ void GDIMetaFile::Rotate( long nAngle10 )
                     if( pCommentAct->GetComment().Equals( "XGRAD_SEQ_BEGIN" ) )
                     {
                         int nBeginComments( 1 );
-                        pAction = (MetaAction*) Next();
-                        
+                        pAction = NextAction();
+
                         // skip everything, except gradientex action
                         while( pAction )
                         {
                             const sal_uInt16 nType = pAction->GetType();
-                            
+
                             if( META_GRADIENTEX_ACTION == nType )
                             {
                                 // Add rotated gradientex
                                 MetaGradientExAction* pAct = (MetaGradientExAction*) pAction;
-                                ImplAddGradientEx( aMtf, aMapVDev, 
+                                ImplAddGradientEx( aMtf, aMapVDev,
                                                    ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
                                                    pAct->GetGradient() );
                             }
@@ -1473,7 +1544,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
 
                             }
 
-                            pAction = (MetaAction*) Next();
+                            pAction =NextAction();
                         }
                     }
                     else
@@ -1526,7 +1597,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
                     Hatch				aHatch( pAct->GetHatch() );
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list