[Libreoffice-commits] core.git: Branch 'feature/vclref' - filter/source sw/qa sw/source vcl/workben

Michael Meeks michael.meeks at collabora.com
Thu Mar 19 12:05:38 PDT 2015


 filter/source/graphicfilter/icgm/cgm.hxx |    1 +
 sw/qa/tiledrendering/tiledrendering.cxx  |    6 +++---
 sw/source/core/frmedt/fecopy.cxx         |    2 +-
 sw/source/core/layout/paintfrm.cxx       |    8 ++++----
 vcl/workben/vcldemo.cxx                  |   30 +++++++++++++++---------------
 5 files changed, 24 insertions(+), 23 deletions(-)

New commits:
commit fe7412b0560366f7e0f3927ba9966fbc99e98cf6
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Thu Mar 19 19:07:14 2015 +0000

    vclptr: misc. bug fixing.
    
    Change-Id: Id56188c0f72b74bc9ce6eed558a8339d4175d628

diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index c6c0fa6..e851819 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -28,6 +28,7 @@
 
 #include <rtl/ustring.hxx>
 #include <vector>
+#include <vcl/vclptr.hxx>
 #include "cgmtypes.hxx"
 
 class   Graphic;
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 73845bd..82ffe0c 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -130,14 +130,14 @@ IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG )
         //
         // SystemGraphicsData aData;
         // [setup the aData]
-        // VirtualDevice aDevice(&aData, [color depth]);
+        // VirtualDevice pDevice(&aData, [color depth]);
         ScopedVclPtr< VirtualDevice > pDevice(new VirtualDevice());
 
         // paint to it
         pViewShell->PaintTile(*pDevice.get(), contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight);
 
-        // copy the aDevice content to mpImage
-        Bitmap aBitmap(pDevice->GetBitmap(aDevice->PixelToLogic(Point(0,0)), pDevice->PixelToLogic(Size(contextWidth, contextHeight))));
+        // copy the pDevice content to mpImage
+        Bitmap aBitmap(pDevice->GetBitmap(pDevice->PixelToLogic(Point(0,0)), pDevice->PixelToLogic(Size(contextWidth, contextHeight))));
         mpImage->SetImage(Image(aBitmap));
 
         // update the dialog size
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 69dc7e8..6274e97 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1241,7 +1241,7 @@ bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const
 
                             GDIMetaFile aMtf;
                             aMtf.Record( pVirtDev.get() );
-                            aGrf.Draw( &aVirtDev, aPt, aSz );
+                            aGrf.Draw( pVirtDev, aPt, aSz );
                             aMtf.Stop();
                             aMtf.SetPrefMapMode( aTmp );
                             aMtf.SetPrefSize( aSz );
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index b408f36..ecdc339 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -7675,7 +7675,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
 
         vcl::Window *pWin = pSh->GetWin();
         sal_uInt16 nZoom = pSh->GetViewOptions()->GetZoom();
-        ::SetOutDevAndWin( pSh, &aDev, 0, 100 );
+        ::SetOutDevAndWin( pSh, pDev, 0, 100 );
         gProp.bSFlyMetafile = true;
         gProp.pSFlyMetafileOut = pWin;
 
@@ -7693,15 +7693,15 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
         pImp->PaintLayer( pIDDMA->GetHellId(), 0, aOut, &aPageBackgrdColor,
                           pFlyPage->IsRightToLeft(),
                           &aSwRedirector );
-        gProp.pSLines->PaintLines( &aDev, gProp );
+        gProp.pSLines->PaintLines( pDev, gProp );
         if ( pFly->IsFlyInCntFrm() )
             pFly->Paint( aOut );
-        gProp.pSLines->PaintLines( &aDev, gProp );
+        gProp.pSLines->PaintLines( pDev, gProp );
         // OD 30.08.2002 #102450# - add 3rd parameter
         pImp->PaintLayer( pIDDMA->GetHeavenId(), 0, aOut, &aPageBackgrdColor,
                           pFlyPage->IsRightToLeft(),
                           &aSwRedirector );
-        gProp.pSLines->PaintLines( &aDev, gProp );
+        gProp.pSLines->PaintLines( pDev, gProp );
         DELETEZ( gProp.pSLines );
         gProp.pSFlyOnlyDraw = 0;
 
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 8936553..0cd32fe 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -807,18 +807,18 @@ public:
             // Compositing onto 2x colors beyond our control
             ScopedVclPtr< VirtualDevice > aWhite(new VirtualDevice());
             ScopedVclPtr< VirtualDevice > aBlack(new VirtualDevice());
-            aWhite.SetOutputSizePixel(aSrc.GetSizePixel());
-            aWhite.SetBackground(Wallpaper(COL_WHITE));
-            aWhite.Erase();
-            aBlack.SetOutputSizePixel(aSrc.GetSizePixel());
-            aBlack.SetBackground(Wallpaper(COL_BLACK));
-            aBlack.Erase();
-            aWhite.DrawBitmapEx(Point(), aSrc);
-            aBlack.DrawBitmapEx(Point(), aSrc);
+            aWhite->SetOutputSizePixel(aSrc.GetSizePixel());
+            aWhite->SetBackground(Wallpaper(COL_WHITE));
+            aWhite->Erase();
+            aBlack->SetOutputSizePixel(aSrc.GetSizePixel());
+            aBlack->SetBackground(Wallpaper(COL_BLACK));
+            aBlack->Erase();
+            aWhite->DrawBitmapEx(Point(), aSrc);
+            aBlack->DrawBitmapEx(Point(), aSrc);
 
             // Now recover that alpha...
-            Bitmap aWhiteBmp = aWhite.GetBitmap(Point(),aSrc.GetSizePixel());
-            Bitmap aBlackBmp = aBlack.GetBitmap(Point(),aSrc.GetSizePixel());
+            Bitmap aWhiteBmp = aWhite->GetBitmap(Point(),aSrc.GetSizePixel());
+            Bitmap aBlackBmp = aBlack->GetBitmap(Point(),aSrc.GetSizePixel());
             AlphaMask aMask(aSrc.GetSizePixel());
             Bitmap aRecovered(aSrc.GetSizePixel(), 24);
             {
@@ -1295,16 +1295,16 @@ public:
         DrawWallpaper(aWholeSize, aWallpaper);
         Pop();
 
-        ScopedVclPtr< VirtualDevice > aDev(new VirtualDevice(*this));
-        aDev.EnableRTL(IsRTLEnabled());
-        aDev.SetOutputSizePixel(aExclude.GetSize());
+        ScopedVclPtr< VirtualDevice > pDev(new VirtualDevice(*this));
+        pDev->EnableRTL(IsRTLEnabled());
+        pDev->SetOutputSizePixel(aExclude.GetSize());
 
         Rectangle aSubRect(aWholeSize);
         aSubRect.Move(-aExclude.Left(), -aExclude.Top());
-        aDev.DrawWallpaper(aSubRect, aWallpaper );
+        pDev->DrawWallpaper(aSubRect, aWallpaper );
 
         DrawOutDev(aExclude.TopLeft(), aExclude.GetSize(),
-                   Point( 0, 0 ), aExclude.GetSize(), aDev );
+                   Point( 0, 0 ), aExclude.GetSize(), *pDev.get() );
     }
 };
 


More information about the Libreoffice-commits mailing list