[Libreoffice-commits] .: drawinglayer/source sfx2/source svx/source

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


 drawinglayer/source/primitive2d/epsprimitive2d.cxx      |    4 
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx |  218 ++++++++--------
 sfx2/source/appl/fileobj.cxx                            |    4 
 svx/source/dialog/_bmpmask.cxx                          |   14 -
 svx/source/svdraw/svdfmtf.cxx                           |   28 +-
 svx/source/svdraw/svdxcgv.cxx                           |   32 +-
 svx/source/xml/xmlgrhlp.cxx                             |    4 
 7 files changed, 152 insertions(+), 152 deletions(-)

New commits:
commit a92abb915ad3c1ac08ac8e39475ab20d8bd67c07
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue May 10 05:56:57 2011 -0700

    GDIMetaFile cleanup
    
    Plus trailing whitespace cleanup.

diff --git a/drawinglayer/source/primitive2d/epsprimitive2d.cxx b/drawinglayer/source/primitive2d/epsprimitive2d.cxx
index eba693d..fbd0225 100644
--- a/drawinglayer/source/primitive2d/epsprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/epsprimitive2d.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
@@ -44,7 +44,7 @@ namespace drawinglayer
             Primitive2DSequence xRetval;
             const GDIMetaFile& rSubstituteContent = getMetaFile();
 
-            if(rSubstituteContent.GetActionCount())
+            if( rSubstituteContent.GetActionSize() )
             {
                 // the default decomposition will use the Metafile replacement visualisation.
                 // To really use the Eps data, a renderer has to know and interpret this primitive
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index c1826a0..0d97702 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.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
@@ -156,7 +156,7 @@ namespace
         void setLineColor(const basegfx::BColor& rNew) { if(rNew != maLineColor) maLineColor = rNew; }
         bool getLineColorActive() const { return mbLineColor; }
         void setLineColorActive(bool bNew) { if(bNew != mbLineColor) mbLineColor = bNew; }
-        
+
         const basegfx::BColor& getFillColor() const { return maFillColor; }
         void setFillColor(const basegfx::BColor& rNew) { if(rNew != maFillColor) maFillColor = rNew; }
         bool getFillColorActive() const { return mbFillColor; }
@@ -398,13 +398,13 @@ namespace
             {
                 RegionHandle aRegionHandle(aRegion.BeginEnumRects());
                 Rectangle aRegionRectangle;
-                
+
                 while(aRegion.GetEnumRects(aRegionHandle, aRegionRectangle))
                 {
                     if(!aRegionRectangle.IsEmpty())
                     {
                         const basegfx::B2DRange aRegionRange(
-                            aRegionRectangle.Left(), aRegionRectangle.Top(), 
+                            aRegionRectangle.Left(), aRegionRectangle.Top(),
                             aRegionRectangle.Right(), aRegionRectangle.Bottom());
                         aRetval.append(basegfx::tools::createPolygonFromRect(aRegionRange));
                     }
@@ -474,7 +474,7 @@ namespace
 
             // All Targets were pointers, but do not need to be deleted since they
             // were converted to UNO API references now, so they stay as long as
-            // referenced. Do NOT delete the C++ implementation classes here, but clear 
+            // referenced. Do NOT delete the C++ implementation classes here, but clear
             // the buffer to not delete them in the destructor.
             aTargets.clear();
 
@@ -488,7 +488,7 @@ namespace
                         new drawinglayer::primitive2d::MaskPrimitive2D(
                             rClipPolyPolygon,
                             xRetval));
-                    
+
                     xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1);
                 }
             }
@@ -577,7 +577,7 @@ namespace drawinglayer
         public:
             /// constructor
             NonOverlappingFillGradientPrimitive2D(
-                const basegfx::B2DRange& rObjectRange, 
+                const basegfx::B2DRange& rObjectRange,
                 const attribute::FillGradientAttribute& rFillGradient)
             :   FillGradientPrimitive2D(rObjectRange, rFillGradient)
             {
@@ -618,7 +618,7 @@ namespace
         if(rMapMode.GetScaleX() != aNoScale || rMapMode.GetScaleY() != aNoScale)
         {
             aMapping.scale(
-                double(rMapMode.GetScaleX()), 
+                double(rMapMode.GetScaleX()),
                 double(rMapMode.GetScaleY()));
         }
 
@@ -627,8 +627,8 @@ namespace
 
     /** helper to create a PointArrayPrimitive2D based on current context */
     void createPointArrayPrimitive(
-        const std::vector< basegfx::B2DPoint >& rPositions, 
-        TargetHolder& rTarget, 
+        const std::vector< basegfx::B2DPoint >& rPositions,
+        TargetHolder& rTarget,
         PropertyHolder& rProperties,
         basegfx::BColor aBColor)
     {
@@ -661,7 +661,7 @@ namespace
     /** helper to create a PolygonHairlinePrimitive2D based on current context */
     void createHairlinePrimitive(
         const basegfx::B2DPolygon& rLinePolygon,
-        TargetHolder& rTarget, 
+        TargetHolder& rTarget,
         PropertyHolder& rProperties)
     {
         if(rLinePolygon.count())
@@ -678,7 +678,7 @@ namespace
     /** helper to create a PolyPolygonColorPrimitive2D based on current context */
     void createFillPrimitive(
         const basegfx::B2DPolyPolygon& rFillPolyPolygon,
-        TargetHolder& rTarget, 
+        TargetHolder& rTarget,
         PropertyHolder& rProperties)
     {
         if(rFillPolyPolygon.count())
@@ -695,8 +695,8 @@ namespace
     /** helper to create a PolygonStrokePrimitive2D based on current context */
     void createLinePrimitive(
         const basegfx::B2DPolygon& rLinePolygon,
-        const LineInfo& rLineInfo, 
-        TargetHolder& rTarget, 
+        const LineInfo& rLineInfo,
+        TargetHolder& rTarget,
         PropertyHolder& rProperties)
     {
         if(rLinePolygon.count())
@@ -761,14 +761,14 @@ namespace
     /** helper to create needed line and fill primitives based on current context */
     void createHairlineAndFillPrimitive(
         const basegfx::B2DPolygon& rPolygon,
-        TargetHolder& rTarget, 
+        TargetHolder& rTarget,
         PropertyHolder& rProperties)
     {
         if(rProperties.getFillColorActive())
         {
             createFillPrimitive(basegfx::B2DPolyPolygon(rPolygon), rTarget, rProperties);
         }
-        
+
         if(rProperties.getLineColorActive())
         {
             createHairlinePrimitive(rPolygon, rTarget, rProperties);
@@ -778,14 +778,14 @@ namespace
     /** helper to create needed line and fill primitives based on current context */
     void createHairlineAndFillPrimitive(
         const basegfx::B2DPolyPolygon& rPolyPolygon,
-        TargetHolder& rTarget, 
+        TargetHolder& rTarget,
         PropertyHolder& rProperties)
     {
         if(rProperties.getFillColorActive())
         {
             createFillPrimitive(rPolyPolygon, rTarget, rProperties);
         }
-        
+
         if(rProperties.getLineColorActive())
         {
             for(sal_uInt32 a(0); a < rPolyPolygon.count(); a++)
@@ -802,16 +802,16 @@ namespace
         transformed embedding of a BitmapPrimitive2D.
     */
     void createBitmapExPrimitive(
-        const BitmapEx& rBitmapEx, 
+        const BitmapEx& rBitmapEx,
         const Point& rPoint,
-        TargetHolder& rTarget, 
+        TargetHolder& rTarget,
         PropertyHolder& rProperties)
     {
         if(!rBitmapEx.IsEmpty())
         {
             basegfx::B2DPoint aPoint(rPoint.X(), rPoint.Y());
             aPoint = rProperties.getTransformation() * aPoint;
-            
+
             rTarget.append(
                 new drawinglayer::primitive2d::DiscreteBitmapPrimitive2D(
                     rBitmapEx,
@@ -821,23 +821,23 @@ namespace
 
     /** helper to create BitmapPrimitive2D based on current context */
     void createBitmapExPrimitive(
-        const BitmapEx& rBitmapEx, 
+        const BitmapEx& rBitmapEx,
         const Point& rPoint,
         const Size& rSize,
-        TargetHolder& rTarget, 
+        TargetHolder& rTarget,
         PropertyHolder& rProperties)
     {
         if(!rBitmapEx.IsEmpty())
         {
             basegfx::B2DHomMatrix aObjectTransform;
-            
+
             aObjectTransform.set(0, 0, rSize.Width());
             aObjectTransform.set(1, 1, rSize.Height());
             aObjectTransform.set(0, 2, rPoint.X());
             aObjectTransform.set(1, 2, rPoint.Y());
-            
+
             aObjectTransform = rProperties.getTransformation() * aObjectTransform;
-            
+
             rTarget.append(
                 new drawinglayer::primitive2d::BitmapPrimitive2D(
                     rBitmapEx,
@@ -847,21 +847,21 @@ namespace
 
     /** helper to create a regular BotmapEx from a MaskAction (definitions
         which use a bitmap without transparence but define one of the colors as
-        transparent) 
+        transparent)
      */
     BitmapEx createMaskBmpEx(const Bitmap& rBitmap, const Color& rMaskColor)
     {
         const Color aWhite(COL_WHITE);
         BitmapPalette aBiLevelPalette(2);
-        
+
         aBiLevelPalette[0] = aWhite;
         aBiLevelPalette[1] = rMaskColor;
 
         Bitmap aMask(rBitmap.CreateMask(aWhite));
         Bitmap aSolid(rBitmap.GetSizePixel(), 1, &aBiLevelPalette);
-        
+
         aSolid.Erase(rMaskColor);
-                        
+
         return BitmapEx(aSolid, aMask);
     }
 
@@ -873,7 +873,7 @@ namespace
         const Color aStartColor(rGradient.GetStartColor());
         const sal_uInt16 nStartIntens(rGradient.GetStartIntensity());
         basegfx::BColor aStart(aStartColor.getBColor());
-        
+
         if(nStartIntens != 100)
         {
             const basegfx::BColor aBlack;
@@ -883,7 +883,7 @@ namespace
         const Color aEndColor(rGradient.GetEndColor());
         const sal_uInt16 nEndIntens(rGradient.GetEndIntensity());
         basegfx::BColor aEnd(aEndColor.getBColor());
-        
+
         if(nEndIntens != 100)
         {
             const basegfx::BColor aBlack;
@@ -894,29 +894,29 @@ namespace
 
         switch(rGradient.GetStyle())
         {
-            case GRADIENT_LINEAR : 
+            case GRADIENT_LINEAR :
             {
                 aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_LINEAR;
                 break;
             }
-            case GRADIENT_AXIAL : 
+            case GRADIENT_AXIAL :
             {
                 aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_AXIAL;
                 break;
             }
-            case GRADIENT_RADIAL : 
+            case GRADIENT_RADIAL :
             {
                 aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RADIAL;
                 break;
             }
-            case GRADIENT_ELLIPTICAL : 
+            case GRADIENT_ELLIPTICAL :
             {
                 aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_ELLIPTICAL;
                 break;
             }
-            case GRADIENT_SQUARE : 
+            case GRADIENT_SQUARE :
             {
-                aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_SQUARE; 
+                aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_SQUARE;
                 break;
             }
             default : // GRADIENT_RECT
@@ -946,14 +946,14 @@ namespace
 
         switch(rHatch.GetStyle())
         {
-            default : // case HATCH_SINGLE : 
+            default : // case HATCH_SINGLE :
             {
-                aHatchStyle = drawinglayer::attribute::HATCHSTYLE_SINGLE; 
+                aHatchStyle = drawinglayer::attribute::HATCHSTYLE_SINGLE;
                 break;
             }
-            case HATCH_DOUBLE : 
+            case HATCH_DOUBLE :
             {
-                aHatchStyle = drawinglayer::attribute::HATCHSTYLE_DOUBLE; 
+                aHatchStyle = drawinglayer::attribute::HATCHSTYLE_DOUBLE;
                 break;
             }
             case HATCH_TRIPLE :
@@ -962,7 +962,7 @@ namespace
                 break;
             }
         }
-        
+
         return drawinglayer::attribute::FillHatchAttribute(
             aHatchStyle,
             (double)rHatch.GetDistance(),
@@ -992,7 +992,7 @@ namespace
         //
         // This ClipPolyPolygon is identical to the current one, so there is no need to
         // create a MaskPrimitive2D containing the up-to-now created primitives, but
-        // this was done before. While this does not lead to wrong primitive 
+        // this was done before. While this does not lead to wrong primitive
         // representations of the metafile data, it creates unneccesarily expensive
         // representations. Just detecting when no really 'new' ClipPolyPolygon gets set
         // solves the problem.
@@ -1016,7 +1016,7 @@ namespace
         // Here the old and the new are definitively different, maybe
         // old one and/or new one is not active.
 
-        // Handle deletion of old ClipPolyPolygon. The process evtl. created primitives which 
+        // Handle deletion of old ClipPolyPolygon. The process evtl. created primitives which
         // belong to this active ClipPolyPolygon. These need to be embedded to a
         // MaskPrimitive2D accordingly.
         if(rPropertyHolders.Current().getClipPolyPolygonActive() && rTargetHolders.size() > 1)
@@ -1141,7 +1141,7 @@ namespace
         else
         {
             // really a gradient
-            drawinglayer::primitive2d::BasePrimitive2D* pRetval = 
+            drawinglayer::primitive2d::BasePrimitive2D* pRetval =
                 new drawinglayer::primitive2d::FillGradientPrimitive2D(
                     rRange,
                     aAttribute);
@@ -1202,7 +1202,7 @@ namespace
         if(rWallpaper.IsRect() && !rWallpaper.GetRect().IsEmpty())
         {
             aWallpaperRange = basegfx::B2DRange(
-                rWallpaper.GetRect().Left(), rWallpaper.GetRect().Top(), 
+                rWallpaper.GetRect().Left(), rWallpaper.GetRect().Top(),
                 rWallpaper.GetRect().Right(), rWallpaper.GetRect().Bottom());
         }
 
@@ -1211,7 +1211,7 @@ namespace
                 aWallpaperRange,
                 aBitmapEx,
                 eWallpaperStyle);
-        
+
         if(rProperty.getTransformation().isIdentity())
         {
             // add directly
@@ -1374,7 +1374,7 @@ namespace
 
                 // TextDecoratedPortionPrimitive2D is needed, create one
                 pResult = new drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D(
-                    
+
                     // attributes for TextSimplePortionPrimitive2D
                     aTextTransform,
                     rText,
@@ -1436,7 +1436,7 @@ namespace
             {
                 // build text range
                 const basegfx::B2DRange aTextRange(
-                    0.0, -aTextLayouterDevice.getFontAscent(), 
+                    0.0, -aTextLayouterDevice.getFontAscent(),
                     fTextWidth, aTextLayouterDevice.getFontDescent());
 
                 // create Transform
@@ -1557,7 +1557,7 @@ namespace
                 if(bStrikeoutUsed)
                 {
                     // create primitive geometry for strikeout
-                    if(drawinglayer::primitive2d::TEXT_STRIKEOUT_SLASH == aTextStrikeout 
+                    if(drawinglayer::primitive2d::TEXT_STRIKEOUT_SLASH == aTextStrikeout
                         || drawinglayer::primitive2d::TEXT_STRIKEOUT_X == aTextStrikeout)
                     {
                         // strikeout with character
@@ -1642,9 +1642,9 @@ namespace
 
         I have marked the single MetaActions with:
 
-        SIMPLE, DONE: 
+        SIMPLE, DONE:
         Simple, e.g nothing to do or value setting in the context
-        
+
         CHECKED, WORKS WELL:
         Thoroughly tested with extra written test code which created a replacement
         Metafile just to test this action in various combinations
@@ -1662,9 +1662,9 @@ namespace
         PropertyHolders& rPropertyHolders,
         const drawinglayer::geometry::ViewInformation2D& rViewInformation)
     {
-        const sal_uInt32 nCount(rMetaFile.GetActionCount());
+        const size_t nCount(rMetaFile.GetActionSize());
 
-        for(sal_uInt32 nAction(0); nAction < nCount; nAction++)
+        for(size_t nAction(0); nAction < nCount; nAction++)
         {
             MetaAction* pAction = rMetaFile.GetAction(nAction);
 
@@ -1753,7 +1753,7 @@ namespace
 
                             if(aLinePolygon.count())
                             {
-                                if(pA->GetLineInfo() == aLineInfo 
+                                if(pA->GetLineInfo() == aLineInfo
                                     && aStart == aLinePolygon.getB2DPoint(aLinePolygon.count() - 1))
                                 {
                                     aLinePolygon.append(aEnd);
@@ -1774,7 +1774,7 @@ namespace
                                 aLinePolygon.append(aStart);
                                 aLinePolygon.append(aEnd);
                             }
-                            
+
                             nAction++; if(nAction < nCount) pAction = rMetaFile.GetAction(nAction);
                         }
 
@@ -1816,7 +1816,7 @@ namespace
                     /** CHECKED, WORKS WELL */
                     /**	The original OutputDevice::DrawRect paints nothing when nHor or nVer is zero; but just
                         because the tools::Polygon operator creating the rounding does produce nonsense. I assume
-                        this an error and create an unrounded rectangle in that case (implicit in 
+                        this an error and create an unrounded rectangle in that case (implicit in
                         createPolygonFromRect)
                      */
                     if(rPropertyHolders.Current().getLineOrFillActive())
@@ -1827,7 +1827,7 @@ namespace
                         if(!rRectangle.IsEmpty())
                         {
                             const basegfx::B2DRange aRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom());
-                            
+
                             if(!aRange.isEmpty())
                             {
                                 const sal_uInt32 nHor(pA->GetHorzRound());
@@ -2020,7 +2020,7 @@ namespace
                     {
                         nTextLength = nTextIndex > nStringLength ? 0 : nStringLength - nTextIndex;
                     }
-                    
+
                     if(nTextLength && rPropertyHolders.Current().getTextColorActive())
                     {
                         // preapare DXArray (if used)
@@ -2036,7 +2036,7 @@ namespace
                                 aDXArray.push_back((double)(*(pDXArray + a)));
                             }
                         }
-                        
+
                         proccessMetaTextAction(
                             pA->GetPoint(),
                             pA->GetText(),
@@ -2057,7 +2057,7 @@ namespace
                     // Implemented getting the DXArray and checking for scale at all. If
                     // scale is more than 3.5% different, scale the DXArray before usage.
                     // New status:
-                
+
                     /** CHECKED, WORKS WELL */
                     const MetaStretchTextAction* pA = (const MetaStretchTextAction*)pAction;
                     sal_uInt32 nTextLength(pA->GetLen());
@@ -2068,7 +2068,7 @@ namespace
                     {
                         nTextLength = nStringLength - nTextIndex;
                     }
-                    
+
                     if(nTextLength && rPropertyHolders.Current().getTextColorActive())
                     {
                         drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
@@ -2109,7 +2109,7 @@ namespace
                             rTargetHolders.Current(),
                             rPropertyHolders.Current());
                     }
-                    
+
                     break;
                 }
                 case META_TEXTRECT_ACTION :
@@ -2119,7 +2119,7 @@ namespace
                     const MetaTextRectAction* pA = (const MetaTextRectAction*)pAction;
                     const Rectangle& rRectangle = pA->GetRect();
                     const sal_uInt32 nStringLength(pA->GetText().Len());
-                    
+
                     if(!rRectangle.IsEmpty() && 0 != nStringLength)
                     {
                         // The problem with this action is that it describes unlayouted text
@@ -2140,7 +2140,7 @@ namespace
                         aTextLayouterDevice.addTextRectActions(
                             rRectangle, pA->GetText(), pA->GetStyle(), aGDIMetaFile);
 
-                        if(aGDIMetaFile.GetActionCount())
+                        if(aGDIMetaFile.GetActionSize())
                         {
                             // cerate sub-content
                             drawinglayer::primitive2d::Primitive2DSequence xSubContent;
@@ -2285,7 +2285,7 @@ namespace
                         {
                             aCroppedBitmap.Crop(aCropRectangle);
                         }
-                        
+
                         const BitmapEx aCroppedBitmapEx(createMaskBmpEx(aCroppedBitmap, pA->GetColor()));
                         createBitmapExPrimitive(aCroppedBitmapEx, pA->GetDestPoint(), pA->GetDestSize(), rTargetHolders.Current(), rPropertyHolders.Current());
                     }
@@ -2307,13 +2307,13 @@ namespace
                             const Gradient& rGradient = pA->GetGradient();
                             const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient));
                             basegfx::B2DPolyPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange));
-                            
+
                             if(aAttribute.getStartColor() == aAttribute.getEndColor())
                             {
                                 // not really a gradient. Create filled rectangle
                                 createFillPrimitive(
-                                    aOutline, 
-                                    rTargetHolders.Current(), 
+                                    aOutline,
+                                    rTargetHolders.Current(),
                                     rPropertyHolders.Current());
                             }
                             else
@@ -2387,13 +2387,13 @@ namespace
                     /** CHECKED, WORKS WELL */
                     const MetaWallpaperAction* pA = (const MetaWallpaperAction*)pAction;
                     Rectangle aWallpaperRectangle(pA->GetRect());
-                    
+
                     if(!aWallpaperRectangle.IsEmpty())
                     {
                         const Wallpaper& rWallpaper = pA->GetWallpaper();
                            const WallpaperStyle eWallpaperStyle(rWallpaper.GetStyle());
                         basegfx::B2DRange aWallpaperRange(
-                            aWallpaperRectangle.Left(), aWallpaperRectangle.Top(), 
+                            aWallpaperRectangle.Left(), aWallpaperRectangle.Top(),
                             aWallpaperRectangle.Right(), aWallpaperRectangle.Bottom());
 
                         if(WALLPAPER_NULL != eWallpaperStyle)
@@ -2441,7 +2441,7 @@ namespace
                     {
                         // new clipping. Get PolyPolygon and transform with current transformation
                         basegfx::B2DPolyPolygon aNewClipPolyPolygon(getB2DPolyPolygonFromRegion(pA->GetRegion()));
-                        
+
                         aNewClipPolyPolygon.transform(rPropertyHolders.Current().getTransformation());
                         HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders);
                     }
@@ -2449,7 +2449,7 @@ namespace
                     {
                         // end clipping
                         const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
-                        
+
                         HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
                     }
 
@@ -2466,7 +2466,7 @@ namespace
                         // intersect with empty rectangle will always give empty
                         // ClipPolyPolygon; start new clipping with empty PolyPolygon
                         const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
-                        
+
                         HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
                     }
                     else
@@ -2495,18 +2495,18 @@ namespace
                                 if(aOriginalPolyPolygon.count())
                                 {
                                     aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnRange(
-                                        aOriginalPolyPolygon, 
-                                        aClipRange, 
-                                        true, 
+                                        aOriginalPolyPolygon,
+                                        aClipRange,
+                                        true,
                                         false);
                                 }
-                                
+
                                 if(aClippedPolyPolygon != aOriginalPolyPolygon)
                                 {
                                     // start new clipping with intersected region
                                     HandleNewClipRegion(
-                                        aClippedPolyPolygon, 
-                                        rTargetHolders, 
+                                        aClippedPolyPolygon,
+                                        rTargetHolders,
                                         rPropertyHolders);
                                 }
                             }
@@ -2534,7 +2534,7 @@ namespace
                         // intersect with empty region will always give empty
                         // region; start new clipping with empty PolyPolygon
                         const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
-                        
+
                         HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
                     }
                     else
@@ -2562,7 +2562,7 @@ namespace
                                     aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(
                                         aOriginalPolyPolygon, aNewClipPolyPolygon, true, false);
                                 }
-                                
+
                                 if(aClippedPolyPolygon != aOriginalPolyPolygon)
                                 {
                                     // start new clipping with intersected ClipPolyPolygon
@@ -2612,7 +2612,7 @@ namespace
                             }
                         }
                     }
-                    
+
                     break;
                 }
                 case META_LINECOLOR_ACTION :
@@ -2620,11 +2620,11 @@ namespace
                     /** CHECKED, WORKS WELL */
                     const MetaLineColorAction* pA = (const MetaLineColorAction*)pAction;
                     const bool bActive(pA->IsSetting());
-                    
+
                     rPropertyHolders.Current().setLineColorActive(bActive);
                     if(bActive)
                         rPropertyHolders.Current().setLineColor(pA->GetColor().getBColor());
-                    
+
                     break;
                 }
                 case META_FILLCOLOR_ACTION :
@@ -2677,7 +2677,7 @@ namespace
                     const MetaTextAlignAction* pA = (const MetaTextAlignAction*)pAction;
                     const TextAlign aNewTextAlign = pA->GetTextAlign();
 
-                    // TextAlign is applied to the current font (as in 
+                    // TextAlign is applied to the current font (as in
                     // OutputDevice::SetTextAlign which would be used when
                     // playing the Metafile)
                     if(rPropertyHolders.Current().getFont().GetAlign() != aNewTextAlign)
@@ -2737,7 +2737,7 @@ namespace
                         aMapping = getTransformFromMapMode(rMapMode) * aMapping;
                         rPropertyHolders.Current().setMapUnit(rMapMode.GetMapUnit());
                     }
-                    
+
                     if(!aMapping.isIdentity())
                     {
                         aMapping = aMapping * rPropertyHolders.Current().getTransformation();
@@ -2779,7 +2779,7 @@ namespace
                     {
                         rPropertyHolders.Current().setTextColor(rFontColor.getBColor());
                     }
-                    
+
                     // caution: do NOT decativate here on transparet, see
                     // OutputDevice::SetFont(..) for more info
                     // rPropertyHolders.Current().setTextColorActive(bActivate);
@@ -2812,7 +2812,7 @@ namespace
                     /** CHECKED, WORKS WELL */
                     const bool bRegionMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_CLIPREGION);
                     const bool bRasterOpMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_RASTEROP);
-                    
+
                     if(bRegionMayChange && rPropertyHolders.Current().getClipPolyPolygonActive())
                     {
                         // end evtl. clipping
@@ -2820,7 +2820,7 @@ namespace
 
                         HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
                     }
-                    
+
                     if(bRasterOpMayChange && rPropertyHolders.Current().isRasterOpActive())
                     {
                         // end evtl. RasterOp
@@ -2885,7 +2885,7 @@ namespace
 
                             // back to old target
                             rTargetHolders.Pop();
-                            
+
                             if(aSubContent.hasElements())
                             {
                                 rTargetHolders.Current().append(
@@ -2917,7 +2917,7 @@ namespace
                         aObjectTransform.set(1, 1, aRectangle.GetHeight());
                         aObjectTransform.set(0, 2, aRectangle.Left());
                         aObjectTransform.set(1, 2, aRectangle.Top());
-                        
+
                         // add current transformation
                         aObjectTransform = rPropertyHolders.Current().getTransformation() * aObjectTransform;
 
@@ -2928,7 +2928,7 @@ namespace
                                 pA->GetLink(),
                                 pA->GetSubstitute()));
                     }
-                    
+
                     break;
                 }
                 case META_REFPOINT_ACTION :
@@ -2962,9 +2962,9 @@ namespace
                     // checked files). It's used in combination with the current
                     // Font.
                     const MetaTextLineAction* pA = (const MetaTextLineAction*)pAction;
-                    
+
                     proccessMetaTextLineAction(
-                        *pA, 
+                        *pA,
                         rTargetHolders.Current(),
                         rPropertyHolders.Current());
 
@@ -2980,7 +2980,7 @@ namespace
                     {
                         const GDIMetaFile& rContent = pA->GetGDIMetaFile();
 
-                        if(rContent.GetActionCount())
+                        if(rContent.GetActionSize())
                         {
                             // create the sub-content with no embedding specific to the
                             // sub-metafile, this seems not to be used.
@@ -3000,7 +3000,7 @@ namespace
                                 // check if gradient is a real gradient
                                 const Gradient& rGradient = pA->GetGradient();
                                 const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient));
-                                
+
                                 if(aAttribute.getStartColor() == aAttribute.getEndColor())
                                 {
                                     // not really a gradient; create UnifiedTransparencePrimitive2D
@@ -3013,16 +3013,16 @@ namespace
                                 {
                                     // really a gradient. Create gradient sub-content (with correct scaling)
                                     basegfx::B2DRange aRange(
-                                        aTargetRectangle.Left(), aTargetRectangle.Top(), 
+                                        aTargetRectangle.Left(), aTargetRectangle.Top(),
                                         aTargetRectangle.Right(), aTargetRectangle.Bottom());
                                     aRange.transform(rPropertyHolders.Current().getTransformation());
 
                                     // prepare gradient for transparent content
                                     const drawinglayer::primitive2d::Primitive2DReference xTransparence(
                                         new drawinglayer::primitive2d::FillGradientPrimitive2D(
-                                            aRange, 
+                                            aRange,
                                             aAttribute));
-                                    
+
                                     // create transparence primitive
                                     rTargetHolders.Current().append(
                                         new drawinglayer::primitive2d::TransparencePrimitive2D(
@@ -3072,7 +3072,7 @@ namespace
                 case META_COMMENT_ACTION :
                 {
                     /** CHECKED, WORKS WELL */
-                    // I already implemented 
+                    // I already implemented
                     //     XPATHFILL_SEQ_BEGIN, XPATHFILL_SEQ_END
                     //     XPATHSTROKE_SEQ_BEGIN, XPATHSTROKE_SEQ_END,
                     // but opted to remove these again; it works well without them
@@ -3118,11 +3118,11 @@ namespace
                             {
                                 // transform geometry
                                 aPolyPolygon.transform(rPropertyHolders.Current().getTransformation());
-                                
+
                                 // get and check if gradient is a real gradient
                                 const Gradient& rGradient = pMetaGradientExAction->GetGradient();
                                 const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient));
-                                
+
                                 if(aAttribute.getStartColor() == aAttribute.getEndColor())
                                 {
                                     // not really a gradient
@@ -3179,12 +3179,12 @@ namespace drawinglayer
 
             while(aTargetHolders.size() > 1)
             {
-                appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, 
+                appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
                     aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()));
                 aTargetHolders.Pop();
             }
-            
-            appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, 
+
+            appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
                 aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()));
 
             if(xRetval.hasElements())
@@ -3214,7 +3214,7 @@ namespace drawinglayer
         }
 
         MetafilePrimitive2D::MetafilePrimitive2D(
-            const basegfx::B2DHomMatrix& rMetaFileTransform, 
+            const basegfx::B2DHomMatrix& rMetaFileTransform,
             const GDIMetaFile& rMetaFile)
         :	BufferedDecompositionPrimitive2D(),
             maMetaFileTransform(rMetaFileTransform),
@@ -3228,7 +3228,7 @@ namespace drawinglayer
             {
                 const MetafilePrimitive2D& rCompare = (MetafilePrimitive2D&)rPrimitive;
 
-                return (getTransform() == rCompare.getTransform() 
+                return (getTransform() == rCompare.getTransform()
                     && getMetaFile() == rCompare.getMetaFile());
             }
 
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 770d5e7..7287bc2 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.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
@@ -189,7 +189,7 @@ sal_Bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData,
                     break;
 
                 default:
-                    if( aGrf.GetGDIMetaFile().GetActionCount() )
+                    if( aGrf.GetGDIMetaFile().GetActionSize() )
                     {
                         GDIMetaFile aMeta( aGrf.GetGDIMetaFile() );
                         aMeta.Write( aMemStm );
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index d16a5b9..cb6b20b 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -830,7 +830,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
         }
 
         // Investigate actions and if necessary replace colors
-        for( sal_uIntPtr nAct = 0UL, nActCount = rMtf.GetActionCount(); nAct < nActCount; nAct++ )
+        for( size_t nAct = 0, nActCount = rMtf.GetActionSize(); nAct < nActCount; nAct++ )
         {
             MetaAction* pAction = rMtf.GetAction( nAct );
 
@@ -1077,11 +1077,11 @@ Animation SvxBmpMask::ImpReplaceTransparency( const Animation& rAnim, const Colo
 
 GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const Color& rColor )
 {
-    VirtualDevice	aVDev;
-    GDIMetaFile		aMtf;
-    const MapMode&	rPrefMap = rMtf.GetPrefMapMode();
-    const Size&		rPrefSize = rMtf.GetPrefSize();
-    const sal_uIntPtr		nActionCount = rMtf.GetActionCount();
+    VirtualDevice   aVDev;
+    GDIMetaFile     aMtf;
+    const MapMode&  rPrefMap = rMtf.GetPrefMapMode();
+    const Size&     rPrefSize = rMtf.GetPrefSize();
+    const size_t    nActionCount = rMtf.GetActionSize();
 
     aVDev.EnableOutput( sal_False );
     aMtf.Record( &aVDev );
@@ -1093,7 +1093,7 @@ GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const C
     // retrieve one action at the time; first
     // set the whole area to the replacement color.
     aVDev.DrawRect( Rectangle( rPrefMap.GetOrigin(), rPrefSize ) );
-    for ( sal_uIntPtr i = 0; i < nActionCount; i++ )
+    for ( size_t i = 0; i < nActionCount; i++ )
     {
         MetaAction* pAct = rMtf.GetAction( i );
 
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 11c1b06..884d7b0 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.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
@@ -114,7 +114,7 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
     pPage = rOL.GetPage();
     GDIMetaFile* pTmpMtf=NULL;
     GDIMetaFile* pMtf = (GDIMetaFile*) &rMtf;
-    sal_uIntPtr nActionAnz=pMtf->GetActionCount();
+    size_t nActionAnz = pMtf->GetActionSize();
     sal_Bool bError = sal_False;
 
 
@@ -156,7 +156,7 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
     if(pProgrInfo)
         pProgrInfo->SetActionCount(nActionAnz);
 
-    sal_uIntPtr nActionsToReport = 0;
+    size_t nActionsToReport = 0;
 
     for( MetaAction* pAct = pMtf->FirstAction(); pAct; pAct = pMtf->NextAction() )
     {
@@ -223,11 +223,11 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
     // Objekte in vorgegebenes Rechteck hineinskalieren
     sal_uIntPtr nAnz=aTmpList.GetObjCount();
 
-    // Beim berechnen der Fortschrittsanzeige wird GetActionCount()*3 benutzt.
-    // Da in aTmpList allerdings weniger eintraege als GetActionCount()
+    // Beim berechnen der Fortschrittsanzeige wird GetActionSize()*3 benutzt.
+    // Da in aTmpList allerdings weniger eintraege als GetActionSize()
     // existieren koennen, muessen hier die zuviel vermuteten Actionen wieder
     // hinzugefuegt werden.
-    nActionsToReport = (pMtf->GetActionCount() - nAnz)*2;
+    nActionsToReport = (pMtf->GetActionSize() - nAnz)*2;
 
 
     // Alle noch nicht gemeldeten Rescales melden
@@ -483,9 +483,9 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction& rAct)
             SdrPathObj* pPath = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aLine));
             nLineWidth = nNewLineWidth;
             maLineJoin = rLineInfo.GetLineJoin();
-            maDash = XDash(XDASH_RECT, 
-                rLineInfo.GetDotCount(), rLineInfo.GetDotLen(), 
-                rLineInfo.GetDashCount(), rLineInfo.GetDashLen(), 
+            maDash = XDash(XDASH_RECT,
+                rLineInfo.GetDotCount(), rLineInfo.GetDotLen(),
+                rLineInfo.GetDashCount(), rLineInfo.GetDashLen(),
                 rLineInfo.GetDistance());
             SetAttributes(pPath);
             nLineWidth = 0;
@@ -583,7 +583,7 @@ bool ImpSdrGDIMetaFileImport::CheckLastLineMerge(const basegfx::B2DPolygon& rSrc
                 {
                     return false;
                 }
-                
+
                 if(aDstPoly.count())
                 {
                     const sal_uInt32 nMaxDstPnt(aDstPoly.count() - 1L);
@@ -684,13 +684,13 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolyLineAction& rAct )
     if(bCreateLineObject)
     {
         SdrPathObj* pPath = new SdrPathObj(
-            aSource.isClosed() ? OBJ_POLY : OBJ_PLIN, 
+            aSource.isClosed() ? OBJ_POLY : OBJ_PLIN,
             basegfx::B2DPolyPolygon(aSource));
         nLineWidth = nNewLineWidth;
         maLineJoin = rLineInfo.GetLineJoin();
-        maDash = XDash(XDASH_RECT, 
-            rLineInfo.GetDotCount(), rLineInfo.GetDotLen(), 
-            rLineInfo.GetDashCount(), rLineInfo.GetDashLen(), 
+        maDash = XDash(XDASH_RECT,
+            rLineInfo.GetDotCount(), rLineInfo.GetDotLen(),
+            rLineInfo.GetDashCount(), rLineInfo.GetDashLen(),
             rLineInfo.GetDistance());
         SetAttributes(pPath);
         nLineWidth = 0;
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 96329b3..cb2b066 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.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
@@ -77,7 +77,7 @@ SdrExchangeView::SdrExchangeView(SdrModel* pModel1, OutputDevice* pOut):
 Point SdrExchangeView::GetViewCenter(const OutputDevice* pOut) const
 {
     Point aCenter;
-    if (pOut==NULL) 
+    if (pOut==NULL)
     {
         pOut = GetFirstOutputDevice();
     }
@@ -140,10 +140,10 @@ sal_Bool SdrExchangeView::ImpLimitToWorkArea(Point& rPt) const
 
 void SdrExchangeView::ImpGetPasteObjList(Point& /*rPos*/, SdrObjList*& rpLst)
 {
-    if (rpLst==NULL) 
+    if (rpLst==NULL)
     {
         SdrPageView* pPV = GetSdrPageView();
-    
+
         if (pPV!=NULL) {
             rpLst=pPV->GetObjList();
         }
@@ -282,7 +282,7 @@ sal_Bool SdrExchangeView::Paste(SvStream& rInput, const String& rBaseURL, sal_uI
     {
         SdrOutliner& rOutliner = pObj->GetModel()->GetHitTestOutliner();
         rOutliner.SetText(*pObj->GetOutlinerParaObject());
-        
+
         if(1L == rOutliner.GetParagraphCount())
         {
             SfxStyleSheet* pCandidate = rOutliner.GetStyleSheet(0L);
@@ -379,15 +379,15 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
             // #116235#
             SdrObject* pNeuObj = pSrcOb->Clone();
 
-            if (pNeuObj!=NULL) 
+            if (pNeuObj!=NULL)
             {
-                if(bResize) 
+                if(bResize)
                 {
                     pNeuObj->GetModel()->SetPasteResize(sal_True); // #51139#
                     pNeuObj->NbcResize(aPt0,xResize,yResize);
                     pNeuObj->GetModel()->SetPasteResize(sal_False); // #51139#
                 }
-                
+
                 // #i39861#
                 pNeuObj->SetModel(pDstLst->GetModel());
                 pNeuObj->SetPage(pDstLst->GetPage());
@@ -395,13 +395,13 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
                 pNeuObj->NbcMove(aSiz);
 
                 const SdrPage* pPg = pDstLst->GetPage();
-                
+
                 if(pPg)
                 {
                     // #i72535#
                     const SdrLayerAdmin& rAd = pPg->GetLayerAdmin();
                     SdrLayerID nLayer(0);
-                    
+
                     if(pNeuObj->ISA(FmFormObj))
                     {
                         // for FormControls, force to form layer
@@ -411,8 +411,8 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
                     {
                         nLayer = rAd.GetLayerID(aAktLayer, sal_True);
                     }
-                    
-                    if(SDRLAYER_NOTFOUND == nLayer) 
+
+                    if(SDRLAYER_NOTFOUND == nLayer)
                     {
                         nLayer = 0;
                     }
@@ -552,7 +552,7 @@ Bitmap SdrExchangeView::GetMarkedObjBitmap( sal_Bool bNoVDevIfOneBmpMarked ) con
         if( !aBmp )
         {
             const Graphic aGraphic( GetMarkedObjMetaFile( bNoVDevIfOneBmpMarked ) );
-            
+
             // #i102089# support user's settings of AA and LineSnap when the MetaFile gets
             // rasterconverted to a bitmap
             const SvtOptionsDrawinglayer aDrawinglayerOpt;
@@ -603,7 +603,7 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile( sal_Bool bNoVDevIfOneMtfMarke
             }
         }
 
-        if( !aMtf.GetActionCount() )
+        if( !aMtf.GetActionSize() )
         {
             VirtualDevice   aOut;
             Size            aDummySize( 2, 2 );
@@ -667,7 +667,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject*
         // try to get a graphic from the object first
         const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
         const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
-        
+
         if(pSdrGrafObj)
         {
             // #110981# Make behaviour coherent with metafile
@@ -708,7 +708,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject*
             aMtf.SetPrefMapMode( aMap );
             aMtf.SetPrefSize( aBoundRect.GetSize() );
 
-            if( aMtf.GetActionCount() )
+            if( aMtf.GetActionSize() )
                 aRet = aMtf;
         }
      }
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index cb18793..52584c5 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.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
@@ -74,7 +74,7 @@ const MetaCommentAction* ImplCheckForEPS( GDIMetaFile& rMtf )
     static ByteString aComment( (const sal_Char*)"EPSReplacementGraphic" );
     const MetaCommentAction* pComment = NULL;
 
-    if ( ( rMtf.GetActionCount() >= 2 )
+    if ( ( rMtf.GetActionSize() >= 2 )
             && ( rMtf.FirstAction()->GetType() == META_EPS_ACTION )
             && ( ((const MetaAction*)rMtf.GetAction( 1 ))->GetType() == META_COMMENT_ACTION )
             && ( ((const MetaCommentAction*)rMtf.GetAction( 1 ))->GetComment() == aComment ) )


More information about the Libreoffice-commits mailing list